From 36c59333e02c555d0ac5a1715905dc9b0601e1c8 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Sun, 10 Apr 2011 12:09:43 -0400 Subject: [PATCH 3/3] Bug 5917 follow-up: Fix errors on OPAC results Content-Type: text/plain; charset="UTF-8" This patch fixes the following problems with the OPAC search results: * The facet links were constructed wrong following the change to Template::Toolkit This patch also changes the OPAC sorting dropdown to work in the same way as the staff dropdown. This seemed preferable to having the two use different variables for deciding which option to select, and it is unclear why Search.pm was not passing the appropriate variables to the staff client. Signed-off-by: Jared Camins-Esakov --- .../opac-tmpl/prog/en/includes/opac-facets.inc | 4 +- .../opac-tmpl/prog/en/includes/resort_form.inc | 88 ++++++++++++++------ 2 files changed, 63 insertions(+), 29 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc index cf2f80d..eac00aa 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc @@ -18,8 +18,8 @@ [% IF ( facets_loo.type_label_Libraries ) %]Libraries[% END %] [% END %] [% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/resort_form.inc b/koha-tmpl/opac-tmpl/prog/en/includes/resort_form.inc index 9e59a5a..09c956f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/resort_form.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/resort_form.inc @@ -1,36 +1,70 @@ -[% IF ( popularity_dsc ) %] + +[% IF ( sort_by == "popularity_dsc" ) %] [% ELSE %] -[% END %][% IF ( popularity_asc ) %] + +[% END %] +[% IF ( sort_by == "popularity_asc" ) %] [% ELSE %] -[% END %] + +[% END %] -[% IF ( author_az ) %] -[% ELSE %] -[% END %][% IF ( author_za ) %] -[% ELSE %] -[% END %] + +[% IF ( sort_by == "author_az" || sort_by == "author_asc" ) %] + +[% ELSE %] + +[% END %] +[% IF ( sort_by == "author_za" || sort_by == "author_dsc" ) %] + +[% ELSE %] + +[% END %] -[% IF ( call_number_asc ) %] -[% ELSE %] -[% END %][% IF ( call_number_dsc ) %] -[% ELSE %] -[% END %] + +[% IF ( sort_by == "call_number_asc" ) %] + +[% ELSE %] + +[% END %] +[% IF ( sort_by == "call_number_dsc" ) %] + +[% ELSE %] + +[% END %] -[% IF ( pubdate_dsc ) %] -[% ELSE %] -[% END %][% IF ( pubdate_asc ) %] -[% ELSE %] -[% END %][% IF ( acqdate_dsc ) %] -[% ELSE %] -[% END %][% IF ( acqdate_asc ) %] -[% ELSE %] -[% END %] + +[% IF ( sort_by == "pubdate_dsc" ) %] + +[% ELSE %] + +[% END %] +[% IF ( sort_by == "pubdate_asc" ) %] + +[% ELSE %] + +[% END %] +[% IF ( sort_by == "acqdate_dsc" ) %] + +[% ELSE %] + +[% END %] +[% IF ( sort_by == "acqdate_asc" ) %] + +[% ELSE %] + +[% END %] -[% IF ( title_az ) %] -[% ELSE %] -[% END %][% IF ( title_za ) %] -[% ELSE %] -[% END %] + +[% IF ( sort_by == "title_az" || sort_by == "title_asc" ) %] + +[% ELSE %] + +[% END %] +[% IF ( sort_by == "title_za" || sort_by == "title_dsc" ) %] + +[% ELSE %] + +[% END %] -- 1.7.2.3