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 <brlink@debian.org> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Bernhard R. Link committed
Jan 30, 2012 at 21:10 UTC
4426ba2919697d57ab8b6335ca63b2c14e4e6339
1 file changed
+4
-1
gitweb/gitweb.perl
+4
-1
@@ -3856,7 +3856,10 @@ sub print_nav_breadcrumbs {
3856
3857
print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / ";
3858
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));
3863
if (defined $action) {
3864
my $action_print = $action ;
3865
if (defined $opts{-action_extra}) {