From 6e2260c7398fca567c6c78d49eef280be74d1d8c Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Sun, 10 Apr 2011 16:12:30 -0400 Subject: [PATCH] Bug 5917 follow-up: Fix errors on OPAC results 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 Signed-off-by: Chris Cormack --- .../prog/en/includes/opac-facets.inc | 4 +- .../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 cf2f80d899..eac00aa7fb 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 %]
    - [% FOREACH facet IN facets_loo.facets %]
  • [% facet.facet_label_value %] [% IF ( facet.displayFacetCount ) %]([% facet.facet_count %])[% END %]
  • [% END %][% IF ( facets_loo.expandable ) %] -
  • Show More
  • + [% FOREACH facet IN facets_loo.facets %]
  • [% facet.facet_label_value %] [% IF ( facet.displayFacetCount ) %]([% facet.facet_count %])[% END %]
  • [% END %][% IF ( facets_loo.expandable ) %] +
  • Show More
  • [% 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 9e59a5afd4..09c956fd65 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 %] -- 2.39.5