summary refs log tree commit diff
path: root/lib/intentioncloud/Controller/Root.pm
blob: dda009205e9fbc06bfeb1ae27a5f4bbef7c96ceb (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
32
33
34
35
36
37
38
39
40
41
package intentioncloud::Controller::Root;

use strict;
use warnings;
use parent 'Catalyst::Controller';

__PACKAGE__->config->{ namespace } = '';

sub about : Local {
    my ( $self, $c ) = @_;
    $c->stash->{ template } = 'others/what.tt';
}

sub who : Local {
    my ( $self, $c ) = @_;
    $c->stash->{ template } = 'others/who.tt';
}

sub why : Local {
    my ( $self, $c ) = @_;
    $c->stash->{ template } = 'others/why.tt';
}

sub how : Local {
    my ( $self, $c ) = @_;
    $c->stash->{ template } = 'others/how.tt';
}

sub index : Local {
    my ( $self, $c ) = @_;
    $c->stash->{ template } = 'cloud/search.tt';
    $c->stash( last_clouds =>
            [ $c->model( 'DB::Search' )->search()->slice( 0, 2 ) ] );
}

sub end : ActionClass('RenderView') {
    my ( $self, $c ) = @_;
    $c->forward('intentioncloud::View::TT');
}

1;