aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-07-07 22:28:21 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-07-14 14:22:24 +0100
commit6f23d7b44ddc2556897e920cb88a3c81357605bf (patch)
tree48be64c12f96048a5df42888f34b0ada91d98a69 /perllib/FixMyStreet/App/Controller/Report.pm
parent863e8b2d548d95b89da068bd3361ce8131f77f55 (diff)
Allow static home page template override.
If an /about/homepage.html template exists in your cobrand, it will be used as the front page, and the normal front page will be available at /report.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm13
1 files changed, 5 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 81abba3ac..040579e9f 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -28,14 +28,11 @@ Redirect to homepage unless C<id> parameter in query, in which case redirect to
sub index : Path('') : Args(0) {
my ( $self, $c ) = @_;
- my $id = $c->get_param('id');
-
- my $uri =
- $id
- ? $c->uri_for( '/report', $id )
- : $c->uri_for('/');
-
- $c->res->redirect($uri);
+ if ($c->stash->{homepage_template}) {
+ $c->stash->{template} = 'index.html';
+ } else {
+ $c->res->redirect('/');
+ }
}
=head2 report_display