Commit | Line | Data |
ecb0ebe7 |
1 | package Gitalist::Controller::Fragment::Repository; |
2 | use Moose; |
3 | use namespace::autoclean; |
4 | |
5 | BEGIN { extends 'Catalyst::Controller' } |
6 | with 'Gitalist::URIStructure::Repository'; |
7 | |
066e9aa4 |
8 | sub base : Chained('/fragment/base') PathPart('') CaptureArgs(0) {} |
ecb0ebe7 |
9 | |
10 | after shortlog => sub { |
11 | my ($self, $c) = @_; |
12 | $c->forward('/shortlog'); |
13 | }; |
14 | |
15 | after heads => sub { |
16 | my ($self, $c) = @_; |
17 | $c->stash( |
18 | heads => $c->stash->{Repository}->heads, |
19 | ); |
20 | }; |
21 | |
22 | after log => sub { |
23 | my ($self, $c) = @_; |
24 | $c->stash( |
25 | template => 'log.tt2', |
26 | ); |
27 | $c->forward('/log'); |
28 | }; |
29 | |
30 | __PACKAGE__->meta->make_immutable; |