From ca4f4c6680b053f49d448b01d3088842aacd20a4 Mon Sep 17 00:00:00 2001 From: Nick Clemens 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 Internal signoff. Signed-off-by: Alexis Rodegerdts Signed-off-by: Dwayne Nance Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall --- ...g_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 0000000000..ee4f78cd2e --- /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 4e947fd87a..46f89d5a76 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -262,6 +262,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 ce8bee3838..b72efdad67 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 e8de7546fe..351dc6ccfc 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 %] + +[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && ( normalized_isbn || normalized_upc ) ) %] + +[% END %] + [% INCLUDE 'doc-head-close.inc' %]