return $obj;
}
-=head2 index
-
-Provides the project listing.
-
-=cut
-
-sub index :Path :Args(0) {
+sub index : Chained('base') PathPart('') Args(0) {
my ( $self, $c ) = @_;
$c->detach($c->req->param('a'))
);
}
-sub project_index : Local {
+# FIXME - WTF is this for?
+sub project_index : Chained('base') Args(0) {
my ( $self, $c ) = @_;
my @list = @{ $c->model()->projects };
=cut
-sub summary : Local {
+sub summary : Chained('base') Args(0) {
my ( $self, $c ) = @_;
my $project = $c->stash->{Project};
$c->detach('error_404') unless $project;
=cut
-sub heads : Local {
+sub heads : Chained('base') Args(0) {
my ( $self, $c ) = @_;
my $project = $c->stash->{Project};
$c->stash(
=cut
-sub tags : Local {
+sub tags : Chained('base') Args(0) {
my ( $self, $c ) = @_;
my $project = $c->stash->{Project};
$c->stash(
);
}
-sub blame : Local {
+sub blame : Chained('base') Args(0) {
my($self, $c) = @_;
my $project = $c->stash->{Project};
=cut
-sub blob : Local {
+sub blob : Chained('base') Args(0) {
my ( $self, $c ) = @_;
my($blob, $head, $filename) = $self->_blob_objs($c);
=cut
-sub blob_plain : Local {
+sub blob_plain : Chained('base') Args(0) {
my($self, $c) = @_;
my($blob) = $self->_blob_objs($c);
=cut
-sub blobdiff_plain : Local {
+sub blobdiff_plain : Chained('base') Args(0) {
my($self, $c) = @_;
$c->stash(no_wrapper => 1);
=cut
-sub blobdiff : Local {
+sub blobdiff : Chained('base') Args(0) {
my ( $self, $c ) = @_;
my $commit = $self->_get_object($c, $c->req->param('hb'));
my $filename = $c->req->param('f')
=cut
-sub commit : Local {
+sub commit : Chained('base') Args(0) {
my ( $self, $c ) = @_;
my $project = $c->stash->{Project};
my $commit = $self->_get_object($c);
=cut
-sub commitdiff : Local {
+sub commitdiff : Chained('base') Args(0) {
my ( $self, $c ) = @_;
my $commit = $self->_get_object($c);
my($tree, $patch) = $c->stash->{Project}->diff(
unless $c->stash->{no_wrapper};
}
-sub commitdiff_plain : Local {
+sub commitdiff_plain : Chained('base') Args(0) {
my($self, $c) = @_;
$c->stash(no_wrapper => 1);
=cut
-sub shortlog : Local {
+sub shortlog : Chained('base') Args(0) {
my ( $self, $c ) = @_;
my $project = $c->stash->{Project};
Calls shortlog internally. Perhaps that should be reversed ...
=cut
-sub log : Local {
+
+sub log : Chained('base') Args(0) {
$_[0]->shortlog($_[1]);
$_[1]->stash->{action} = 'log';
}
# For legacy support.
-sub history : Local {
+sub history : Chained('base') Args(0) {
my ( $self, $c ) = @_;
$self->shortlog($c);
my $project = $c->stash->{Project};
=cut
-sub tree : Local {
+sub tree : Chained('base') Args(0) {
my ( $self, $c ) = @_;
my $project = $c->stash->{Project};
my $commit = $self->_get_object($c, $c->req->param('hb'));
=cut
-sub reflog : Local {
+sub reflog : Chained('base') Args(0) {
my ( $self, $c ) = @_;
my @log = $c->stash->{Project}->reflog(
'--since=yesterday'
=cut
-sub search : Local {
+sub search : Chained('base') Args(0) {
my($self, $c) = @_;
$c->stash(current_action => 'GitRepos');
my $project = $c->stash->{Project};
=cut
-sub search_help : Local {
+sub search_help : Chained('base') Args(0) {
my ($self, $c) = @_;
$c->stash(template => 'search_help.tt2');
}
=cut
-sub atom : Local {
+sub atom : Chained('base') Args(0) {
my($self, $c) = @_;
my $feed = XML::Atom::Feed->new;
=cut
-sub rss : Local {
+sub rss : Chained('base') Args(0) {
my ($self, $c) = @_;
my $project = $c->stash->{Project};
$c->response->status(200);
}
-sub opml : Local {
+sub opml : Chained('base') Args(0) {
my($self, $c) = @_;
my $opml = XML::OPML::SimpleGen->new();
=cut
-sub patch : Local {
+sub patch : Chained('base') Args(0) {
my ($self, $c) = @_;
$c->detach('patches', [1]);
}
=cut
-sub patches : Local {
+sub patches : Chained('base') Args(0) {
my ($self, $c, $count) = @_;
$count ||= Gitalist->config->{patches}{max};
my $commit = $self->_get_object($c);
=cut
-sub snapshot : Local {
+sub snapshot : Chained('base') Args(0) {
my ($self, $c) = @_;
my $format = $c->req->param('sf') || 'tgz';
die unless $format;
$c->response->body($snap[1]);
}
-=head2 auto
-Populate the header and footer. Perhaps not the best location.
-
-=cut
-
-sub auto : Private {
+sub base : Chained('/root') PathPart('') CaptureArgs(0) {
my($self, $c) = @_;
my $project = $c->req->param('p');
);
}
-=head2 end
-
-Attempt to render a view, if needed.
-
-=cut
-
sub end : ActionClass('RenderView') {
my ($self, $c) = @_;
# Give project views the current HEAD.
=head1 METHODS
-=head2 age_string
+=head2 root
+
+Root of chained actions
+
+=head2 base
+
+Populate the header and footer. Perhaps not the best location.
+
+=head2 index
+
+Provides the project listing.
+
+=head2 end
+
+Attempt to render a view, if needed.
=head2 blame