return $uri;
};
+around uri_for_action => sub {
+ my ($orig, $c) = (shift, shift);
+ my $uri = $c->$orig(@_);
+ $$uri =~ s[/fragment\b][] if defined $uri;
+ return $uri;
+};
+
+sub uri_with {
+ my ($self, @args) = @_;
+ my $uri = $self->request->uri_with(@args);
+ # Wow this awful.
+ $uri =~ s[/fragment\b][];
+ return $uri;
+}
+
1;
__END__
before 'execute' => sub {
my ($self, $controller, $c, @args) = @_;
- $c->stash->{filename} = join('/', @args) || '';
+ $c->stash->{filename} = join('/', @args) || ''
+ unless $c->stash->{filename};
};
1;
$line{sha1} = $line{sha1dst};
$line{is_new} = $line{sha1src} =~ /^0+$/
if $line{sha1src};
- @line{qw/status sim/} = $line{status} =~ /(R)(\d+)/
+ @line{qw/status sim/} = $line{status} =~ /(R)0*(\d+)/
if $line{status} =~ /^R/;
push @ret, \%line;
}
);
my $page = $c->req->param('pg') || 0;
- $logargs{skip} = $c->req->param('pg') * $logargs{count}
- if $c->req->param('pg');
+ $logargs{skip} = abs $page * $logargs{count}
+ if $page;
+
$c->stash(
+ page => $page,
log_lines => [$repository->list_revs(%logargs)],
refs => $repository->references,
);
[% INCLUDE 'nav/actions.tt2' object = commit %]
-[% subinclude('/fragment/' _ c.action, c.req.captures) %]
+[% subinclude('/fragment/' _ c.action, c.req.captures, c.req.parameters) %]
<head>
<!-- git core binaries version [% git_version %] -->
<meta charset="utf-8">
- <meta name="generator" content="gitweb/[% version %] git/[% git_version %][% mod_perl_version %]">
+ <meta name="generator" content="gitweb/[% version %] git/[% git_version %]">
<meta name="robots" content="index, nofollow">
<title>[%# FIXME - MING %][%-
title = BLOCK;
c.config.sitename;
IF Repository; ' - ' _ Repository.name | html; END;
- IF c.action; ' / ' _ c.action; END;
- IF filename; ' - ' _ filename | html; END;
+ IF c.action; ' / ' _ c.action; END;
+ IF filename; ' - ' _ filename | html; END;
IF c.action && c.action == 'tree'; '/'; END;
END;
title;
<div id='the-container'>
-[% site_header %]
-
<div id="page-header">
<a title="git homepage" href="http://git-scm.org">
<img src="[% c.uri_for('/logo.png') %]" alt="git" class="logo">
</a>
- <a href="[% c.uri_for('/') %]">A Gitalist</a>
- [%- IF Repository %]
- / <a href="[% c.uri_for_action('/repository/summary', [Repository.name]) %]">[% Repository.name %]</a>
- [%
- INCLUDE 'nav/search.tt2';
- END; %]
+ <div id='header-title'>
+ <a href="[% c.uri_for('/') %]">A Gitalist</a>
+ [%- IF Repository %]
+ / <a href="[% c.uri_for_action('/repository/summary', [Repository.name]) %]">[% Repository.name %]</a>
+ [%# INCLUDE 'nav/branches.tt2' %]
+ </div>
+ [% INCLUDE 'nav/search.tt2' %]
+ [% END %]
</div>
<div id='body'>
-[%
- content;
-%]
+[% content %]
</div>
<div id="page-footer">