X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FGitalist%2FController%2FFragment%2FRepository.pm;h=4f64c5cb6f7ec4bd48cd7398f2061ca9c799b460;hb=2298d93ff984748b0c15d19bad6fdebb1d81c4f1;hp=cee32d9a2cc6a807f70525a92f8f3fe3712953e0;hpb=ecb0ebe7c64899b8fd307ae2dcef609fb2811a7d;p=catagits%2FGitalist.git diff --git a/lib/Gitalist/Controller/Fragment/Repository.pm b/lib/Gitalist/Controller/Fragment/Repository.pm index cee32d9..4f64c5c 100644 --- a/lib/Gitalist/Controller/Fragment/Repository.pm +++ b/lib/Gitalist/Controller/Fragment/Repository.pm @@ -2,18 +2,13 @@ package Gitalist::Controller::Fragment::Repository; use Moose; use namespace::autoclean; -BEGIN { extends 'Catalyst::Controller' } -with 'Gitalist::URIStructure::Repository'; +BEGIN { extends 'Gitalist::Controller' } +with qw/ + Gitalist::URIStructure::Repository + Gitalist::URIStructure::Fragment::WithLog +/; -sub base : Chained('/fragment/base') PathPart('') CaptureArgs(0) { - my ($self, $c) = @_; - $c->stash(no_wrapper => 1); -} - -after shortlog => sub { - my ($self, $c) = @_; - $c->forward('/shortlog'); -}; +sub base : Chained('/fragment/base') PathPart('') CaptureArgs(0) {} after heads => sub { my ($self, $c) = @_; @@ -22,12 +17,23 @@ after heads => sub { ); }; -after log => sub { - my ($self, $c) = @_; - $c->stash( - template => 'log.tt2', - ); - $c->forward('/log'); +=encoding UTF-8 + +=head1 NAME + +Gitalist::Controller::Fragment::Repository - Fragment::Repository module for Gitalist::Controller + +=head2 tags + +The current list of tags in the repo. + +=cut + +after tags => sub { + my ( $self, $c ) = @_; + $c->stash( + tags => $c->stash->{Repository}->tags, + ); }; __PACKAGE__->meta->make_immutable;