summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorBernhard R. Link <brl+git@mail.brlink.eu>2012-01-30 20:10:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-02-01 20:52:50 (GMT)
commit4426ba2919697d57ab8b6335ca63b2c14e4e6339 (patch)
tree1958a7ba515d70cac7acea4656dc06b12f5dddd7 /gitweb
parent40efa22309458546a3ea861689034acf9fbf9d1a (diff)
downloadgit-4426ba2919697d57ab8b6335ca63b2c14e4e6339.zip
git-4426ba2919697d57ab8b6335ca63b2c14e4e6339.tar.gz
git-4426ba2919697d57ab8b6335ca63b2c14e4e6339.tar.bz2
gitweb: place links to parent directories in page header
Change html page headers to not only link the project root and the currently selected project but also the directories in between using project_filter. (Allowing to jump to a list of all projects within that intermediate directory directly and making the project_filter feature visible to users). Signed-off-by: Bernhard R. Link <brlink@debian.org> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl5
1 files changed, 4 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7d36f56..3ab608c 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3856,7 +3856,10 @@ sub print_nav_breadcrumbs {
print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / ";
if (defined $project) {
- print $cgi->a({-href => href(action=>"summary")}, esc_html($project));
+ my @dirname = split '/', $project;
+ my $projectbasename = pop @dirname;
+ print_nav_breadcrumbs_path(@dirname);
+ print $cgi->a({-href => href(action=>"summary")}, esc_html($projectbasename));
if (defined $action) {
my $action_print = $action ;
if (defined $opts{-action_extra}) {