From 6c36042e858068f01494bf129e82a62b48cc4e10 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 27 Dec 2017 13:18:26 +0000 Subject: [PATCH] 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 Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- ...ug_19882_Add_novelist_staff_client_profile.perl | 7 +++++++ installer/data/mysql/sysprefs.sql | 5 +++-- .../admin/preferences/enhanced_content.pref | 8 +++++++- .../prog/en/modules/catalogue/detail.tt | 14 +++++++------- 4 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_19882_Add_novelist_staff_client_profile.perl diff --git a/installer/data/mysql/atomicupdate/bug_19882_Add_novelist_staff_client_profile.perl b/installer/data/mysql/atomicupdate/bug_19882_Add_novelist_staff_client_profile.perl new file mode 100644 index 0000000000..4109085daf --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_19882_Add_novelist_staff_client_profile.perl @@ -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"; +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 3fbb55b6f2..d498841e83 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -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'), 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 ad273843ba..56f9c56e7e 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 @@ -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 - . 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 bc830562b7..ec6695c2ce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -303,7 +303,7 @@ [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]
  • Editions
  • [% END %][% END %] [% IF ( LocalCoverImages ) %][% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %]
  • Images
  • [% END %][% END %] [% IF ( HTML5MediaEnabled ) %][% IF ( HTML5MediaSets ) %]
  • Play media
  • [% END %][% END %] -[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %] +[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %] [% END %] @@ -547,7 +547,7 @@
    -[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %] +[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'above' ) %]