diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 3 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 7 | ||||
-rw-r--r-- | templates/web/zurich/reports/_list-filter-status.html | 7 |
3 files changed, 16 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index 9b33b42b4..d8d52a2d9 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -702,8 +702,9 @@ sub stash_report_filter_status : Private { my @status = $c->get_param_list('status', 1); @status = ($c->stash->{page} eq 'my' ? 'all' : $c->cobrand->on_map_default_status) unless @status; - my %status = map { $_ => 1 } @status; + $c->cobrand->call_hook(hook_report_filter_status => \@status); + my %status = map { $_ => 1 } @status; my %filter_problem_states; my %filter_status; diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 4409cfd7b..9cf1030f0 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -1382,4 +1382,11 @@ sub db_state_migration { } } +sub hook_report_filter_status { + my ($self, $status) = @_; + @$status = map { + $_ eq 'closed' ? ('closed', 'fixed') : $_ + } @$status; +} + 1; diff --git a/templates/web/zurich/reports/_list-filter-status.html b/templates/web/zurich/reports/_list-filter-status.html new file mode 100644 index 000000000..bf56821f6 --- /dev/null +++ b/templates/web/zurich/reports/_list-filter-status.html @@ -0,0 +1,7 @@ +<select class="form-control js-multiple" name="status" id="statuses" multiple + data-all="[% loc('All') %]" data-all-options='["open","closed"]' + [% INCLUDE 'reports/_status_filter_options.html' %] +> + <option value="open"[% ' selected' IF filter_status.open %]>[% prettify_state('confirmed') %]</option> + <option value="closed"[% ' selected' IF filter_status.closed %]>[% prettify_state('closed') %]</option> +</select> |