From ea633f407c1d7737a0b55ba48b5f72a1edc0b9d3 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 23 Mar 2017 10:49:09 +0000 Subject: [PATCH] Add a facet for ccode fields to Zebra https://bugs.koha-community.org/show_bug.cgi?id=18322 --- C4/Koha.pm | 5 +++++ C4/Search.pm | 2 +- koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc | 6 +++--- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 9f06226..fba2ffd 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -602,6 +602,11 @@ sub getFacets { label => 'Location', tags => [ qw / 952c / ], }, + { + idx => 'ccode', + label => 'CollectionCodes', + tags => [ qw / 9528 / ], + } ]; unless ( Koha::Libraries->search->count == 1 ) diff --git a/C4/Search.pm b/C4/Search.pm index 4270c82..523d285 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -583,7 +583,7 @@ sub getRecords { my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $one_facet }); $facet_label_value = $av->count ? $av->next->opac_description : ''; } - + # but we're down with the whole label being in the link's title. push @this_facets_array, { diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc index 572be95..eeb97ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc @@ -21,7 +21,7 @@ [% IF ( facets_loo.type_label_HomeLibrary ) %]Home libraries[% END %] [% IF ( facets_loo.type_label_HoldingLibrary ) %]Holding libraries[% END %] [% IF facets_loo.type_label_Location %]Locations[% END %] -[% IF facets_loo.type_label_CollectionCodes %]Collections[% END %] +[% IF facets_loo.type_label_CollectionCodes %]Collections[% END %]