aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/Cobrand/Barnet.pm26
-rw-r--r--web/cobrands/barnet/layout.scss10
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;
+ }
+}
+