aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand/Default.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/Default.pm')
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm16
1 files changed, 13 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 134111076..69718f613 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -894,14 +894,24 @@ sub generate_problem_banner {
my ( $self, $problem ) = @_;
my $banner = {};
- if ($problem->state eq 'confirmed' && time() - $problem->lastupdate_local->epoch > 8*7*24*60*60) {
- $banner->{id} = 'unknown';
+ if ( $problem->is_open && time() - $problem->lastupdate_local->epoch > 8 * 7 * 24 * 60 * 60 )
+ {
+ $banner->{id} = 'unknown';
$banner->{text} = _('This problem is old and of unknown status.');
}
- if ($problem->state eq 'fixed') {
+ if ($problem->is_fixed) {
$banner->{id} = 'fixed';
$banner->{text} = _('This problem has been fixed') . '.';
}
+ if ($problem->is_closed) {
+ $banner->{id} = 'closed';
+ $banner->{text} = _('This problem has been closed') . '.';
+ }
+
+ if ( grep { $problem->state eq $_ } ( 'investigating', 'in progress', 'planned' ) ) {
+ $banner->{id} = 'progress';
+ $banner->{text} = _('This problem is in progress') . '.';
+ }
return $banner;
}