diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-08-25 21:57:39 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-08-29 09:52:03 +0100 |
commit | 4ca7c78c3a3edabbb7466bfd7d519be83d11a89a (patch) | |
tree | 9d91b16d97d573403dd0164fc5765aadcedfd4fa /perllib/FixMyStreet/App/View/Web.pm | |
parent | 7fb251eb773782e1b0faccc41b5e2aee8f3db18c (diff) |
Show "Fixed" for fixed states only when warranted.
There were a couple of places where the three fixed states were all
displaying as "Fixed" in a dropdown.
Diffstat (limited to 'perllib/FixMyStreet/App/View/Web.pm')
-rw-r--r-- | perllib/FixMyStreet/App/View/Web.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm index fe200a8fc..93c459e26 100644 --- a/perllib/FixMyStreet/App/View/Web.pm +++ b/perllib/FixMyStreet/App/View/Web.pm @@ -169,12 +169,12 @@ sub decode { } sub prettify_state { - my ($self, $c, $text) = @_; + my ($self, $c, $text, $single_fixed) = @_; # New template to prevent interaction with current one my $tt = FixMyStreet::Template->new({ INCLUDE_PATH => $self->{include_path} }); my $var; $tt->process('report/state-list.html', { state => $text }, \$var); - $var =~ s/ - .*//; + $var =~ s/ - .*// if $single_fixed; return $var; } |