From abe5c30973bb708c1a6e72ff450152c6466fd04b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 5 Oct 2015 11:17:23 +0100 Subject: [PATCH] Bug 14955: Don't double encode chars in the "Show more" link MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bug 13789 has fixed this issue for the facet links (select/unselect) but not for the "Show more" facets link. This patch reuses the "url" variable, generated for the facets, for these links. A new "local_url" variable is used to build links for each entry. Test plan (for OPAC and intranet): - Search for a very common term - Filter the results using facets - You should get more than 5 entries for a facet and 1 selected: Author author 1 author 2 [x] # Selected author 3 author 4 author 5 Show more # you see this link if there is 5+ values for this facet - Click on the Show more link Without this patch, the url contains double-encoded characters and you will certainly don't get any results With this patch, you should get results. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/includes/facets.inc | 19 +++++++++---------- .../bootstrap/en/includes/opac-facets.inc | 19 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc index 157366e032..d0abde9097 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc @@ -21,19 +21,19 @@ [% IF ( facets_loo.type_label_HoldingLibrary ) %]Holding libraries[% END %] [% IF facets_loo.type_label_Location %]Locations[% END %]
    + [% SET url = "/cgi-bin/koha/catalogue/search.pl?" _ query_cgi _ limit_cgi %] + [% IF ( sort_by ) %] + [% url = BLOCK %][% url %][% "&sort_by=" _ sort_by |url %][% END %] + [% END %] [% FOREACH facet IN facets_loo.facets %]
  • - [% SET url = "/cgi-bin/koha/catalogue/search.pl?" _ query_cgi _ limit_cgi %] - [% IF ( sort_by ) %] - [% url = BLOCK %][% url %][% "&sort_by=" _ sort_by |url %][% END %] - [% END %] [% IF facet.active %] - [% SET url = url _ "&nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value %] + [% SET local_url = url _ "&nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value %] [% facet.facet_label_value %] - [x] + [x] [% ELSE %] - [% SET url = url _ "&limit=" _ facet.type_link_value _ ":" _ facet.facet_link_value %] - [% facet.facet_label_value %] + [% SET local_url = url _ "&limit=" _ facet.type_link_value _ ":" _ facet.facet_link_value %] + [% facet.facet_label_value %] [% IF ( displayFacetCount ) %] ([% facet.facet_count %]) [% END %] @@ -42,8 +42,7 @@ [% END %] [% IF ( facets_loo.expandable ) %]
  • - Show more + Show more
  • [% END %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc index 958d5716ca..3d503aab0e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc @@ -30,19 +30,19 @@ [% END %] [% IF facets_loo.type_label_Location %]
Locations
[% END %]
    + [% SET url = "/cgi-bin/koha/opac-search.pl?" _ query_cgi _ limit_cgi %] + [% IF ( sort_by ) %] + [% url = BLOCK %][% url %][% "&sort_by=" _ sort_by |url %][% END %] + [% END %] [% FOREACH facet IN facets_loo.facets %]
  • - [% SET url = "/cgi-bin/koha/opac-search.pl?" _ query_cgi _ limit_cgi %] - [% IF ( sort_by ) %] - [% url = BLOCK %][% url %][% "&sort_by=" _ sort_by |url %][% END %] - [% END %] [% IF facet.active %] - [% SET url = url _ "&nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value %] + [% SET local_url = url _ "&nolimit=" _ facet.type_link_value _ ":" _ facet.facet_link_value %] [% facet.facet_label_value %] - [x] + [x] [% ELSE %] - [% SET url = url _ "&limit=" _ facet.type_link_value _ ":" _ facet.facet_link_value %] - [% facet.facet_label_value %] + [% SET local_url = url _ "&limit=" _ facet.type_link_value _ ":" _ facet.facet_link_value %] + [% facet.facet_label_value %] [% IF ( displayFacetCount ) %] ([% facet.facet_count %]) [% END %] @@ -51,8 +51,7 @@ [% END %] [% IF ( facets_loo.expandable ) %]
  • - Show more + Show more
  • [% END %]
-- 2.39.5