aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm23
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm25
2 files changed, 25 insertions, 23 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index b079ba68e..9826a8945 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -31,29 +31,6 @@ Show the summary page of all reports.
sub index : Path : Args(0) {
my ( $self, $c ) = @_;
- # Zurich goes straight to map page, with all reports
- if ( $c->cobrand->moniker eq 'zurich' ) {
- $c->stash->{page} = 'reports';
- $c->forward( 'stash_report_filter_status' );
- $c->forward( 'load_and_group_problems' );
- $c->stash->{body} = { id => 0 }; # So template can fetch the list
-
- if ($c->get_param('ajax')) {
- $c->detach('ajax', [ 'reports/_problem-list.html' ]);
- }
-
- my $pins = $c->stash->{pins};
- FixMyStreet::Map::display_map(
- $c,
- latitude => @$pins ? $pins->[0]{latitude} : 0,
- longitude => @$pins ? $pins->[0]{longitude} : 0,
- area => 274456,
- pins => $pins,
- any_zoom => 1,
- );
- return 1;
- }
-
if ( $c->cobrand->call_hook('report_page_data') ) {
return 1;
}
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index 817fc48a1..fd0201f02 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -316,6 +316,31 @@ sub get_or_check_overdue {
return $self->overdue($problem);
}
+sub report_page_data {
+ my $self = shift;
+ my $c = $self->{c};
+
+ $c->stash->{page} = 'reports';
+ $c->forward( 'stash_report_filter_status' );
+ $c->forward( 'load_and_group_problems' );
+ $c->stash->{body} = { id => 0 }; # So template can fetch the list
+
+ if ($c->get_param('ajax')) {
+ $c->detach('ajax', [ 'reports/_problem-list.html' ]);
+ }
+
+ my $pins = $c->stash->{pins};
+ FixMyStreet::Map::display_map(
+ $c,
+ latitude => @$pins ? $pins->[0]{latitude} : 0,
+ longitude => @$pins ? $pins->[0]{longitude} : 0,
+ area => 274456,
+ pins => $pins,
+ any_zoom => 1,
+ );
+ return 1;
+}
+
=head1 C<set_problem_state>
If the state has changed, sets the state and calls C::Admin's C<log_edit> action.