{"thread":{"id":"37261","subject":"[PATCH 5/5] gitweb: make category headings into links when they are directories","startedAt":"2014-07-31T12:53:54Z","lastAt":"2014-07-31T12:53:54Z","messageCount":1,"participants":["Tony Finch"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"247044","messageId":"alpine.LSU.2.00.1407311353520.23775@hermes-1.csi.cam.ac.uk","threadId":"37261","inReplyTo":null,"subject":"[PATCH 5/5] gitweb: make category headings into links when they are directories","fromName":"Tony Finch","fromEmail":"dot@dotat.at","sentAt":"2014-07-31T12:53:54Z","receivedAt":"2014-07-31T12:53:54Z","isPatch":true,"sender":{"key":"dot@dotat.at","avatar":"https://avatars.githubusercontent.com/u/68429?v=4"},"body":"When $projects_list_category_is_directory is turned on, project\ncategories can be useful as project filters, so with that setting\ngitweb now makes the category headings into project_filter links\n(like the breadcrumbs).\n\nSigned-off-by: Tony Finch <dot@dotat.at>\n---\n gitweb/gitweb.perl | 14 ++++++++++++--\n 1 file changed, 12 insertions(+), 2 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex edbc058..32e65ae 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -5834,8 +5834,18 @@ sub git_project_list_body {\n \t\t\t\tif ($check_forks) {\n \t\t\t\t\tprint \"<td></td>\\n\";\n \t\t\t\t}\n-\t\t\t\tprint \"<td class=\\\"category\\\" colspan=\\\"5\\\">\".esc_html($cat).\"</td>\\n\";\n-\t\t\t\tprint \"</tr>\\n\";\n+\t\t\t\tprint \"<td class=\\\"category\\\" colspan=\\\"5\\\">\";\n+\t\t\t\tif ($projects_list_directory_is_category) {\n+\t\t\t\t\tprint $cgi->a({-href =>\n+\t\t\t\t\t    href(project => undef,\n+\t\t\t\t\t        project_filter => $cat,\n+\t\t\t\t\t        action => \"project_list\"),\n+\t\t\t\t\t    -class => \"list\"},\n+\t\t\t\t\t    esc_html($cat));\n+\t\t\t\t} else {\n+\t\t\t\t\tprint esc_html($cat);\n+\t\t\t\t}\n+\t\t\t\tprint \"</td>\\n</tr>\\n\";\n \t\t\t}\n\n \t\t\tgit_project_list_rows($categories{$cat}, undef, undef, $check_forks);\n-- \n2.1.0.rc0.229.gaee38de\n"}]}