From 76e53a130882f2df5424aa26d0a7c2c9df68e070 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 26 Mar 2015 17:22:53 +0100 Subject: [PATCH] Bug 6950: Make the resort working when searching for a tag 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/ Use the resort dropdown list to change the sort 3/ Confirm that the results are relevant. --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 3 +++ opac/opac-search.pl | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 fd2cb9f..c3cb9d1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -133,6 +133,9 @@ [% END %]
+ [% IF tag %] + + [% END %]
diff --git a/opac/opac-search.pl b/opac/opac-search.pl index cdf0fbb..a801c30 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -347,7 +347,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 -- 2.1.0