diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Bromley.pm | 13 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 10 |
3 files changed, 25 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index 60d6d05a9..d5ccb7f3d 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -129,6 +129,8 @@ sub ward : Path : Args(2) { any_zoom => 1, ); + $c->cobrand->tweak_all_reports_map( $c ); + # List of wards unless ($c->stash->{ward}) { my $children = mySociety::MaPit::call('area/children', [ $c->stash->{council}->{id} ], diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm index 1d32784db..026a56feb 100644 --- a/perllib/FixMyStreet/Cobrand/Bromley.pm +++ b/perllib/FixMyStreet/Cobrand/Bromley.pm @@ -88,5 +88,18 @@ sub contact_name { 'Bromley Council (do not reply)'; } sub reports_per_page { return 20; } +sub tweak_all_reports_map { + my $self = shift; + my $c = shift; + + if ( !$c->stash->{ward} ) { + $c->stash->{map}->{longitude} = 0.040622967881348; + $c->stash->{map}->{latitude} = 51.36690161822; + $c->stash->{map}->{any_zoom} = 0; + $c->stash->{map}->{zoom} = 11; + } +} + + 1; diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 569f25a74..ee8a2bf5e 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -783,5 +783,15 @@ sub pin_colour { return $p->is_fixed ? 'green' : 'red'; } +=head2 tweak_all_reports_map + +Used to tweak the display settings of the map on the all reports pages. + +Used in some cobrands to improve the intial display for Internet Explorer. + +=cut + +sub tweak_all_reports_map {} + 1; |