aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ComponentUI/Controller
diff options
context:
space:
mode:
authorgroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2007-09-29 20:40:12 +0000
committergroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2007-09-29 20:40:12 +0000
commit6ab43711ccd779eedce107001b300043e2056a0c (patch)
treeedb162ef7eaaf0aeda8a3e8fac49e4d07a637df8 /lib/ComponentUI/Controller
parentff460bc0b2bc0dc060f45cc8ac9e85d275fabcd0 (diff)
downloadreaction-6ab43711ccd779eedce107001b300043e2056a0c.tar.gz
reaction-6ab43711ccd779eedce107001b300043e2056a0c.zip
It is starting to look like this may actually work after all. Listview is the only one left i think, although the bar tests are still giving me trouble. TODO: add to the collection actions a truncate action. should be useful
Diffstat (limited to 'lib/ComponentUI/Controller')
-rw-r--r--lib/ComponentUI/Controller/Root.pm19
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/ComponentUI/Controller/Root.pm b/lib/ComponentUI/Controller/Root.pm
index 1d7bd58..567cf3b 100644
--- a/lib/ComponentUI/Controller/Root.pm
+++ b/lib/ComponentUI/Controller/Root.pm
@@ -12,15 +12,14 @@ use aliased 'Reaction::UI::ViewPort';
# so they function identically to actions created in MyApp.pm
#
__PACKAGE__->config(
- view_name => 'XHTML',
+ view_name => 'Site',
window_title => 'Reaction Test App',
- content_type => 'text/html',
- namespace => '',
+ namespace => ''
);
sub base :Chained('/') :PathPart('') :CaptureArgs(0) {
my ($self, $c) = @_;
- $self->push_viewport(ViewPort, layout => 'xhtml');
+ $self->push_viewport(ViewPort, layout => 'layout');
}
sub root :Chained('base') :PathPart('') :Args(0) {
@@ -28,4 +27,16 @@ sub root :Chained('base') :PathPart('') :Args(0) {
$self->push_viewport(ViewPort, layout => 'index');
}
+sub static :Chained('base') :PathPart('static') :Args {
+ my ($self, $c, @args) = @_;
+ return if $c->stash->{window}->view->serve_static_file($c, \@args);
+ $c->forward('error_404');
+}
+
+sub error_404 :Private {
+ my ($self, $c) = @_;
+ $c->res->body("Error 404");
+ $c->res->status(404);
+}
+
1;