aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-02-23 13:58:27 +0000
committerEdmund von der Burg <evdb@mysociety.org>2011-02-23 13:58:27 +0000
commit1498dfdec73becf769c3596bf41185f003c2a4cf (patch)
treeecd6b5d780ad74cede79493a960b3cad4ad0480e /perllib/FixMyStreet/App
parent684ae4edc50c66617abe369233005770192d8170 (diff)
Added About controller
put 'loc' stub in place for i18n in templates server static files
Diffstat (limited to 'perllib/FixMyStreet/App')
-rw-r--r--perllib/FixMyStreet/App/Controller/About.pm31
-rw-r--r--perllib/FixMyStreet/App/Controller/Root.pm12
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm19
3 files changed, 61 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/About.pm b/perllib/FixMyStreet/App/Controller/About.pm
new file mode 100644
index 000000000..42a0ed18e
--- /dev/null
+++ b/perllib/FixMyStreet/App/Controller/About.pm
@@ -0,0 +1,31 @@
+package FixMyStreet::App::Controller::About;
+use Moose;
+use namespace::autoclean;
+
+BEGIN { extends 'Catalyst::Controller'; }
+
+=head1 NAME
+
+FixMyStreet::App::Controller::About - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+=head2 index
+
+=cut
+
+sub index : Path : Args(0) {
+ my ( $self, $c ) = @_;
+
+ # don't need to do anything here - should just pass through.
+}
+
+__PACKAGE__->meta->make_immutable;
+
+1;
diff --git a/perllib/FixMyStreet/App/Controller/Root.pm b/perllib/FixMyStreet/App/Controller/Root.pm
index fc3932975..b61650f79 100644
--- a/perllib/FixMyStreet/App/Controller/Root.pm
+++ b/perllib/FixMyStreet/App/Controller/Root.pm
@@ -16,6 +16,18 @@ FixMyStreet::App::Controller::Root - Root Controller for FixMyStreet::App
=head1 METHODS
+=head2 auto
+
+Set up general things for this instance
+
+=cut
+
+sub auto {
+ my ( $self, $c ) = @_;
+
+ return;
+}
+
=head2 index
The root page (/)
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm
index a201242bc..dcda54db9 100644
--- a/perllib/FixMyStreet/App/View/Web.pm
+++ b/perllib/FixMyStreet/App/View/Web.pm
@@ -11,7 +11,8 @@ __PACKAGE__->config(
INCLUDE_PATH => [ #
FixMyStreet::App->path_to( 'templates', 'web', 'default' ),
],
- render_die => 1,
+ render_die => 1,
+ expose_methods => ['loc'],
);
=head1 NAME
@@ -24,4 +25,20 @@ TT View for FixMyStreet::App.
=cut
+=head2 loc
+
+ [% loc('Some text to localize') %]
+
+Passes the text to the localisation engine for translations.
+
+FIXME - currently just passes through.
+
+=cut
+
+sub loc {
+ my ( $self, $c, @args ) = @_;
+ return join ' ', @args;
+}
+
1;
+