From 57c2cf591592e292998107a556e4275624d3c53a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 12 Aug 2019 11:38:57 +0000 Subject: [PATCH] Bug 13327: OPACPopupAuthorsSearch doesn't work with XSLT views This patch reimplements the OPACPopupAuthorsSearch feature so that it will work in the XSLT view. To test, apply the patch and view the detail page for a bibliographic record in the OPAC. Test under the following conditions: - OPACPopupAuthorsSearch ENABLED, OPACXSLTDetailsDisplay "default" - OPACPopupAuthorsSearch ENABLED, OPACXSLTDetailsDisplay empty - OPACPopupAuthorsSearch DISABLED, OPACXSLTDetailsDisplay "default" - OPACPopupAuthorsSearch DISABLED, OPACXSLTDetailsDisplay empty In each of these cases, test the detail page's listing of additional authors/contributors. Test records which have both multiple contributors and which have only one additional author. When OPACPopupAuthorsSearch is turned on, verify that the author selection modal appears and that your selections are correctly combined to build a search string. Note that OPACPopupAuthorsSearch feature has a problem with terms containing parentheses. The issue predates this patch. Also note that the QA tools will give a false positive about Bootstrap button styles. This rule only applies to the staff client. --- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 162 +++++++++++---------- .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 1 + 2 files changed, 88 insertions(+), 75 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 9ab7a1017e9..084a16d66d7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -141,60 +141,18 @@ [% IF ( MARCAUTHORS ) %]
Additional authors: - [% IF OPACPopupAuthorsSearch %] - - - [% END # /OPACPopupAuthorsSearch %] - [% FOREACH MARCAUTHOR IN MARCAUTHORS %] - [% authorsloop = loop %] [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] [% MARCAUTHOR_SUBFIELDS_LOO.separator | html %] - [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] - [% MARCAUTHOR_SUBFIELDS_LOO.value | html %] + [% IF ( MARCAUTHOR.authoritylink ) %] + [% ELSE %] - [% MARCAUTHOR_SUBFIELDS_LOO.value | html %] + [% END %] + [% MARCAUTHOR_SUBFIELDS_LOO.value | html %] [% END %] [% IF (MARCAUTHOR.authoritylink) %] - + [% END %] [% IF IDREF and MARCAUTHOR.unimarc3 %] IdRef @@ -1403,6 +1361,30 @@ [% END %][%# end of items_table block %] +[% IF ( OPACPopupAuthorsSearch ) %] + + +[% END %] + [% BLOCK jsinclude %] [% INCLUDE 'datatables.inc' %] [% INCLUDE 'columns_settings.inc' %] @@ -1426,6 +1408,7 @@ [% END %] -[% IF OPACPopupAuthorsSearch %] - -[% END # / IF OPACPopupAuthorsSearch %] [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl index 3cc42e5664a..fa6dc9e1bef 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -1566,6 +1566,7 @@ /cgi-bin/koha/opac-search.pl?q=au:"" + contributors -- 2.11.0