aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ComponentUI/Controller/Root.pm
blob: 1d7bd584f5d918395fcec22ec77a7ba460ac01d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package ComponentUI::Controller::Root;

use strict;
use warnings;
use base 'Reaction::UI::RootController';
use Reaction::Class;

use aliased 'Reaction::UI::ViewPort';

#
# Sets the actions in this controller to be registered with no prefix
# so they function identically to actions created in MyApp.pm
#
__PACKAGE__->config(
  view_name => 'XHTML',
  window_title => 'Reaction Test App',
  content_type => 'text/html',
  namespace => '',
);

sub base :Chained('/') :PathPart('') :CaptureArgs(0) {
  my ($self, $c) = @_;
  $self->push_viewport(ViewPort, layout => 'xhtml');
}

sub root :Chained('base') :PathPart('') :Args(0) {
  my ($self, $c) = @_;
  $self->push_viewport(ViewPort, layout => 'index');
}

1;