diff options
author | Dave Arter <davea@mysociety.org> | 2016-04-15 17:49:13 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2016-07-08 15:30:41 +0100 |
commit | 8a8b34b66dbdb9d2ce9c5b2d00318d75ef93d267 (patch) | |
tree | 94158b497072156c273f442ce19888665a205a2c /perllib/FixMyStreet/Cobrand/Default.pm | |
parent | 18b68734f0d425875a4e3abbd4416a7952d1089f (diff) |
[UK Councils] Show all reports on cobrand /around map
There is a concern that excluding district council reports from a two-tier
council's cobrand's /around page might lead to duplicate reports or reports
never being seen.
This commit adds them to the map and the sidebar and displays the destination
council in the report list item. Clicking the pin or the report link leads to
the report on FMS.com.
Reports sent to the a council other than the the active cobrand are shown as
grey pins on the map, and the receiving council's name is shown in the sidebar
list.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/Default.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 65c97f38b..36313cf63 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -74,6 +74,18 @@ sub problems { return $self->problems_restriction($self->{c}->model('DB::Problem')); } +=head1 problems_on_map + +Returns a ResultSet of Problems to be shown on the /around map, potentially +restricted to a subset if we're on a cobrand that only wants some of the data. + +=cut + +sub problems_on_map { + my $self = shift; + return $self->problems_on_map_restriction($self->{c}->model('DB::Problem')); +} + =head1 updates Returns a ResultSet of Comments, potentially restricted to a subset if we're on @@ -115,6 +127,19 @@ sub categories_restriction { return $rs; } + +=head1 problems_on_map_restriction + +Used to restricts reports shown on the /around map in a cobrand in a particular way. Do +nothing by default. + +=cut + +sub problems_on_map_restriction { + my ($self, $rs) = @_; + return $rs; +} + sub site_key { return 0; } =head2 restriction |