Bug 19882: Add Novelist Select staff client profile

This patchset allows for use of a separate Novelist profile for the
staff client and opac. This allows Novelist to determine links and
special styling for each. Testing is best with novelist credentials,
however, confirming that values are set and used correctly and nothing
is broken should suffice.

To test:
1 - Apply patches
2 - Update database
3 - View detail pages for some records on opac and staff client 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 displayed and nothing is displayed if not
7 - Repeat with all staff view options

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2017-12-27 13:18:26 +00:00 committed by Jonathan Druart
parent b7960a7311
commit 6c36042e85
4 changed files with 24 additions and 10 deletions

View File

@ -0,0 +1,7 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('NovelistSelectStaffProfile',NULL,'Novelist staff client user Profile',NULL,'free')");
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 19882 - Add Novelist Staff Client Profile)\n";
}

View File

@ -291,9 +291,10 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('NoticeCSS','',NULL,'Notices CSS url.','free'),
('NotifyBorrowerDeparture','30',NULL,'Define number of days before expiry where circulation is warned about patron account expiry','Integer'),
('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'),
('NovelistSelectPassword','',NULL,'Novelist select user Password','free'),
('NovelistSelectProfile','',NULL,'Novelist Select user Profile','free'),
('NovelistSelectStaffEnabled','0',NULL,'Enable Novelist Select content in the staff client. Requires Novelist Profile and Password','YesNo'),
('NovelistSelectStaffProfile','',NULL,'Novelist Select user Profile for staff client','free'),
('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'),

View File

@ -98,7 +98,13 @@ Enhanced Content:
-
- Access Novelist Select using user profile
- pref: NovelistSelectProfile
- and password
- on the opac
-
- Access Novelist Select using user profile
- pref: NovelistSelectStaffProfile
- on the staff client
-
- Access Novelist Select using password:
- pref: NovelistSelectPassword
class: password
- .

View File

@ -303,7 +303,7 @@
[% 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' ) %]
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
<li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
[% END %]
</ul>
@ -547,7 +547,7 @@
<div id="holdings">
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %]
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && 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>
@ -579,7 +579,7 @@
[% END %]
[% END %]
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'below' ) %]
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && 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>
@ -805,7 +805,7 @@
[% END %]
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
<div id="NovelistSelect" class="novelistSelect">
<div data-novelist-novelistselect=[% normalized_isbn %]></div>
</div>
@ -1025,13 +1025,13 @@
$("#marcPreview").on("hidden", function(){
$("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
});
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && ( normalized_isbn || normalized_upc ) ) %]
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( 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('NovelistSelectStaffProfile') %]',
'[% Koha.Preference('NovelistSelectPassword') %]',
function(d){
if ( d.length > 0 ){ //If no content
@ -1046,7 +1046,7 @@
verify_images();
});[% END %]
</script>
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && ( normalized_isbn || normalized_upc ) ) %]
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %]
[% Asset.js("https://imageserver.ebscohost.com/novelistselect/ns2init.js") %]
[% END %]
[% INCLUDE 'datatables.inc' %]