Bug 20090: Missing script statement for Novelist Select on some record displays in OPAC

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 <katrin.fischer.83@web.de>
I couldn't check with Novelist Select, but read and checked changed made carefully.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7662f4873e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
David Kuhn 2018-01-25 09:27:19 -08:00 committed by Fridolin Somers
parent 9e59bd8852
commit de108c3643
1 changed files with 5 additions and 4 deletions

View File

@ -521,11 +521,12 @@
</span>
[% END # / IF BakerTaylorContentURL %]
[% IF ( NovelistSelectProfile && normalized_isbn ) %]
[% IF ( NovelistSelectProfile && (normalized_isbn || normalized_upc) ) %]
[% IF ( NovelistSelectView == 'above') %]
<span class="results_summary NovelistSelect" style="display:none;">
<span class="label">Novelist Select: </span>
<div data-novelist-novelistselect=[% normalized_isbn %]></div>
<div data-novelist-novelistselect=[% IF normalized_isbn %][% normalized_isbn %][% ELSE %][% normalized_upc %][% END %]></div>
</span>
[% END %]
[% END # / IF NovelistSelectProfile %]
@ -597,7 +598,7 @@
<li id="tab_comments"><a href="#comments">Comments[% ' ( ' _ (reviews.size || 0) _ ' )' %]</a></li>
[% END %]
[% IF ( NovelistSelectProfile && normalized_isbn ) %]
[% IF ( NovelistSelectProfile && (normalized_isbn || normalized_upc) ) %]
[% IF ( NovelistSelectView == 'tab') %]
<li id="tab_NovelistSelect" class="NovelistSelect" style="display:none;"> <a href="#NovelistSelect">Novelist Select</a></li>
[% END %]
@ -1169,7 +1170,7 @@
[% END %]
[% END %]
[% IF ( NovelistSelectProfile && normalized_isbn ) %]
[% IF ( NovelistSelectProfile && normalized_isbn || normalized_upc) ) %]
<script type="text/javascript" src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script>
[% END %]