aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZarino Zappia <mail@zarino.co.uk>2017-05-26 12:32:49 +0100
committerZarino Zappia <mail@zarino.co.uk>2017-06-09 13:38:35 +0100
commit831943b1320841f3b9383c1e493840f9f657744c (patch)
tree805f92fff42b24f4911eb76387f8f1127286b2ff
parent1b15964af653b66d755ce2bd20ece76b960a44d4 (diff)
[Oxfordshire] Custom pin images with icons
Oxfordshire map pins now have icons on, and some use different colours, to better communicate the status of reports. Fixes mysociety/fixmystreetforcouncils#170
-rw-r--r--perllib/FixMyStreet/Cobrand/Oxfordshire.pm14
-rwxr-xr-xtemplates/web/oxfordshire/front/_list-entry.html5
-rw-r--r--web/cobrands/oxfordshire/_colours.scss2
-rw-r--r--web/cobrands/oxfordshire/images/pin-green-big.pngbin0 -> 10557 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-green-mini.pngbin0 -> 1307 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-green-small.pngbin0 -> 2137 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-green.pngbin0 -> 5233 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-grey-big.pngbin0 -> 13399 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-grey-mini.pngbin0 -> 1514 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-grey-small.pngbin0 -> 2498 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-grey.pngbin0 -> 6230 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-orange-big.pngbin0 -> 10646 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-orange-mini.pngbin0 -> 1353 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-orange-small.pngbin0 -> 2563 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-orange.pngbin0 -> 5747 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-shadow-big.pngbin0 -> 641 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-shadow-small.pngbin0 -> 288 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-shadow.pngbin0 -> 478 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-spot.pngbin0 -> 3901 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-yellow-big.pngbin0 -> 6032 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-yellow-mini.pngbin0 -> 988 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-yellow-small.pngbin0 -> 1719 bytes
-rw-r--r--web/cobrands/oxfordshire/images/pin-yellow.pngbin0 -> 3508 bytes
-rw-r--r--web/cobrands/oxfordshire/images/tab-green.pngbin819 -> 610 bytes
-rw-r--r--web/cobrands/sass/_report_list_pins.scss4
25 files changed, 21 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
index 3e262a700..7093e80bd 100644
--- a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
@@ -106,12 +106,20 @@ sub reports_ordering {
sub pin_colour {
my ( $self, $p, $context ) = @_;
return 'grey' unless $self->owns_problem( $p );
- return 'grey' if $p->state eq 'not responsible';
- return 'green' if $p->is_fixed || $p->is_closed;
- return 'red' if $p->state eq 'confirmed';
+ return 'grey' if $p->is_closed;
+ return 'green' if $p->is_fixed;
+ return 'yellow' if $p->state eq 'confirmed';
+ return 'orange'; # all the other `open_states` like "in progress"
+}
+
+sub pin_new_report_colour {
return 'yellow';
}
+sub path_to_pin_icons {
+ return '/cobrands/oxfordshire/images/';
+}
+
sub open311_config {
my ($self, $row, $h, $params) = @_;
diff --git a/templates/web/oxfordshire/front/_list-entry.html b/templates/web/oxfordshire/front/_list-entry.html
index 046c3b97f..43d3d6265 100755
--- a/templates/web/oxfordshire/front/_list-entry.html
+++ b/templates/web/oxfordshire/front/_list-entry.html
@@ -1 +1,4 @@
-[% INCLUDE 'report/_item.html' no_fixed = 1 item_extra_class = 'item-list__item--with-pin' %]
+[% INCLUDE 'report/_item.html'
+ no_fixed = 1
+ item_extra_class = 'item-list__item--with-pin ' _ c.cobrand.pin_colour(problem)
+%]
diff --git a/web/cobrands/oxfordshire/_colours.scss b/web/cobrands/oxfordshire/_colours.scss
index b332eb6da..c2de1c9f0 100644
--- a/web/cobrands/oxfordshire/_colours.scss
+++ b/web/cobrands/oxfordshire/_colours.scss
@@ -33,3 +33,5 @@ $oxfordshire_button_base: #F35A0E;
$oxfordshire_button_top: #EC6816;
$oxfordshire_button_bottom: #FE4602;
$oxfordshire_button_border: #CCC;
+
+$pin_prefix: '/cobrands/oxfordshire/images/';
diff --git a/web/cobrands/oxfordshire/images/pin-green-big.png b/web/cobrands/oxfordshire/images/pin-green-big.png
new file mode 100644
index 000000000..07be6bec8
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-green-big.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-green-mini.png b/web/cobrands/oxfordshire/images/pin-green-mini.png
new file mode 100644
index 000000000..c48dc5a5a
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-green-mini.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-green-small.png b/web/cobrands/oxfordshire/images/pin-green-small.png
new file mode 100644
index 000000000..265cf19d0
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-green-small.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-green.png b/web/cobrands/oxfordshire/images/pin-green.png
new file mode 100644
index 000000000..b31e8b99a
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-green.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-grey-big.png b/web/cobrands/oxfordshire/images/pin-grey-big.png
new file mode 100644
index 000000000..324195e51
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-grey-big.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-grey-mini.png b/web/cobrands/oxfordshire/images/pin-grey-mini.png
new file mode 100644
index 000000000..266d8f185
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-grey-mini.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-grey-small.png b/web/cobrands/oxfordshire/images/pin-grey-small.png
new file mode 100644
index 000000000..3c5893396
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-grey-small.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-grey.png b/web/cobrands/oxfordshire/images/pin-grey.png
new file mode 100644
index 000000000..89d03b6f2
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-grey.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-orange-big.png b/web/cobrands/oxfordshire/images/pin-orange-big.png
new file mode 100644
index 000000000..b2f51e1c4
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-orange-big.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-orange-mini.png b/web/cobrands/oxfordshire/images/pin-orange-mini.png
new file mode 100644
index 000000000..3e1e3864d
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-orange-mini.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-orange-small.png b/web/cobrands/oxfordshire/images/pin-orange-small.png
new file mode 100644
index 000000000..b43bd22f2
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-orange-small.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-orange.png b/web/cobrands/oxfordshire/images/pin-orange.png
new file mode 100644
index 000000000..d8acac82a
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-orange.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-shadow-big.png b/web/cobrands/oxfordshire/images/pin-shadow-big.png
new file mode 100644
index 000000000..6baaefb30
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-shadow-big.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-shadow-small.png b/web/cobrands/oxfordshire/images/pin-shadow-small.png
new file mode 100644
index 000000000..33a263af4
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-shadow-small.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-shadow.png b/web/cobrands/oxfordshire/images/pin-shadow.png
new file mode 100644
index 000000000..2185b6dfd
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-shadow.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-spot.png b/web/cobrands/oxfordshire/images/pin-spot.png
new file mode 100644
index 000000000..0f5437622
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-spot.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-yellow-big.png b/web/cobrands/oxfordshire/images/pin-yellow-big.png
new file mode 100644
index 000000000..3a1666a16
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-yellow-big.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-yellow-mini.png b/web/cobrands/oxfordshire/images/pin-yellow-mini.png
new file mode 100644
index 000000000..1647503f6
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-yellow-mini.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-yellow-small.png b/web/cobrands/oxfordshire/images/pin-yellow-small.png
new file mode 100644
index 000000000..f75cc3b4e
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-yellow-small.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/pin-yellow.png b/web/cobrands/oxfordshire/images/pin-yellow.png
new file mode 100644
index 000000000..1809a622b
--- /dev/null
+++ b/web/cobrands/oxfordshire/images/pin-yellow.png
Binary files differ
diff --git a/web/cobrands/oxfordshire/images/tab-green.png b/web/cobrands/oxfordshire/images/tab-green.png
index 7837fed00..ddcd0150c 100644
--- a/web/cobrands/oxfordshire/images/tab-green.png
+++ b/web/cobrands/oxfordshire/images/tab-green.png
Binary files differ
diff --git a/web/cobrands/sass/_report_list_pins.scss b/web/cobrands/sass/_report_list_pins.scss
index cd0b3d5d8..55ef1cf56 100644
--- a/web/cobrands/sass/_report_list_pins.scss
+++ b/web/cobrands/sass/_report_list_pins.scss
@@ -6,6 +6,7 @@ $pin_prefix: '/i/' !default;
a {
background-image: url('#{$pin_prefix}pin-yellow-small.png');
+ background-size: 24px 32px;
background-repeat: no-repeat;
background-position: $left center;
}
@@ -22,6 +23,9 @@ $pin_prefix: '/i/' !default;
&.grey a {
background-image: url('#{$pin_prefix}pin-grey-small.png');
}
+ &.orange a {
+ background-image: url('#{$pin_prefix}pin-orange-small.png');
+ }
}
.item-list--reports__item--selected {
background: $base_bg;