]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: place links to parent directories in page header
authorBernhard R. Link <redacted>
Mon, 30 Jan 2012 20:10:23 +0000 (21:10 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:31 +0000 (00:51 -0400)
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 <redacted>
Acked-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index c242588ce5b89870ed5addf6f9f26b3eab6a46c134fc496e440782c0dc0a23e7..4e364ac03ac7e7b2761cc1ea938a93c55d24567320ff5bbdf8393be5a39e2412 100755 (executable)
@@ -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}) {
This page took 0.310858 seconds and 4 git commands to generate.