diff options
author | Tony Finch <dot@dotat.at> | 2015-03-19 15:40:19 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-19 13:44:12 -0700 |
commit | 7e3494244e7e35054363f8d1887db2ab06c1ea9e (patch) | |
tree | 740eabd6d8dd9a688c93936f374201d1b3a9ecbb | |
parent | 393bfac97e0d772c9d163adf048e5a4bf132dc11 (diff) | |
download | git-tf/gitweb-project-listing.tar.gz |
gitweb: make category headings into links when they are directoriestf/gitweb-project-listing
When $projects_list_category_is_directory is turned on, project
categories can be useful as project filters, so with that setting
gitweb now makes the category headings into project_filter links
(like the breadcrumbs).
Signed-off-by: Tony Finch <dot@dotat.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | gitweb/gitweb.perl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index edbc0587f9..32e65ae92c 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -5834,8 +5834,18 @@ sub git_project_list_body { if ($check_forks) { print "<td></td>\n"; } - print "<td class=\"category\" colspan=\"5\">".esc_html($cat)."</td>\n"; - print "</tr>\n"; + print "<td class=\"category\" colspan=\"5\">"; + if ($projects_list_directory_is_category) { + print $cgi->a({-href => + href(project => undef, + project_filter => $cat, + action => "project_list"), + -class => "list"}, + esc_html($cat)); + } else { + print esc_html($cat); + } + print "</td>\n</tr>\n"; } git_project_list_rows($categories{$cat}, undef, undef, $check_forks); |