/
Project.pm
69 lines (45 loc) · 1.31 KB
/
Project.pm
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package App::Kaizendo::Web::Controller::Project;
use Moose;
use namespace::autoclean;
BEGIN { extends 'App::Kaizendo::Web::ControllerBase::REST' }
with qw/
App::Kaizendo::Web::ControllerRole::Aspect
App::Kaizendo::Web::ControllerRole::User
App::Kaizendo::Web::ControllerRole::Comment
/;
# Is chained to the Root controller base method
sub base : Chained('/base') PathPart('') CaptureArgs(0) {
}
=head2 section
FIXME
=cut
sub section : Chained('base') PathPart('') CaptureArgs(1) {
my ( $self, $c, $project_name ) = @_;
my $project = $c->model('Projects')->get_project_by_name( $project_name )
or $c->detach('/error404');
$c->stash( project => $project->latest_snapshot );
}
sub view : Chained('section') PathPart('') Args(0) {
}
__PACKAGE__->config(
action => {
aspect_base => { Chained => 'section' },
user_base => { Chained => 'section' },
comment_base => { Chained => 'section' },
},
);
=head1 NAME
Kaizendo::Controller::Project - Project Controller for Kaizendo
=head1 DESCRIPTION
Handles information about the individual text project.
=head1 METHODS
=head2 base
FIXME
=head2 item
FIXME
=head2 view
FIXME
=head1 AUTHORS, COPYRIGHT AND LICENSE
See L<App::Kaizendo> for Authors, Copyright and License information.
=cut
__PACKAGE__->meta->make_immutable;