From 31f470e29bc5ac5a2acc3c526b9fa5e55ade04a5 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 18 Nov 2014 09:16:53 -0500 Subject: [PATCH] Bug 13271 - Subject search links broken if XSLT and OPACPopupAuthorsSearch are both off Content-Type: text/plain; charset="utf-8" This patch corrects some faults in the OPAC's bootstrap template which prevent additional author and subject searches from working correctly with OPACPopupAuthorsSearch both on and off. Some JavaScript has been removed because it was used only by the prog theme and is obsolete. Locate a title with multiple subjects and additional authors. Test the following conditions: OPACXSLTDetailsDisplay is blank and OPACPopupAuthorsSearch is off: - Clicking an additional author or subject link should directly trigger the correct search without an JavaScript error. OPACXSLTDetailsDisplay is blank and OPACPopupAuthorsSearch is on: - Clicking an additional author or subject link should trigger a modal window where you can select options for searching. Checking boxes and submitting the form should perform the correct search. OPACXSLTDetailsDisplay is set to "default" and OPACPopupAuthorsSearch is on OR off: - Clicking an additional author or subject link should directly trigger the correct search without an JavaScript error. (OPACPopupAuthorsSearch only works with the non-XSL view). For extra credit: Test with JavaScript disabled and confirm that link still work correctly. --- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 30 +++++++++----------- 1 file changed, 13 insertions(+), 17 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 e641d76..de270be 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -154,7 +154,7 @@ @@ -164,9 +164,14 @@ [% authorsloop = loop %] [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] [% MARCAUTHOR_SUBFIELDS_LOO.separator %] - [% MARCAUTHOR_SUBFIELDS_LOO.value %] + [% ELSE %] + [% MARCAUTHOR_SUBFIELDS_LOO.value %] + [% END %] [% END %] [% IF (MARCAUTHOR.authoritylink) %] @@ -281,7 +286,11 @@ [% subjectsloop = loop %] [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] [% SUBFIELD.separator %] - [% SUBFIELD.value %] + [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] + [% SUBFIELD.value %] + [% ELSE %] + [% SUBFIELD.value %] + [% END %] [% END %] [% IF (MARCSUBJCT.authoritylink) %] @@ -1744,25 +1753,12 @@ //