From 91d194a0bab6d61ae35c6359098dfb6c0c7ef801 Mon Sep 17 00:00:00 2001 From: David Bourgault Date: Wed, 27 Sep 2017 14:32:49 -0400 Subject: [PATCH] Bug 19376 - Adds 655$a to Zebra facets Test plan: 0) Apply patch 1) Depending on your setup, copy the content of the following files to their counterparts in /etc/ (or where your Koha configuration files are) : /etc/zebradb/biblios/etc/bib1.att /etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml /etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xsl /etc/zebradb/marc_defs/marc21/biblios/record.abs /etc/zebradb/ccl.properties 2) Edit a record to use the 655$a MARC tag, if you don't already 3) In the OPAC or Intranet, execute a search that would get a hit on the record you edited. > You should see the "Genre form" filter appear on the left 4) Click on the entry under "Genre form" > You should now only see the records with the matching 655$a tag. Signed-off-by: Hugo Agud --- C4/Koha.pm | 9 +++++-- C4/Search.pm | 1 + etc/zebradb/biblios/etc/bib1.att | 1 + etc/zebradb/ccl.properties | 6 +++++ .../marc21/biblios/biblio-koha-indexdefs.xml | 24 +++++++------------ .../marc21/biblios/biblio-zebra-indexdefs.xsl | 20 ++++++---------- .../intranet-tmpl/prog/en/includes/facets.inc | 1 + .../bootstrap/en/includes/opac-facets.inc | 1 + 8 files changed, 33 insertions(+), 30 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index a15080998a..23ed4b0f6c 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -400,7 +400,7 @@ sub getFacets { idx => 'ccode', label => 'CollectionCodes', tags => [ qw / 099t 955h / ], - } + }, ]; unless ( Koha::Libraries->search->count == 1 ) @@ -486,7 +486,12 @@ sub getFacets { idx => 'ccode', label => 'CollectionCodes', tags => [ qw / 9528 / ], - } + }, + { + idx => 'gen-for', + label => 'GenreForm', + tags => [qw / 655a / ], + }, ]; unless ( Koha::Libraries->search->count == 1 ) diff --git a/C4/Search.pm b/C4/Search.pm index fac04b0079..a277c663fa 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1147,6 +1147,7 @@ sub getIndexes{ 'Form-subdivision', 'format', 'Geographic-subdivision', + 'gen-for', 'he', 'Heading', 'Heading-use-main-or-added-entry', diff --git a/etc/zebradb/biblios/etc/bib1.att b/etc/zebradb/biblios/etc/bib1.att index d14d617f93..0cb1b16fac 100644 --- a/etc/zebradb/biblios/etc/bib1.att +++ b/etc/zebradb/biblios/etc/bib1.att @@ -67,6 +67,7 @@ att 60 CODEN att 61 Microform-generation att 62 Abstract att 63 Note +att 64 gen-for att 1000 Author-title # Record-type, reduced in size because limited line length for leader indexing att 1001 rtype diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index 5c003d301d..94885973a0 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -558,6 +558,12 @@ Term-genre-form-seealso 1=Term-genre-form-seealso Place-publication 1=59 pl Place-publication +#Genre form auth type genre/form 655$a +# +# +genreform 1=64 +gen-for genreform + #Country-publication 1053 The country code or the 008/15-17 # country name of the country UNIMARC 102$a # where the document has been diff --git a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml index b3b12a0e2b..432bda9324 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml +++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml @@ -764,22 +764,13 @@ Index-term-genre:w Index-term-genre:p - Subject:w - Subject:p + gen-for:w + gen-for:p Koha-Auth-Number:w - - - Subject:w - Subject:p - - - - Koha-Auth-Number:w - Subject:w @@ -794,21 +785,21 @@ Subject:w Subject:p - + curriculum:w curriculum:p Subject:w Subject:p - + curriculum:w curriculum:p Subject:w Subject:p - + curriculum:w curriculum:p @@ -973,7 +964,7 @@ Host-item:w - + Host-Item-Number:w @@ -1395,6 +1386,9 @@ su-geo:0 + + gen-for:0 + au:0 diff --git a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl index c5fed3e859..9a31b9c66c 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl +++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl @@ -692,7 +692,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - + @@ -2341,18 +2341,12 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - - - - - - - - - - - - + + + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc index 4d0e3c4781..721d267473 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc @@ -16,6 +16,7 @@ [% 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_GenreForm %]Genre form[% 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 %] 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 c840b2ddaf..acb9408bd1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc @@ -22,6 +22,7 @@
  • [% IF facets_loo.type_label_Authors %]
    Authors
    [% END %] [% IF facets_loo.type_label_Titles %]
    Titles
    [% END %] + [% IF facets_loo.type_label_GenreForm %]
    Genre form
    [% 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 %] -- 2.17.1