Bugzilla – Attachment 52386 Details for
Bug 11606
Novelist Select in Staff Client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11606: Add Novelist client to staff
Bug-11606-Add-Novelist-client-to-staff.patch (text/plain), 8.60 KB, created by
Jesse Weaver
on 2016-06-14 15:42:26 UTC
(
hide
)
Description:
Bug 11606: Add Novelist client to staff
Filename:
MIME Type:
Creator:
Jesse Weaver
Created:
2016-06-14 15:42:26 UTC
Size:
8.60 KB
patch
obsolete
>From 10f3ab2b094ee058817d4a2ab65fec1a9a7aa419 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 27 May 2016 16:51:56 -0400 >Subject: [PATCH] Bug 11606: Add Novelist client to staff > >To test: >1 - Apply patches >2 - Update database >3 - View detail pages for some records and ensure no changes have been made >4 - Enable NovelistSelectStaffEnabled (and enter or have info in the > Profile and password) >5 - Set NovelistSelectStaffView to 'above' >6 - View detail pages for some records, verify that if novelist info is >available it is displyaed and nothign is displayed if not >7 - Repeat with all staff view options > >Sponsored by: > Walla Walla Public Library (http://www.wallawallapubliclibrary.org/) > Los Gatos Library (http://www.losgatosca.gov/42/Los-Gatos-Library) > >Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> >Internal signoff. >--- > .../Bug_11606_Add_NovelistSelect_Staff_Prefs.sql | 2 + > installer/data/mysql/sysprefs.sql | 2 + > .../admin/preferences/enhanced_content.pref | 14 +++++++ > .../prog/en/modules/catalogue/detail.tt | 45 ++++++++++++++++++++++ > 4 files changed, 63 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/Bug_11606_Add_NovelistSelect_Staff_Prefs.sql > >diff --git a/installer/data/mysql/atomicupdate/Bug_11606_Add_NovelistSelect_Staff_Prefs.sql b/installer/data/mysql/atomicupdate/Bug_11606_Add_NovelistSelect_Staff_Prefs.sql >new file mode 100644 >index 0000000..ee4f78c >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/Bug_11606_Add_NovelistSelect_Staff_Prefs.sql >@@ -0,0 +1,2 @@ >+INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NovelistSelectStaffEnabled','0',NULL,'Enable Novelist Select content to the Staff Interface (requires that you have entered in a user profile and password, which can be seen in image links)','YesNo'), >+('NovelistSelectStaffView','tab','tab|above|below','Where to display Novelist Select content','Choice'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 2b95c99..0502b8d 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -258,6 +258,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('NovelistSelectEnabled','0',NULL,'Enable Novelist Select content. Requires Novelist Profile and Password','YesNo'), > ('NovelistSelectPassword','',NULL,'Enable Novelist user Profile','free'), > ('NovelistSelectProfile','',NULL,'Novelist Select user Password','free'), >+('NovelistSelectStaffEnabled','0',NULL,'Enable Novelist Select content in the staff client. Requires Novelist Profile and Password','YesNo'), >+('NovelistSelectStaffView','tab','tab|above|below','Where to display Novelist Select content in the staff client','Choice'), > ('NovelistSelectView','tab','tab|above|below|right','Where to display Novelist Select content','Choice'), > ('numReturnedItemsToShow','20',NULL,'Number of returned items to show on the check-in page','Integer'), > ('numSearchResults','20',NULL,'Specify the maximum number of results to display on a page of results','Integer'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >index ce8bee3..b72efda 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref >@@ -102,6 +102,20 @@ Enhanced Content: > - pref: NovelistSelectPassword > class: password > - . >+ - >+ - pref: NovelistSelectStaffEnabled >+ choices: >+ yes: Add >+ no: "Don't add" >+ - Novelist Select content to the Staff client (requires that you have entered in a user profile and password, which can be seen in image links). >+ - >+ - Display Novelist Select staff content >+ - pref: NovelistSelectStaffView >+ choices: >+ tab: in an OPAC tab >+ above: above the holdings table >+ below: below the holdings table >+ - . > Google: > - > - pref: GoogleJackets >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index e8de754..351dc6c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -25,6 +25,11 @@ > Details for [% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %] > [% END %] > </title> >+ >+[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %] >+ <script type="text/javascript" src="https://imageserver.ebscohost.com/novelistselect/ns2init.js"></script> >+[% END %] >+ > [% INCLUDE 'doc-head-close.inc' %]<script type="text/JavaScript"> > //<![CDATA[ > // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html >@@ -196,6 +201,22 @@ function verify_images() { > $("#marcPreview").on("hidden", function(){ > $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); > }); >+ [% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('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' >+ }, >+ '[% Koha.Preference('NovelistSelectProfile') %]', >+ '[% Koha.Preference('NovelistSelectPassword') %]', >+ function(d){ >+ if ( d.length > 0 ){ //If no content >+ $(".NovelistSelect").show(); >+ } >+ }); >+ [% END %] >+ > }); > > [% IF ( AmazonCoverImages || LocalCoverImages ) %]$(window).load(function() { >@@ -561,6 +582,9 @@ function verify_images() { > [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li><a href="#editions">Editions</a></li>[% END %][% END %] > [% IF ( LocalCoverImages ) %][% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]<li><a href="#images">Images</a></li>[% END %][% END %] > [% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]<li><a href="#html5media">Play media</a></li>[% END %][% END %] >+[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %] >+ <li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li> >+[% END %] > </ul> > > [% items_table_block_iter = 0 %] >@@ -823,6 +847,14 @@ function verify_images() { > [% END %][%# end of block items_table %] > > <div id="holdings"> >+ >+[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %] >+ <span class="results_summary NovelistSelect" style="display:none;"> >+ <span class="label">Novelist Select: </span> >+ <div data-novelist-novelistselect=[% normalized_isbn %]></div> >+ </span> >+[% END %] >+ > [% IF ( count ) %] > [% IF ( showncount ) %] > [% PROCESS items_table tab="holdings" items=itemloop %] >@@ -847,6 +879,13 @@ function verify_images() { > <div id="noitems">No physical items for this record</div> > [% END %] > [% END %] >+ >+[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'below' ) %] >+ <span class="results_summary NovelistSelect" style="display:none;"> >+ <span class="label">Novelist Select: </span> >+ <div data-novelist-novelistselect=[% normalized_isbn %]></div> >+ </span> >+[% END %] > </div> > > [% IF (SeparateHoldings) %] >@@ -1054,6 +1093,12 @@ function verify_images() { > [% END %] > > >+[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %] >+ <div id="NovelistSelect" class="novelistSelect"> >+ <div data-novelist-novelistselect=[% normalized_isbn %]></div> >+ </div> >+[% END %] >+ > </div><!-- /bibliodetails --> > > <div class="yui-g" id="export" style="margin-top: 1em;"> >-- >2.8.1
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 11606
:
51966
|
52386
|
52387
|
52392
|
52393
|
53416
|
53417