diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-10 14:56:00 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-10 14:56:00 +0100 |
commit | 391ca1c469d93bb2c4798cc15e56fc495b5e80dd (patch) | |
tree | 6bc90fae589de824095e668fbf510ef259935729 /perllib/FixMyStreet/App/Controller/Static.pm | |
parent | 7c96f8ec61d6eddc211f3f0e71cdb276c6a5f773 (diff) | |
parent | 860383f0de3287b0666d64a3ffff3db3a0f087ae (diff) |
Merge branch 'migrate_to_catalyst' into reportemptyhomes
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Static.pm')
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Static.pm | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Static.pm b/perllib/FixMyStreet/App/Controller/Static.pm new file mode 100755 index 000000000..2e6bda28c --- /dev/null +++ b/perllib/FixMyStreet/App/Controller/Static.pm @@ -0,0 +1,56 @@ +package FixMyStreet::App::Controller::Static; +use Moose; +use namespace::autoclean; + +BEGIN { extends 'Catalyst::Controller'; } + +=head1 NAME + +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. + +=head1 METHODS + +=cut + +sub about : Global : Args(0) { + my ( $self, $c ) = @_; + # don't need to do anything here - should just pass through. +} + +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 ) = @_; +} + +__PACKAGE__->meta->make_immutable; + +1; + |