Skip to content

Commit 4426ba2

Browse files
Bernhard R. Linkgitster
authored andcommitted
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 <[email protected]> Acked-by: Jakub Narebski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 40efa22 commit 4426ba2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gitweb/gitweb.perl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3856,7 +3856,10 @@ sub print_nav_breadcrumbs {
38563856

38573857
print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / ";
38583858
if (defined $project) {
3859-
print $cgi->a({-href => href(action=>"summary")}, esc_html($project));
3859+
my @dirname = split '/', $project;
3860+
my $projectbasename = pop @dirname;
3861+
print_nav_breadcrumbs_path(@dirname);
3862+
print $cgi->a({-href => href(action=>"summary")}, esc_html($projectbasename));
38603863
if (defined $action) {
38613864
my $action_print = $action ;
38623865
if (defined $opts{-action_extra}) {

0 commit comments

Comments
 (0)