diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2014-09-18 15:18:18 +0000 |
---|---|---|
committer | Hakim Cassimally <hakim@mysociety.org> | 2014-09-18 15:18:18 +0000 |
commit | 79b789f265b6fd5c6baaa5c2fea6aace5166cfd2 (patch) | |
tree | 1919ac74a2dac8040fccd4c8dfc1ced8a56e87f6 | |
parent | c6bfe99d365c59b140d89eb783048b9a738831ab (diff) |
[EastSussex] pin colours
- yellow for open issues, green otherwise
- pins > 3 months hidden from /around/
- reduced number of pins on /reports/ to 20 (as per Bromley/Hart)
-rw-r--r-- | perllib/FixMyStreet/Cobrand/EastSussex.pm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/EastSussex.pm b/perllib/FixMyStreet/Cobrand/EastSussex.pm index c039b8410..6099d74de 100644 --- a/perllib/FixMyStreet/Cobrand/EastSussex.pm +++ b/perllib/FixMyStreet/Cobrand/EastSussex.pm @@ -110,5 +110,22 @@ sub get_geocoder { return 'OSM'; # default of Bing gives poor results, let's try overriding. } +# for the /around/ page +sub on_map_default_max_pin_age { + return '3 months'; +} + +# for the /reports/ page +sub reports_per_page { return 20; } + +sub pin_colour { + my ( $self, $p, $context ) = @_; + + # TODO refactor to a Moo(se)? lazy attribute + my $open_states = $self->{open_states} ||= $p->open_states; + + return $open_states->{ $p->state } ? 'yellow' : 'green'; +} + 1; |