diff options
author | Marius Halden <marius.h@lden.org> | 2016-12-15 13:30:16 +0100 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2016-12-15 13:30:16 +0100 |
commit | 013f8244d65af76717146a4951f8cb491ed42157 (patch) | |
tree | 5b341f18687712fbb7229e0b68106d8dc37814c4 | |
parent | c94ed4479f26b6d4cee0bf16cac47a88ee7f6cae (diff) |
Add colours to map markers
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FiksGataMi.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm index 242735073..27b4850c5 100644 --- a/perllib/FixMyStreet/Cobrand/FiksGataMi.pm +++ b/perllib/FixMyStreet/Cobrand/FiksGataMi.pm @@ -28,6 +28,13 @@ sub disambiguate_location { }; } +sub pin_colour { + my ( $self, $p, $context ) = @_; + return 'green' if $p->is_fixed || $p->is_closed; + return 'red' if $p->state eq 'unconfirmed' || $p->state eq 'confirmed'; + return 'yellow'; +} + sub area_types { my $self = shift; return $self->next::method() if FixMyStreet->config('STAGING_SITE') && FixMyStreet->config('SKIP_CHECKS_ON_STAGING'); |