From 24f3196a77f720f96eba6ae1f64c2be606ec54e4 Mon Sep 17 00:00:00 2001 From: David Kuhn Date: Thu, 25 Jan 2018 09:27:19 -0800 Subject: [PATCH] Bug 20090: Missing script statement for Novelist Select on some record displays in OPAC Content-Type: text/plain; charset=utf-8 This patch adds a check for UPCs and well as ISBNs to the Novelist Select conditionals in opac-detail.tt To test (note that you must subscribe to Novelist Select): 1. If your library does not use the raton ratings feature, activate it for the purposes of this test. 2. Display a record that does not have an ISBN in the 020 field, but has a upc (or other code) in the 024 field. The rating option will display as 5 radio buttons and a "rate it" button. 3. Apply the patch. 4. Display the same record again. The radio buttons will be replaced with stars. This indicates that the scripts on the page completed. Rather that using the patron ratings as in indicator, you can also use a web page inspector/debugger such as firebug or the built-in inspectors in most newer browsers to check for script errors. Signed-off-by: Katrin Fischer I couldn't check with Novelist Select, but read and checked changed made carefully. Signed-off-by: Marcel de Rooy --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 50833cc..4e52e5d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -532,11 +532,12 @@ [% END # / IF BakerTaylorContentURL %] - [% IF ( NovelistSelectProfile && normalized_isbn ) %] + [% IF ( NovelistSelectProfile && (normalized_isbn || normalized_upc) ) %] [% IF ( NovelistSelectView == 'above') %] [% END %] [% END # / IF NovelistSelectProfile %] @@ -603,7 +604,7 @@
  • Comments[% ' ( ' _ (reviews.size || 0) _ ' )' %]
  • [% END %] - [% IF ( NovelistSelectProfile && normalized_isbn ) %] + [% IF ( NovelistSelectProfile && (normalized_isbn || normalized_upc) ) %] [% IF ( NovelistSelectView == 'tab') %] [% END %] @@ -1167,7 +1168,7 @@ here. [% END %] - [% IF ( NovelistSelectProfile && normalized_isbn ) %] + [% IF ( NovelistSelectProfile && normalized_isbn || normalized_upc) ) %] [% END %] -- 2.1.4