aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-23 16:07:43 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-23 16:07:43 +0100
commit46848a1dd7a7e33cb8953df334f434d0450b5651 (patch)
tree676968cb3e7b4eddffcc63572a2067593ed1fc4d
parent159fa8ad9e2427d8b20586baec4c260a0c71b57c (diff)
in progress banner
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm5
-rw-r--r--t/app/controller/report_display.t24
-rw-r--r--web/css/core.css7
-rw-r--r--web/css/core.scss6
4 files changed, 42 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index b226b5868..878e98c10 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -836,6 +836,11 @@ sub generate_problem_banner {
$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;
}
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t
index 49b524b44..fc844e31c 100644
--- a/t/app/controller/report_display.t
+++ b/t/app/controller/report_display.t
@@ -259,6 +259,30 @@ for my $test (
banner_text => 'This problem has been closed.',
fixed => 0
},
+ {
+ description => 'investigating report',
+ date => DateTime->now,
+ state => 'investigating',
+ banner_id => 'progress',
+ banner_text => 'This problem is in progress.',
+ fixed => 0
+ },
+ {
+ description => 'planned report',
+ date => DateTime->now,
+ state => 'planned',
+ banner_id => 'progress',
+ banner_text => 'This problem is in progress.',
+ fixed => 0
+ },
+ {
+ description => 'in progressreport',
+ date => DateTime->now,
+ state => 'in progress',
+ banner_id => 'progress',
+ banner_text => 'This problem is in progress.',
+ fixed => 0
+ },
) {
subtest "banner for $test->{description}" => sub {
$report->confirmed( $test->{date}->ymd . ' ' . $test->{date}->hms );
diff --git a/web/css/core.css b/web/css/core.css
index 474480cc8..39f448b8c 100644
--- a/web/css/core.css
+++ b/web/css/core.css
@@ -203,6 +203,13 @@
position: relative;
background-color: #ccccff;
border: solid 2px #000099; }
+#mysociety #progress {
+ margin: 0 530px 1em 0;
+ padding: 5px;
+ text-align: center;
+ position: relative;
+ background-color: #ffffcc;
+ border: solid 2px #999900; }
#mysociety #updates div {
padding: 0 0 0.5em;
margin: 0 0 0.25em;
diff --git a/web/css/core.scss b/web/css/core.scss
index 93ff70435..1c9d5f451 100644
--- a/web/css/core.scss
+++ b/web/css/core.scss
@@ -309,6 +309,12 @@ $map_width: 500px;
border: solid 2px #000099;
}
+ #progress {
+ @include problem-banner;
+ background-color: #ffffcc;
+ border: solid 2px #999900;
+ }
+
#updates {
div {
padding: 0 0 0.5em;