Frédéric Demians
4e64ea8870
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>
58 lines
3.8 KiB
HTML
58 lines
3.8 KiB
HTML
[% IF ( opacfacets && facets_loop ) %]
|
|
<div id="search-facets">
|
|
<h4><a href="#" class="menu-collapse-toggle">Refine your search</a></h4>
|
|
<ul class="menu-collapse">
|
|
<li id="availability_facet">Availability
|
|
<ul>
|
|
<li>
|
|
[% IF ( available ) %]
|
|
Showing only <strong>available</strong> items. <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |url %][% limit_cgi_not_availablity %][% IF ( sort_by ) %]&sort_by=[% sort_by |url %][% END %]">Show all items</a>
|
|
[% ELSE %]
|
|
<a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |url %][% limit_cgi |url %][% IF ( sort_by ) %]&sort_by=[% sort_by |url %][% END %]&limit=available">Limit to currently available items.</a>
|
|
[% END %]
|
|
</li>
|
|
</ul>
|
|
[% IF ( related ) %] <li>(related searches: [% FOREACH relate IN related %][% relate.related_search %][% END %])</li>[% END %]
|
|
</li>
|
|
|
|
[% FOREACH facets_loo IN facets_loop %]
|
|
[% IF facets_loo.facets.size > 0 %]
|
|
<li id="[% facets_loo.type_id %]">
|
|
<h5>[% IF ( facets_loo.type_label_Authors ) %]Authors[% END %]
|
|
[% IF ( facets_loo.type_label_Titles ) %]Titles[% END %]
|
|
[% IF ( facets_loo.type_label_Topics ) %]Topics[% END %]
|
|
[% IF ( facets_loo.type_label_Places ) %]Places[% END %]
|
|
[% IF ( facets_loo.type_label_Series ) %]Series[% END %]
|
|
[% IF ( facets_loo.type_label_ItemTypes ) %]Item types[% END %]
|
|
[% UNLESS ( singleBranchMode ) %]
|
|
[% IF ( facets_loo.type_label_Libraries ) %]Libraries[% END %]
|
|
[% END %]
|
|
[% IF ( facets_loo.type_label_Location ) %]Locations[% END %]</h5>
|
|
<ul>
|
|
[% FOREACH facet IN facets_loo.facets %]
|
|
<li>
|
|
<a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |url %][% limit_cgi |url %][% IF ( sort_by ) %]&sort_by=[% sort_by |url %][% END %]&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 %]
|
|
</li>
|
|
[% END %]
|
|
[% IF ( facets_loo.expandable ) %]
|
|
<li class="showmore">
|
|
<a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |url %][% limit_cgi |url %][% IF ( sort_by ) %]&sort_by=[% sort_by |url %][% END %][% IF ( offset ) %]
|
|
&offset=[% offset |url %][% END %]&expand=[% facets_loo.expand |url %]#[% facets_loo.type_id |url %]">Show more</a>
|
|
</li>
|
|
[% END %]
|
|
</ul>
|
|
</li>
|
|
[% END # / IF facets_loo.facets.size > 0 %]
|
|
[% END # / FOREACH facets_loo %]
|
|
</ul>
|
|
</div> <!-- / #search-facets -->
|
|
|
|
[% IF ( OPACResultsSidebar ) %]
|
|
<div id="opacresultssidebar">
|
|
[% OPACResultsSidebar %]
|
|
</div>
|
|
[% END %]
|
|
[% END # / IF opacfacets && facets_loop %]
|