diff options
author | Struan Donald <struan@exo.org.uk> | 2012-05-03 16:43:08 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-05-03 16:43:08 +0100 |
commit | 902f1732363a91570d9a14871ad5894f97fb0233 (patch) | |
tree | 1cf34991ecd27f9476ebd61cf16f5e4a183b208d | |
parent | 836f6a0416927429f974e76bc565a2a70eca1344 (diff) |
correct fixed tag on problem page
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Barnet.pm | 26 | ||||
-rw-r--r-- | web/cobrands/barnet/layout.scss | 10 |
2 files changed, 36 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Barnet.pm b/perllib/FixMyStreet/Cobrand/Barnet.pm index 31b61aa62..13731a66c 100644 --- a/perllib/FixMyStreet/Cobrand/Barnet.pm +++ b/perllib/FixMyStreet/Cobrand/Barnet.pm @@ -28,5 +28,31 @@ sub disambiguate_location { }; } +sub generate_problem_banner { + my ( $self, $problem ) = @_; + + my $banner = {}; + if ( $problem->is_open && time() - $problem->lastupdate_local->epoch > 8 * 7 * 24 * 60 * 60 ) + { + $banner->{id} = 'unknown'; + $banner->{text} = _('Unknown'); + } + if ($problem->is_fixed) { + $banner->{id} = 'fixed'; + $banner->{text} = _('Fixed'); + } + if ($problem->is_closed) { + $banner->{id} = 'closed'; + $banner->{text} = _('Closed'); + } + + if ( grep { $problem->state eq $_ } ( 'investigating', 'in progress', 'planned' ) ) { + $banner->{id} = 'progress'; + $banner->{text} = _('In progress'); + } + + return $banner; +} + 1; diff --git a/web/cobrands/barnet/layout.scss b/web/cobrands/barnet/layout.scss index 749f3dfa5..fc528108a 100644 --- a/web/cobrands/barnet/layout.scss +++ b/web/cobrands/barnet/layout.scss @@ -213,3 +213,13 @@ ol.big-numbers > li::before { color: #C0E8E8; } +.banner { + p { + top: -2em; + } + p#fixed { + padding-top: 4em; + background: #00BD08; + } +} + |