Bug 11277: fix errors with search facet links in Bootstrap theme

This patch fixes the following rwo errors:

  1. When selecting 'show more' above a facet, the advanced search page
     is displayed.
  2. When restricting search on a library facet, all the biblio records
     of this library are returned.

The patch fixes the way URL are encoded with TT filter. See:

http://search.cpan.org/~abw/Template-Toolkit-2.25/lib/Template/Manual/Filters.pod#url

Signed-off-by: Liz Rea <liz@catalyst.net.nz>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch works nicely. Tests done:
- 'More' link on facets redirects to advanced search before applying
  the patch. After appyling the link works correctly.
- In my tests, the facet links themselves worked nicely, limiting the
  search as expected.
- Availability search works ok for me with patch applied.
- Also made sure to click on some links containing diacritcts (German
  umlauts).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Frédéric Demians 2013-11-26 10:16:41 +01:00 committed by Galen Charlton
parent 4a7bb58b1d
commit 4e64ea8870
1 changed files with 5 additions and 5 deletions

View File

@ -6,9 +6,9 @@
<ul>
<li>
[% IF ( available ) %]
Showing only <strong>available</strong> items. <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |uri %][% limit_cgi_not_availablity %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %]">Show all items</a>
Showing only <strong>available</strong> items. <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |url %][% limit_cgi_not_availablity %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]">Show all items</a>
[% ELSE %]
<a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |uri %][% limit_cgi |uri %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %]&amp;limit=available">Limit to currently available items.</a>
<a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |url %][% limit_cgi |url %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]&amp;limit=available">Limit to currently available items.</a>
[% END %]
</li>
</ul>
@ -31,7 +31,7 @@
<ul>
[% FOREACH facet IN facets_loo.facets %]
<li>
<a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |uri %][% limit_cgi |uri %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %]&amp;limit=[% facet.type_link_value |uri %]:[% facet.facet_link_value |uri %]" title="[% facet.facet_title_value |html %]">[% facet.facet_label_value %]</a>
<a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |url %][% limit_cgi |url %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %]&amp;limit=[% facet.type_link_value |url %]:[% facet.facet_link_value |url %]" title="[% facet.facet_title_value |html %]">[% facet.facet_label_value %]</a>
[% IF ( displayFacetCount ) %]
([% facet.facet_count %])
[% END %]
@ -39,8 +39,8 @@
[% END %]
[% IF ( facets_loo.expandable ) %]
<li class="showmore">
<a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |uri %][% limit_cgi |uri %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %][% IF ( offset ) %]
&amp;offset=[% offset |uri %][% END %]&amp;expand=[% facets_loo.expand |uri %]#[% facets_loo.type_id |uri %]">Show more</a>
<a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |url %][% limit_cgi |url %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |url %][% END %][% IF ( offset ) %]
&amp;offset=[% offset |url %][% END %]&amp;expand=[% facets_loo.expand |url %]#[% facets_loo.type_id |url %]">Show more</a>
</li>
[% END %]
</ul>