Skip to content

Commit

Permalink
gitweb: place links to parent directories in page header
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bernhard R. Link authored and Junio C Hamano committed Feb 1, 2012
1 parent 40efa22 commit 4426ba2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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}) {
Expand Down

0 comments on commit 4426ba2

Please sign in to comment.