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 | |
8 | sub base : Chained('/fragment/base') PathPart('') CaptureArgs(0) { |
9 | my ($self, $c) = @_; |
10 | $c->stash(no_wrapper => 1); |
11 | } |
12 | |
13 | after shortlog => sub { |
14 | my ($self, $c) = @_; |
15 | $c->forward('/shortlog'); |
16 | }; |
17 | |
18 | after heads => sub { |
19 | my ($self, $c) = @_; |
20 | $c->stash( |
21 | heads => $c->stash->{Repository}->heads, |
22 | ); |
23 | }; |
24 | |
25 | after log => sub { |
26 | my ($self, $c) = @_; |
27 | $c->stash( |
28 | template => 'log.tt2', |
29 | ); |
30 | $c->forward('/log'); |
31 | }; |
32 | |
33 | __PACKAGE__->meta->make_immutable; |