\n" .
$cgi->a({-href => "$my_uri?p=$project;a=summary", -class => "title"}, " ") .
@@ -1593,6 +1585,7 @@
@difftree = map { chomp; $_ } <$fd>;
close $fd or die_error(undef, "Reading diff-tree failed.");
git_header_html();
+ # git_navbar omitted here - commitdiff link a bit weird o_O
print "
\n" .
$cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
" | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash"}, "shortlog") .
@@ -1773,16 +1766,7 @@
mkdir($git_temp, 0700);
git_header_html();
if (defined $hash_base && (my %co = git_read_commit($hash_base))) {
- print "
\n" .
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base"}, "commit") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash_base"}, "commitdiff") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash_base"}, "tree") .
- "
\n";
- print $cgi->a({-href => "$my_uri?p=$project;a=blobdiff_plain;h=$hash;hp=$hash_parent"}, "plain") .
- "
\n";
+ print git_navbar($project, $hash_base, "blobdiff", $cgi->a({-href => "$my_uri?p=$project;a=blobdiff_plain;h=$hash;hp=$hash_parent"}, "plain"));
print "
\n" .
$cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash_base", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
"
\n";
@@ -1825,15 +1809,7 @@
close $fd or die_error(undef, "Reading diff-tree failed.");
git_header_html();
- print "
\n" .
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash"}, "shortlog") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash"}, "log") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") .
- " | commitdiff" .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") . "
\n";
- print $cgi->a({-href => "$my_uri?p=$project;a=commitdiff_plain;h=$hash;hp=$hash_parent"}, "plain") . "\n" .
- "
\n";
+ print git_navbar($project, $hash, "commitdiff", $cgi->a({-href => "$my_uri?p=$project;a=commitdiff_plain;h=$hash;hp=$hash_parent"}, "plain"));
print "
\n" .
$cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
"
\n";
@@ -1967,15 +1943,7 @@
die_error(undef, "Unknown commit object.");
}
git_header_html();
- print "
\n" .
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log"}, "log") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") .
- "
\n" .
- "
\n";
+ print git_navbar($project, $hash, "history", "");
print "
\n" .
$cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
"
\n";
@@ -2051,15 +2019,7 @@
$pickaxe_search = 1;
}
git_header_html();
- print "
\n" .
- $cgi->a({-href => "$my_uri?p=$project;a=summary;h=$hash"}, "summary") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "shortlog") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash"}, "log") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$co{'tree'};hb=$hash"}, "tree") .
- "
\n" .
- "
\n";
+ print git_navbar($project, $hash, "search", "");
print "
\n" .
$cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash", -class => "title"}, escapeHTML($co{'title'})) . "\n" .
@@ -2180,38 +2140,31 @@
$page = 0;
}
git_header_html();
- print "
\n" .
- $cgi->a({-href => "$my_uri?p=$project;a=summary"}, "summary") .
- " | shortlog" .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=log;h=$hash"}, "log") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commit;h=$hash"}, "commit") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=commitdiff;h=$hash"}, "commitdiff") .
- " | " . $cgi->a({-href => "$my_uri?p=$project;a=tree;h=$hash;hb=$hash"}, "tree") . "
\n";
my $limit = sprintf("--max-count=%i", (100 * ($page+1)));
open my $fd, "-|", "$gitbin/git-rev-list $limit $hash" or die_error(undef, "Open failed.");
my (@revlist) = map { chomp; $_ } <$fd>;
close $fd;
+ my $navExtra = "";
if ($hash ne $head || $page) {
- print $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "HEAD");
+ $navExtra .= $cgi->a({-href => "$my_uri?p=$project;a=shortlog"}, "HEAD");
} else {
- print "HEAD";
+ $navExtra .= "HEAD";
}
if ($page > 0) {
- print " ⋅ " .
+ $navExtra .= " ⋅ " .
$cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash;pg=" . ($page-1), -accesskey => "p", -title => "Alt-p"}, "prev");
} else {
- print " ⋅ prev";
+ $navExtra .= " ⋅ prev";
}
if ($#revlist >= (100 * ($page+1)-1)) {
- print " ⋅ " .
+ $navExtra .= " ⋅ " .
$cgi->a({-href => "$my_uri?p=$project;a=shortlog;h=$hash;pg=" . ($page+1), -accesskey => "n", -title => "Alt-n"}, "next");
} else {
- print " ⋅ next";
+ $navExtra .= " ⋅ next";
}
- print "
\n" .
- "
\n";
+ print git_navbar($project, $hash, "shortlog", $navExtra);
print "
\n" .
$cgi->a({-href => "$my_uri?p=$project;a=summary", -class => "title"}, " ") .
"
\n";