aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand
diff options
context:
space:
mode:
authorHakim Cassimally <hakim@mysociety.org>2015-02-09 18:01:32 +0000
committerDave Arter <davea@mysociety.org>2015-10-06 09:09:24 +0100
commit34f3f5a36b6773ad51060256d4e95efd7c45b3c8 (patch)
tree5e656a15cc0bda3f930dc019d4dff664b8e035ac /perllib/FixMyStreet/Cobrand
parent2ff36453ebaa86e7f58f17ec63d2f95a88b8be99 (diff)
[Zurich] new status flags
Have moved the generation of banner text from the template into problem_as_hashref See mysociety/FixMyStreet-Commercial#672
Diffstat (limited to 'perllib/FixMyStreet/Cobrand')
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index 6b362d5a2..c08d48161 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -135,16 +135,35 @@ sub problem_as_hashref {
$hashref->{title} = _('This report is awaiting moderation.');
$hashref->{state} = 'submitted';
$hashref->{state_t} = _('Submitted');
+ $hashref->{banner_id} = 'closed';
} else {
if ( $problem->state eq 'confirmed' ) {
$hashref->{state} = 'open';
$hashref->{state_t} = _('Open');
+ $hashref->{banner_id} = 'closed';
+ } elsif ( $problem->state eq 'closed' ) {
+ $hashref->{state} = 'extern'; # is this correct?
+ $hashref->{banner_id} = 'closed';
+ $hashref->{state_t} = _('Extern');
+ } elsif ( $problem->state eq 'unable to fix' ) {
+ $hashref->{state} = 'jurisdiction unknown'; # is this correct?
+ $hashref->{state_t} = _('Jurisdiction Unknown');
+ $hashref->{banner_id} = 'fixed'; # green
+ } elsif ( $problem->state eq 'partial' ) {
+ $hashref->{state} = 'not contactable'; # is this correct?
+ $hashref->{state_t} = _('Not contactable');
+ # no banner_id as hidden
+ } elsif ( $problem->state eq 'investigating' ) {
+ $hashref->{state} = 'wish'; # is this correct?
+ $hashref->{state_t} = _('Wish');
} elsif ( $problem->is_fixed ) {
$hashref->{state} = 'closed';
+ $hashref->{banner_id} = 'fixed';
$hashref->{state_t} = _('Closed');
} elsif ( $problem->state eq 'in progress' || $problem->state eq 'planned' ) {
$hashref->{state} = 'in progress';
$hashref->{state_t} = _('In progress');
+ $hashref->{banner_id} = 'progress';
}
}