diff options
author | Tony Finch <dot@dotat.at> | 2015-03-19 15:40:10 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-19 13:44:09 -0700 |
commit | 2ff28b0f207374201e1c6bdf493d38cc86a4f3d8 (patch) | |
tree | 735e3d3d9f39eb84990778b15bb7da10678fe2f0 | |
parent | 423d356ddb8af2b3b64273902c2e538c2c4d6991 (diff) | |
download | git-2ff28b0f207374201e1c6bdf493d38cc86a4f3d8.tar.gz |
gitweb: add a link under the search box to clear a project filter
Previously when a project filter was active, the only simple way
to clear it was by clicking the home link in the breadcrumbs, which
is not very obvious.
This change adds another home link under the search box which clears
both project filter and search, next to the existing link that
clears the search and keeps the project filter.
Signed-off-by: Tony Finch <dot@dotat.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | gitweb/gitweb.perl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 12aba8fe80..d1e6b79523 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -5545,10 +5545,13 @@ sub git_project_search_form { "</span>\n" . $cgi->submit(-name => 'btnS', -value => 'Search') . $cgi->end_form() . "\n" . - $cgi->a({-href => href(project => undef, searchtext => undef, - project_filter => $project_filter)}, - esc_html("List all projects$limit")) . "<br />\n"; - print "</div>\n"; + $cgi->a({-href => $my_uri}, esc_html("List all projects")); + print " / " . + $cgi->a({-href => href(project => undef, action => "project_list", + project_filter => $project_filter)}, + esc_html("List projects$limit")) + if $project_filter; + print "<br />\n</div>\n"; } # entry for given @keys needs filling if at least one of keys in list |