From: Bernhard R. Link Date: Mon, 30 Jan 2012 20:10:23 +0000 (+0100) Subject: gitweb: place links to parent directories in page header X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/281c6465f7192bf14e3ca681d0a5f1b32697b06fae26c2f8df752051666f1ff3 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 Acked-by: Jakub Narebski Signed-off-by: Junio C Hamano --- diff --git a/gitweb.perl b/gitweb.perl index c242588..4e364ac 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -3859,7 +3859,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}) {