aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Static.pm
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2016-03-28 20:38:28 +0200
committerMarius Halden <marius.h@lden.org>2016-03-28 20:38:28 +0200
commit6c1118dbf2c4b15bcfcd77600d36f2389428c75e (patch)
treeda81756a344a89502df5479b860b6f4a24b6ed92 /perllib/FixMyStreet/App/Controller/Static.pm
parenta2d67ca6de255ff04badb7cb5a62f7d3df3ce293 (diff)
parent4345263c9de752454795ad57323e684e41e702a8 (diff)
Merge tag 'v1.8.1' into fiksgatami-dev
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Static.pm')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Static.pm51
1 files changed, 9 insertions, 42 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Static.pm b/perllib/FixMyStreet/App/Controller/Static.pm
index d91a07fea..5054809c7 100755
--- a/perllib/FixMyStreet/App/Controller/Static.pm
+++ b/perllib/FixMyStreet/App/Controller/Static.pm
@@ -10,56 +10,23 @@ FixMyStreet::App::Controller::Static - Catalyst Controller
=head1 DESCRIPTION
-Static pages Catalyst Controller. FAQ does some smarts to choose the correct
-template depending on language, will need extending at some point.
+Old static pages Catalyst Controller.
=head1 METHODS
=cut
-sub about : Global : Args(0) {
- my ( $self, $c ) = @_;
-
- my $lang_code = $c->stash->{lang_code};
- my $template = "static/about-$lang_code.html";
- $c->stash->{template} = $template;
-}
-
-sub privacy : Global : Args(0) {
+sub about_redirect : Private {
my ( $self, $c ) = @_;
+ $c->res->redirect( $c->uri_for_action('/about/page', [ $c->action->name ] ));
}
-sub faq : Global : Args(0) {
- my ( $self, $c ) = @_;
-
- # There should be a faq template for each language in a cobrand or default.
- # This is because putting the FAQ translations into the PO files is
- # overkill.
-
- # We rely on the list of languages for the site being restricted so that there
- # will be a faq template for that language/cobrand combo.
-
- my $lang_code = $c->stash->{lang_code};
- my $template = "faq/faq-$lang_code.html";
- $c->stash->{template} = $template;
-}
-
-sub fun : Global : Args(0) {
- my ( $self, $c ) = @_;
- # don't need to do anything here - should just pass through.
-}
-
-sub posters : Global : Args(0) {
- my ( $self, $c ) = @_;
-}
-
-sub iphone : Global : Args(0) {
- my ( $self, $c ) = @_;
-}
-
-sub council : Global : Args(0) {
- my ( $self, $c ) = @_;
-}
+sub faq : Global : Args(0) { $_[1]->forward('/about/page', ['faq']) }
+sub privacy : Global : Args(0) { $_[1]->detach('about_redirect') }
+sub fun : Global : Args(0) { $_[1]->detach('about_redirect') }
+sub posters : Global : Args(0) { $_[1]->detach('about_redirect') }
+sub iphone : Global : Args(0) { $_[1]->detach('about_redirect') }
+sub council : Global : Args(0) { $_[1]->detach('about_redirect') }
sub unresponsive : Global : Args(0) {
my ( $self, $c ) = @_;