diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/View/Web.pm | 4 | ||||
-rw-r--r-- | templates/web/base/admin/problem_row.html | 2 | ||||
-rw-r--r-- | templates/web/base/admin/state_groups_select.html | 2 | ||||
-rw-r--r-- | templates/web/base/report/_item.html | 2 | ||||
-rw-r--r-- | templates/web/base/report/_state_select_field.html | 4 | ||||
-rw-r--r-- | templates/web/base/report/inspect/state_groups_select.html | 2 | ||||
-rw-r--r-- | templates/web/oxfordshire/report/inspect/state_groups_select.html | 2 |
8 files changed, 10 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 775328559..499bd55e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Update map size if an extra column has appeared. - Improve performance of various pages. #1799 - Duplicate list not loading when phone number present. #1803 + - Don't list multiple fixed states all as Fixed in dropdown. #1824 - Development improvements: - `switch-site` script to automate switching config.yml files. #1741 - `make_css --watch` can run custom script after each compilation. 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; } diff --git a/templates/web/base/admin/problem_row.html b/templates/web/base/admin/problem_row.html index def6ce60f..79461367e 100644 --- a/templates/web/base/admin/problem_row.html +++ b/templates/web/base/admin/problem_row.html @@ -30,7 +30,7 @@ [%- END -%] <br>[% problem.cobrand %]<br>[% problem.cobrand_data | html %] </td> - <td>[% prettify_state(problem.state) %]<br><small> + <td>[% prettify_state(problem.state, 1) %]<br><small> [% loc('Created') %]: [% PROCESS format_time time=problem.created %] <br>[% loc('When sent') %]: [% PROCESS format_time time=problem.whensent %] [%- IF problem.is_visible %]<br>[% loc('Confirmed:' ) %] [% PROCESS format_time time=problem.confirmed %][% END -%] diff --git a/templates/web/base/admin/state_groups_select.html b/templates/web/base/admin/state_groups_select.html index 9a70cd2c9..87674c47d 100644 --- a/templates/web/base/admin/state_groups_select.html +++ b/templates/web/base/admin/state_groups_select.html @@ -1,3 +1,3 @@ [% PROCESS 'admin/report_blocks.html'; # For state_groups %] [% DEFAULT current_state = problem.state %] -[% INCLUDE 'report/_state_select_field.html' %] +[% INCLUDE 'report/_state_select_field.html' single_fixed=0 %] diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html index 153fbf58e..3f5c5464b 100644 --- a/templates/web/base/report/_item.html +++ b/templates/web/base/report/_item.html @@ -94,7 +94,7 @@ </div> <div> <h4>[% loc('State') %]</h4> - <p>[% prettify_state(problem.state) %]</p> + <p>[% prettify_state(problem.state, 1) %]</p> </div> <div> <h4>[% loc('Priority') %]</h4> diff --git a/templates/web/base/report/_state_select_field.html b/templates/web/base/report/_state_select_field.html index c580c897d..0f6d8faf6 100644 --- a/templates/web/base/report/_state_select_field.html +++ b/templates/web/base/report/_state_select_field.html @@ -9,12 +9,12 @@ [% END ~%] [% END ~%] [% IF NOT found ~%] - <option selected value="[% current_state %]">[% prettify_state(current_state) %]</option> + <option selected value="[% current_state %]">[% prettify_state(current_state, single_fixed) %]</option> [% END ~%] [% FOREACH group IN state_groups %] <optgroup label="[% group.0 %]"> [% FOREACH state IN group.1 %] - <option [% 'selected ' IF state == current_state %]value="[% state %]">[% prettify_state(state) %]</option> + <option [% 'selected ' IF state == current_state %]value="[% state %]">[% prettify_state(state, single_fixed) %]</option> [% END %] </optgroup> [% END %] diff --git a/templates/web/base/report/inspect/state_groups_select.html b/templates/web/base/report/inspect/state_groups_select.html index af41c6770..2cf1a4de5 100644 --- a/templates/web/base/report/inspect/state_groups_select.html +++ b/templates/web/base/report/inspect/state_groups_select.html @@ -9,4 +9,4 @@ SET state_groups = [ %] [% DEFAULT current_state = problem.state %] -[% INCLUDE 'report/_state_select_field.html' %] +[% INCLUDE 'report/_state_select_field.html' single_fixed=1 %] diff --git a/templates/web/oxfordshire/report/inspect/state_groups_select.html b/templates/web/oxfordshire/report/inspect/state_groups_select.html index a5fce525c..d36fb0191 100644 --- a/templates/web/oxfordshire/report/inspect/state_groups_select.html +++ b/templates/web/oxfordshire/report/inspect/state_groups_select.html @@ -9,4 +9,4 @@ SET state_groups = [ %] [% DEFAULT current_state = problem.state %] -[% INCLUDE 'report/_state_select_field.html' %] +[% INCLUDE 'report/_state_select_field.html' single_fixed=1 %] |