From abfce4ed088f05e60154ed6599709fd0aadb89b3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 27 Mar 2015 10:47:40 +0100 Subject: [PATCH] Bug 6950: Hide the resort option when searching for a tag MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If you click a link from the Tag Cloud, the results page offers the usual select menu to resort your results. However, doing so resubmits the search as a standard keyword search. Test plan: 1/ Click on a tag 2/ Confirm that the resort dropdown list does not appear. Dropdown list disappears with tags as expected. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit fc100688a4017ce85bb257de04b3e6bf4e929dec) Signed-off-by: Chris Cormack --- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 10 ++++++---- opac/opac-search.pl | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index f38a3e9113..1f1289b4f5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -131,10 +131,12 @@ Highlight [% END %] -
- - -
+ [% UNLESS tag %] +
+ + +
+ [% END %]
diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 692d70b938..55f972305a 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -345,8 +345,10 @@ if ( $template_type && $template_type eq 'advsearch' ) { # * multivalued CGI paramaters are returned as a packaged string separated by "\0" (null) my $params = $cgi->Vars; my $tag; -$tag = $params->{tag} if $params->{tag}; - +if ( $params->{tag} ) { + $tag = $params->{tag}; + $template->param( tag => $tag ); +} # String with params with the search criteria for the paging in opac-detail # param value is URI encoded and params separator is HTML encode (&) -- 2.39.5