diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index 4b4a11c8b..7df33f604 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -120,6 +120,16 @@ sub ward : Path : Args(2) { $c->stash->{stats} = $c->cobrand->get_report_stats(); + $c->stash->{filter_status} = $c->cobrand->on_map_default_status; + my $status = $c->req->param('status') || ''; + if ( !defined $c->cobrand->on_map_default_states || $status eq 'all' ) { + $c->stash->{filter_status} = 'all'; + } elsif ( $status eq 'open' ) { + $c->stash->{filter_status} = 'open'; + } elsif ( $status eq 'fixed' ) { + $c->stash->{filter_status} = 'fixed'; + } + my $pins = $c->stash->{pins}; $c->stash->{page} = 'reports'; # So the map knows to make clickable pins |