Bug 11625 - Add system preferences DefaultToLoggedInLibraryCircRules and DefaultToLog...
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 21 Apr 2015 14:59:46 +0000 (10:59 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Wed, 30 Dec 2015 11:41:13 +0000 (11:41 +0000)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: INSERT IGNORE INTO + msg

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref

index 484b3cd..fe92bcb 100644 (file)
@@ -111,6 +111,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('DefaultLongOverdueLostValue', NULL, NULL, "Set the LOST value of an item to n when the item has been overdue for more than defaultlongoverduedays days.", 'integer'),
 ('defaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
 ('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'),
+('DefaultToLoggedInLibraryCircRules',  '0', NULL ,  'If enabled, circ rules editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
+('DefaultToLoggedInLibraryNoticesSlips',  '0', NULL ,  'If enabled,slips and notices editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'),
 ('delimiter',';',';|tabulation|,|/|\\|#||','Define the default separator character for exporting reports','Choice'),
 ('Display856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','Choice'),
 ('DisplayClearScreenButton','0','','If set to ON, a clear screen button will appear on the circulation page.','YesNo'),
index f8ab41e..c9b4f3a 100755 (executable)
@@ -11390,6 +11390,21 @@ if ( CheckVersion($DBversion) ) {
     SetVersion ($DBversion);
 }
 
+$DBversion = "3.21.00.XXX";
+if(CheckVersion($DBversion)) {
+    $dbh->do(q{
+        INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type )
+        VALUES (
+            'DefaultToLoggedInLibraryCircRules',  '0', NULL ,  'If enabled, circ rules editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'
+        ), (
+            'DefaultToLoggedInLibraryNoticesSlips',  '0', NULL ,  'If enabled,slips and notices editor will default to the logged in library''s rules, rather than the ''all libraries'' rules.',  'YesNo'
+        )
+    });
+
+    print "Upgrade to $DBversion done (Bug 11625 - Add pref DefaultToLoggedInLibraryCircRules and DefaultToLoggedInLibraryNoticesSlips)\n";
+    SetVersion($DBversion);
+}
+
 # DEVELOPER PROCESS, search for anything to execute in the db_update directory
 # SEE bug 13068
 # if there is anything in the atomicupdate, read and execute it.
index 95be458..d9649c5 100644 (file)
@@ -50,6 +50,20 @@ Administration:
                   yes: Allow
                   no: "Don't allow"
             - staff and patrons to create and view saved lists of books.
+        -
+            - When editing circulation rules show the
+            - pref: DefaultToLoggedInLibraryCircRules
+              choices:
+                  yes: "logged in library's"
+                  no: "all libraries"
+            - rules by default.
+        -
+            - When editing notices and slips show the
+            - pref: DefaultToLoggedInLibraryNoticesSlips
+              choices:
+                  yes: "logged in library's"
+                  no: "all libraries"
+            - notices and slips by default.
     Login options:
         -
             - Automatically log out users after