1 From pasky@suse.cz Wed Oct 11 02:12:26 2006
2 From: Petr Baudis <pasky@suse.cz>
3 To: Junio C Hamano <junkio@cox.net>
4 Cc: <git@vger.kernel.org>
5 Subject: [PATCH] gitweb: Add link to graphiclog to the navbar
6 Date: Wed, 11 Oct 2006 02:12:26 +0200
7 Message-Id: <20061011001226.4656.46241.stgit@rover>
8 Content-Type: text/plain; charset=utf-8; format=fixed
9 Content-Transfer-Encoding: 8bit
10 User-Agent: StGIT/0.10
14 Signed-off-by: Petr Baudis <pasky@suse.cz>
17 gitweb/gitweb.perl | 7 ++++---
18 1 files changed, 4 insertions(+), 3 deletions(-)
20 diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
21 index 324244c..219cb66 100755
22 --- a/gitweb/gitweb.perl
23 +++ b/gitweb/gitweb.perl
24 @@ -1612,7 +1612,7 @@ sub git_print_page_nav {
25 my ($current, $suppress, $head, $treehead, $treebase, $extra) = @_;
26 $extra = '' if !defined $extra; # pager or formats
28 - my @navs = qw(summary shortlog log commit commitdiff tree);
29 + my @navs = qw(summary graphiclog shortlog log commit commitdiff tree);
31 @navs = grep { $_ ne $suppress } @navs;
33 @@ -1628,13 +1628,14 @@ sub git_print_page_nav {
37 + $arg{graphiclog}{_href} = '/git-browser/by-commit.html?r='.$project;
38 $arg{tree}{hash} = $treehead if defined $treehead;
39 $arg{tree}{hash_base} = $treebase if defined $treebase;
41 print "<div class=\"page_nav\">\n" .
43 map { $_ eq $current ?
44 - $_ : $cgi->a({-href => href(%{$arg{$_}})}, "$_")
45 + $_ : $cgi->a({-href => ($arg{$_}{_href} ? $arg{$_}{_href} : href(%{$arg{$_}}))}, "$_")
47 print "<br/>\n$extra<br/>\n" .
49 @@ -2468,7 +2469,7 @@ sub git_project_list {
50 $pr->{'commit'}{'age_string'} . "</td>\n" .
51 "<td class=\"link\">" .
52 $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary")}, "summary") . " | " .
53 - $cgi->a({-href => href(project=>$pr->{'path'}, action=>"shortlog")}, "shortlog") . " | " .
54 + $cgi->a({-href => '/git-browser/by-commit.html?r='.$pr->{'path'}}, "graphiclog") . " | " .
55 $cgi->a({-href => href(project=>$pr->{'path'}, action=>"log")}, "log") . " | " .
56 $cgi->a({-href => href(project=>$pr->{'path'}, action=>"tree")}, "tree") .