From 85243da0b437b30676a6d4d4f490be7c917d5d10 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 18 May 2020 11:40:14 +0100 Subject: [PATCH] Bug 13881: (RM follow-up) Make 'Desks' feature optional This patch adds a new 'UseIssueDesks' preference which defaults to "Don't use" to enabled/disable the 'Desks' functionality added with this bug. Signed-off-by: Martin Renvoize --- installer/data/mysql/atomicupdate/bug_13881.perl | 11 +++++++++++ installer/data/mysql/sysprefs.sql | 1 + .../intranet-tmpl/prog/en/modules/admin/admin-home.tt | 6 ++++-- .../en/modules/admin/preferences/circulation.pref | 6 ++++++ 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_13881.perl diff --git a/installer/data/mysql/atomicupdate/bug_13881.perl b/installer/data/mysql/atomicupdate/bug_13881.perl new file mode 100644 index 0000000000..ac11e53469 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_13881.perl @@ -0,0 +1,11 @@ +$DBversion = 'XXX'; # will be replaced by the RM + if ( CheckVersion($DBversion) ) { + + $dbh->do(qq{ + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES + ('UseIssueDesks','0','','Use issue desks with circulation.','YesNo') + }); + + SetVersion($DBversion); + print "Upgrade to $DBversion done (Bug 13881 - Add cash register system preference)\n"; + } diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 58bd459e94..00fba528b9 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -686,6 +686,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('useDischarge','','','Allows librarians to discharge borrowers and borrowers to request a discharge','YesNo'), ('UseEmailReceipts','0','','Send email receipts for payments and write-offs','YesNo'), ('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'), +('UseIssueDesks','0','','Use issue desks with circulation.','YesNo'), ('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'), ('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'), ('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt index 82d766f6c0..f0378891b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt @@ -63,8 +63,6 @@
Define libraries.
Library groups
Define hierarchical library groups.
-
Desks
-
Define desks
[% END %] [% IF ( CAN_user_parameters_manage_itemtypes ) %]
Item types
@@ -102,6 +100,10 @@
Item circulation alerts
Define rules for check-in and checkout notifications for combinations of libraries, patron categories, and item types
[% END %] + [% IF ( Koha.Preference('UseIssueDesks') && CAN_user_parameters_manage_libraries ) %] +
Issue desks
+
Define issue desks
+ [% END %] [% IF ( CAN_user_parameters_manage_cities ) %]
Cities and towns
Define cities and towns that your patrons live in.
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 9ea394b716..11f1ba5b2f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -156,6 +156,12 @@ Circulation: yes: Allow no: "Don't allow" - patrons to submit notes about checked out items. + - + - pref: UseIssueDesks + choices: + yes: "Use" + no: "Don't use" + - issue desks with circulation. Checkout policy: - -- 2.39.5