: $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=$_$arg{$_}")}, "$_")
}
@navs);
- print "<br/>$extra<br/>\n" .
+ print "<br/>\n$extra<br/>\n" .
"</div>\n";
}
+sub git_get_paging_nav {
+ my ($action, $hash, $head, $page, $nrevs) = @_;
+ my $paging_nav;
+
+
+ if ($hash ne $head || $page) {
+ $paging_nav .= $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=$action")}, "HEAD");
+ } else {
+ $paging_nav .= "HEAD";
+ }
+
+ if ($page > 0) {
+ $paging_nav .= " ⋅ " .
+ $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=$action;h=$hash;pg=" . ($page-1)),
+ -accesskey => "p", -title => "Alt-p"}, "prev");
+ } else {
+ $paging_nav .= " ⋅ prev";
+ }
+
+ if ($nrevs >= (100 * ($page+1)-1)) {
+ $paging_nav .= " ⋅ " .
+ $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=$action;h=$hash;pg=" . ($page+1)),
+ -accesskey => "n", -title => "Alt-n"}, "next");
+ } else {
+ $paging_nav .= " ⋅ next";
+ }
+
+ return $paging_nav;
+}
+
sub git_get_type {
my $hash = shift;
}
$alternate ^= 1;
print "<td>" . $cgi->a({-href => "$my_uri?" . esc_param("p=$pr->{'path'};a=summary"), -class => "list"}, esc_html($pr->{'path'})) . "</td>\n" .
- "<td>$pr->{'descr'}</td>\n" .
+ "<td>" . esc_html($pr->{'descr'}) . "</td>\n" .
"<td><i>" . chop_str($pr->{'owner'}, 15) . "</i></td>\n";
print "<td class=\"". age_class($pr->{'commit'}{'age'}) . "\">" . $pr->{'commit'}{'age_string'} . "</td>\n" .
"<td class=\"link\">" .
my @revlist = map { chomp; $_ } <$fd>;
close $fd;
- my $paging_nav = '';
- if ($hash ne $head || $page) {
- $paging_nav .= $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=log")}, "HEAD");
- } else {
- $paging_nav .= "HEAD";
- }
- if ($page > 0) {
- $paging_nav .= " ⋅ " .
- $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=log;h=$hash;pg=" . ($page-1)), -accesskey => "p", -title => "Alt-p"}, "prev");
- } else {
- $paging_nav .= " ⋅ prev";
- }
- if ($#revlist >= (100 * ($page+1)-1)) {
- $paging_nav .= " ⋅ " .
- $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=log;h=$hash;pg=" . ($page+1)), -accesskey => "n", -title => "Alt-n"}, "next");
- } else {
- $paging_nav .= " ⋅ next";
- }
+ my $paging_nav = git_get_paging_nav('log', $hash, $head, $page, $#revlist);
git_header_html();
git_page_nav('log','', $hash,undef,undef, $paging_nav);
my @revlist = map { chomp; $_ } <$fd>;
close $fd;
- my $paging_nav = '';
- if ($hash ne $head || $page) {
- $paging_nav .= $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=shortlog")}, "HEAD");
- } else {
- $paging_nav .= "HEAD";
- }
- if ($page > 0) {
- $paging_nav .= " ⋅ " .
- $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=shortlog;h=$hash;pg=" . ($page-1)), -accesskey => "p", -title => "Alt-p"}, "prev");
- } else {
- $paging_nav .= " ⋅ prev";
- }
- if ($#revlist >= (100 * ($page+1)-1)) {
- $paging_nav .= " ⋅ " .
- $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=shortlog;h=$hash;pg=" . ($page+1)), -accesskey => "n", -title => "Alt-n"}, "next");
- } else {
- $paging_nav .= " ⋅ next";
- }
+ my $paging_nav = git_get_paging_nav('shortlog', $hash, $head, $page, $#revlist);
git_header_html();
git_page_nav('shortlog','', $hash,$hash,$hash, $paging_nav);