diff options
author | Zarino Zappia <mail@zarino.co.uk> | 2017-05-26 12:32:49 +0100 |
---|---|---|
committer | Zarino Zappia <mail@zarino.co.uk> | 2017-06-09 13:38:35 +0100 |
commit | 831943b1320841f3b9383c1e493840f9f657744c (patch) | |
tree | 805f92fff42b24f4911eb76387f8f1127286b2ff | |
parent | 1b15964af653b66d755ce2bd20ece76b960a44d4 (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
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 Binary files differnew file mode 100644 index 000000000..07be6bec8 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-green-big.png diff --git a/web/cobrands/oxfordshire/images/pin-green-mini.png b/web/cobrands/oxfordshire/images/pin-green-mini.png Binary files differnew file mode 100644 index 000000000..c48dc5a5a --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-green-mini.png diff --git a/web/cobrands/oxfordshire/images/pin-green-small.png b/web/cobrands/oxfordshire/images/pin-green-small.png Binary files differnew file mode 100644 index 000000000..265cf19d0 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-green-small.png diff --git a/web/cobrands/oxfordshire/images/pin-green.png b/web/cobrands/oxfordshire/images/pin-green.png Binary files differnew file mode 100644 index 000000000..b31e8b99a --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-green.png diff --git a/web/cobrands/oxfordshire/images/pin-grey-big.png b/web/cobrands/oxfordshire/images/pin-grey-big.png Binary files differnew file mode 100644 index 000000000..324195e51 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-grey-big.png diff --git a/web/cobrands/oxfordshire/images/pin-grey-mini.png b/web/cobrands/oxfordshire/images/pin-grey-mini.png Binary files differnew file mode 100644 index 000000000..266d8f185 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-grey-mini.png diff --git a/web/cobrands/oxfordshire/images/pin-grey-small.png b/web/cobrands/oxfordshire/images/pin-grey-small.png Binary files differnew file mode 100644 index 000000000..3c5893396 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-grey-small.png diff --git a/web/cobrands/oxfordshire/images/pin-grey.png b/web/cobrands/oxfordshire/images/pin-grey.png Binary files differnew file mode 100644 index 000000000..89d03b6f2 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-grey.png diff --git a/web/cobrands/oxfordshire/images/pin-orange-big.png b/web/cobrands/oxfordshire/images/pin-orange-big.png Binary files differnew file mode 100644 index 000000000..b2f51e1c4 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-orange-big.png diff --git a/web/cobrands/oxfordshire/images/pin-orange-mini.png b/web/cobrands/oxfordshire/images/pin-orange-mini.png Binary files differnew file mode 100644 index 000000000..3e1e3864d --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-orange-mini.png diff --git a/web/cobrands/oxfordshire/images/pin-orange-small.png b/web/cobrands/oxfordshire/images/pin-orange-small.png Binary files differnew file mode 100644 index 000000000..b43bd22f2 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-orange-small.png diff --git a/web/cobrands/oxfordshire/images/pin-orange.png b/web/cobrands/oxfordshire/images/pin-orange.png Binary files differnew file mode 100644 index 000000000..d8acac82a --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-orange.png diff --git a/web/cobrands/oxfordshire/images/pin-shadow-big.png b/web/cobrands/oxfordshire/images/pin-shadow-big.png Binary files differnew file mode 100644 index 000000000..6baaefb30 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-shadow-big.png diff --git a/web/cobrands/oxfordshire/images/pin-shadow-small.png b/web/cobrands/oxfordshire/images/pin-shadow-small.png Binary files differnew file mode 100644 index 000000000..33a263af4 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-shadow-small.png diff --git a/web/cobrands/oxfordshire/images/pin-shadow.png b/web/cobrands/oxfordshire/images/pin-shadow.png Binary files differnew file mode 100644 index 000000000..2185b6dfd --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-shadow.png diff --git a/web/cobrands/oxfordshire/images/pin-spot.png b/web/cobrands/oxfordshire/images/pin-spot.png Binary files differnew file mode 100644 index 000000000..0f5437622 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-spot.png diff --git a/web/cobrands/oxfordshire/images/pin-yellow-big.png b/web/cobrands/oxfordshire/images/pin-yellow-big.png Binary files differnew file mode 100644 index 000000000..3a1666a16 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-yellow-big.png diff --git a/web/cobrands/oxfordshire/images/pin-yellow-mini.png b/web/cobrands/oxfordshire/images/pin-yellow-mini.png Binary files differnew file mode 100644 index 000000000..1647503f6 --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-yellow-mini.png diff --git a/web/cobrands/oxfordshire/images/pin-yellow-small.png b/web/cobrands/oxfordshire/images/pin-yellow-small.png Binary files differnew file mode 100644 index 000000000..f75cc3b4e --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-yellow-small.png diff --git a/web/cobrands/oxfordshire/images/pin-yellow.png b/web/cobrands/oxfordshire/images/pin-yellow.png Binary files differnew file mode 100644 index 000000000..1809a622b --- /dev/null +++ b/web/cobrands/oxfordshire/images/pin-yellow.png diff --git a/web/cobrands/oxfordshire/images/tab-green.png b/web/cobrands/oxfordshire/images/tab-green.png Binary files differindex 7837fed00..ddcd0150c 100644 --- a/web/cobrands/oxfordshire/images/tab-green.png +++ b/web/cobrands/oxfordshire/images/tab-green.png 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; |