8bd8aba577
This is for MARC 21 only. Made following changed: - In getFacets in C4/Koha.pm added item type facet for 952y and 942c - In getRecords in C4:Search.pm added code to get description of itemtype codes - facets.inc in both staff and opac to show item types related label in the facets block To test: Add records such that a certain itype (say BK) is present in both 942c and 952y in two DIFFERENT records. Run a search where both test records are present. Test to see if itype types are presented in the facets block (both OPAC and staff). Click on the itype (say BK), both the test records should appear in the refined results. This shows that the feature works for both 942c and 952y. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Ian Walls <koha.sekjal@gmail.com> QA Comment: fixed capitalization in template includes according to HTML4 coding guideline ("Item types" instead of "ItemTypes") Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
35 lines
2.1 KiB
HTML
35 lines
2.1 KiB
HTML
[% IF ( opacfacets ) %]
|
|
[% IF ( facets_loop ) %]
|
|
<div id="search-facets">
|
|
<h4>Refine your search</h4>
|
|
<ul>
|
|
<li>Availability<ul><li>[% IF ( available ) %]Showing only <strong>available</strong> items. <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi_not_availablity %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]">Show all items</a>[% ELSE %]Limit to <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&limit=available">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 %]
|
|
<li id="[% facets_loo.type_id %]">
|
|
[% 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 %]
|
|
<ul>
|
|
[% FOREACH facet IN facets_loo.facets %]<li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&limit=[% facet.type_link_value %]:[% facet.facet_link_value %]" 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 |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %][% IF ( offset ) %]&offset=[% offset %][% END %]&expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">Show more</a></li>
|
|
[% END %]
|
|
</ul></li>
|
|
[% END %]
|
|
</ul>
|
|
</div>
|
|
[% IF ( OPACResultsSidebar ) %]
|
|
<div id="opacresultssidebar">
|
|
[% OPACResultsSidebar %]
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|