From 68aeac55ea239a854c433baae678adaacd434c88 Mon Sep 17 00:00:00 2001 From: Aaron Taylor Date: Thu, 5 Nov 2020 05:59:15 +0000 Subject: [PATCH] Modified header breadcrumbs from this format: project / project_name / .git / summary into this format: project / project_name / summary Also changed the 'project_name' hyperlink to point to the project's 'summary' page rather than its 'project_list' page. --- gitweb.cgi | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gitweb.cgi b/gitweb.cgi index 16021cc..d405acd 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -4070,10 +4070,11 @@ sub print_nav_breadcrumbs_path { while (my $part = shift) { $dirprefix .= "/" if defined $dirprefix; $dirprefix .= $part; - print $cgi->a({-href => href(project => undef, - project_filter => $dirprefix, - action => "project_list")}, - esc_html($part)) . " / "; + if (scalar @_ != 0) { + print $cgi->a({-href => href(action => "summary")}, esc_html($part)) . " / "; + } else { + print $cgi->a({-href => href(action => "summary")}, esc_html($part)); + } } } @@ -4087,7 +4088,9 @@ sub print_nav_breadcrumbs { my @dirname = split '/', $project; my $projectbasename = pop @dirname; print_nav_breadcrumbs_path(@dirname); - print $cgi->a({-href => href(action=>"summary")}, esc_html($projectbasename)); + if ($projectbasename != ".git") { + print $cgi->a({-href => href(action=>"summary")}, esc_html($projectbasename)); + } if (defined $action) { my $action_print = $action ; if (defined $opts{-action_extra}) { -- 2.20.1