diff options
author | Zarino Zappia <mail@zarino.co.uk> | 2016-09-30 16:34:00 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-10-13 19:22:11 +0100 |
commit | a5ef113e2cc3105da41cf5449b505db6fa336c59 (patch) | |
tree | c60d906c0b5dd6fc974a35f8e921ae728dab080c /perllib/FixMyStreet/Map.pm | |
parent | 3872c39f5426165c3abfe397d15dd2a63f731e26 (diff) |
Allow multiple selections in report list filter.
This lets people filter by multiple categories or states. It uses our
jQuery multi-select plugin to turn the <select multiple>s into little
overlay lists of checkboxes. HTML5 history is also supported.
Diffstat (limited to 'perllib/FixMyStreet/Map.pm')
-rw-r--r-- | perllib/FixMyStreet/Map.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm index 5272e3932..f7caf51d7 100644 --- a/perllib/FixMyStreet/Map.pm +++ b/perllib/FixMyStreet/Map.pm @@ -92,9 +92,9 @@ sub map_features { my $around_limit = $c->cobrand->on_map_list_limit || undef; my @around_args = @p{"min_lat", "max_lat", "min_lon", "max_lon", "interval"}; - my $on_map_all = $c->cobrand->problems_on_map->around_map( @around_args, undef, $p{category}, $p{states} ); + my $on_map_all = $c->cobrand->problems_on_map->around_map( @around_args, undef, $p{categories}, $p{states} ); my $on_map_list = $around_limit - ? $c->cobrand->problems_on_map->around_map( @around_args, $around_limit, $p{category}, $p{states} ) + ? $c->cobrand->problems_on_map->around_map( @around_args, $around_limit, $p{categories}, $p{states} ) : $on_map_all; my $dist = FixMyStreet::Gaze::get_radius_containing_population( $p{latitude}, $p{longitude} ); @@ -102,7 +102,7 @@ sub map_features { my $limit = 20; my @ids = map { $_->id } @$on_map_list; my $nearby = $c->model('DB::Nearby')->nearby( - $c, $dist, \@ids, $limit, @p{"latitude", "longitude", "interval", "category", "states"} + $c, $dist, \@ids, $limit, @p{"latitude", "longitude", "interval", "categories", "states"} ); return ( $on_map_all, $on_map_list, $nearby, $dist ); |