Bugzilla – Attachment 51967 Details for
Bug 16641
Update Novelist in opac to use updated call to fetch content
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16641 - Update Novelist in opac to use updated call to fetch content
Bug-16641---Update-Novelist-in-opac-to-use-updated.patch (text/plain), 5.48 KB, created by
Nick Clemens (kidclamp)
on 2016-06-03 01:27:25 UTC
(
hide
)
Description:
Bug 16641 - Update Novelist in opac to use updated call to fetch content
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2016-06-03 01:27:25 UTC
Size:
5.48 KB
patch
obsolete
>From 3ed56caa887ec9373fe0bf30f3de01c2f8b08745 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 2 Jun 2016 21:24:06 -0400 >Subject: [PATCH] Bug 16641 - Update Novelist in opac to use updated call to > fetch content > >To test: >1 - Enable novelistselect content in the opac >2 - Find a record with novelist content, confirm it displays in tabs ro >above or below accoring to pref >3 - Find a record without novelist content, note you get an empty tab >4 - Apply patch >5 - Ensure results have not changed for items with content >6 - Ensure tab does not display for item with no content > >Sponsored by: > Walla Walla Public Library (http://www.wallawallapubliclibrary.org/) > Los Gatos Library (http://www.losgatosca.gov/42/Los-Gatos-Library) >--- > .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 34 +++++++++++++++------- > 1 file changed, 23 insertions(+), 11 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 fe72d01..d4b575f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -509,7 +509,7 @@ > > [% IF ( NovelistSelectProfile && normalized_isbn ) %] > [% IF ( NovelistSelectView == 'above') %] >- <span class="results_summary"> >+ <span class="results_summary NovelistSelect" style="display:none;"> > <span class="label">Novelist Select: </span> > <div data-novelist-novelistselect=[% normalized_isbn %]></div> > </span> >@@ -585,7 +585,7 @@ > > [% IF ( NovelistSelectProfile && normalized_isbn ) %] > [% IF ( NovelistSelectView == 'tab') %] >- <li id="tab_NovelistSelect"> <a href="#NovelistSelect">Novelist Select</a></li> >+ <li id="tab_NovelistSelect" class="NovelistSelect" style="display:none;"> <a href="#NovelistSelect">Novelist Select</a></li> > [% END %] > [% END %] > >@@ -783,9 +783,9 @@ > [% END # / IF SyndeticsReviews && SYNDETICS_REVIEWS %] > [% END # / IF SyndeticsEnabled %] > >- [% IF ( NovelistSelectProfile && NovelistSelectView == 'tab' && normalized_isbn ) %] >- <div id="NovelistSelect"> >- <div data-novelist-novelistselect=[% normalized_isbn %]></div> >+ [% IF ( NovelistSelectProfile && NovelistSelectView == 'tab' && (normalized_isbn || normalized_upc) ) %] >+ <div id="NovelistSelect" > >+ <div data-novelist-novelistselect=[% IF normalized_isbn %][% normalized_isbn %][% ELSE %][% normalized_upc %][% END %]></div> > </div> > [% END # / IF NovelistSelectProfile && NovelistSelectView == 'tab' %] > >@@ -1024,10 +1024,10 @@ > [% END %] > </div> <!-- / #bibliodescriptions --> > >- [% IF ( NovelistSelectProfile && NovelistSelectView == 'below' && normalized_isbn ) %] >+ [% IF ( NovelistSelectProfile && NovelistSelectView == 'below' && ( normalized_isbn || normalized_upc ) ) %] > <div id="NovelistSelect"> > <h3>Novelist Select</h3> >- <div data-novelist-novelistselect="[% normalized_isbn %]"></div> >+ <div data-novelist-novelistselect="[% IF normalized_isbn %][% normalized_isbn %][% ELSE %][% normalized_upc %][% END %]"></div> > </div> > [% END %] > >@@ -1100,10 +1100,10 @@ > > [% INCLUDE 'opac-detail-sidebar.inc' %] > >- [% IF ( NovelistSelectProfile && NovelistSelectView == 'right' && normalized_isbn ) %] >+ [% IF ( NovelistSelectProfile && NovelistSelectView == 'right' && ( normalized_isbn || normalized_upc ) ) %] > <div id="NovelistSelect"> > <h4>Novelist Select</h4> >- <div data-novelist-novelistselect=[% normalized_isbn %]></div> >+ <div data-novelist-novelistselect=[% IF normalized_isbn %][% normalized_isbn %][% ELSE %][% normalized_upc %][% END %]></div> > </div> > [% END %] > >@@ -1474,8 +1474,20 @@ > [% IF OPACLocalCoverImages %] > KOHA.LocalCover.GetCoverFromBibnumber(true); > [% END %] >- [% IF ( NovelistSelectProfile && normalized_isbn ) %] >- novSelect.loadContentForISBN('[% normalized_isbn %]','[% NovelistSelectProfile %]', '[% NovelistSelectPassword %]', function(d){}); >+ [% IF ( NovelistSelectProfile && ( normalized_isbn || normalized_upc ) ) %] >+ novSelect.loadContentForQuery( >+ { >+ ClientIdentifier : '[% IF normalized_isbn %][% normalized_isbn %][% ELSE %][% normalized_upc %][% END %]', >+ ISBN : '[% IF normalized_isbn %][% normalized_isbn %][% ELSE %][% normalized_upc %][% END %]', >+ version : '2.1' >+ }, >+ '[% NovelistSelectProfile %]', >+ '[% NovelistSelectPassword %]', >+ function(d){ >+ if ( d.length > 0 ){ //If no content >+ $(".NovelistSelect").show(); >+ } >+ }); > [% END %] > > [% IF ( OpacBrowseResults && busc ) %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16641
:
51967
|
52388
|
52391
|
56770