diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-02-24 17:08:47 +0000 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-02-24 17:08:47 +0000 |
commit | e8413b70e5767ed5c9e7adab2233529d4dc4b515 (patch) | |
tree | c95624d0001ae17280006d36b0122d8d0752509e /perllib/FixMyStreet/App/Controller/FAQ.pm | |
parent | 76d9c70173c1daa94de7b7beb18dd04a638b86dd (diff) |
Ported the FAQ accross
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/FAQ.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/FAQ.pm | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/FAQ.pm b/perllib/FixMyStreet/App/Controller/FAQ.pm new file mode 100644 index 000000000..6b8fb1191 --- /dev/null +++ b/perllib/FixMyStreet/App/Controller/FAQ.pm @@ -0,0 +1,35 @@ +package FixMyStreet::App::Controller::FAQ; +use Moose; +use namespace::autoclean; + +BEGIN { extends 'Catalyst::Controller'; } + +=head1 NAME + +FixMyStreet::App::Controller::FAQ - Catalyst Controller + +=head1 DESCRIPTION + +Show the FAQ page - does some smarts to choose the correct template depending on +language. + +=cut + +sub faq : Path : 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; +} + +__PACKAGE__->meta->make_immutable; + +1; |