From 7f3df2735d54574dd7cb6f58519130922a11c53f Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Wed, 24 Mar 2010 09:24:18 +0100 Subject: [PATCH] MT 2269, Follow-up : Granular permissions for items batch modification and deletion Change of permissions names Change of branch title in guided reports Add a "Select All / Clean All" on items selection Add a link to item when a given item cannot be deleted Signed-off-by: Galen Charlton --- .../data/mysql/en/mandatory/userpermissions.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 10 ++++++++++ koha-tmpl/intranet-tmpl/prog/en/columns.def | 4 ++-- .../intranet-tmpl/prog/en/includes/tools-menu.inc | 4 ++-- .../prog/en/modules/tools/batchMod-del.tmpl | 14 +++++++++++++- .../prog/en/modules/tools/batchMod-edit.tmpl | 14 +++++++++++++- .../prog/en/modules/tools/batchMod.tmpl | 1 + .../prog/en/modules/tools/tools-home.tmpl | 13 +++++++------ kohaversion.pl | 2 +- tools/batchMod.pl | 4 ++-- 10 files changed, 53 insertions(+), 17 deletions(-) diff --git a/installer/data/mysql/en/mandatory/userpermissions.sql b/installer/data/mysql/en/mandatory/userpermissions.sql index d737ae6f6e..a392c142e5 100644 --- a/installer/data/mysql/en/mandatory/userpermissions.sql +++ b/installer/data/mysql/en/mandatory/userpermissions.sql @@ -30,8 +30,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES (13, 'delete_anonymize_patrons', 'Delete old borrowers and anonymize circulation history (deletes borrower reading history)'), (13, 'batch_upload_patron_images', 'Upload patron images in batch or one at a time'), (13, 'schedule_tasks', 'Schedule tasks to run'), - (13, 'batchmod', 'Perform batch modification of items'), - (13, 'batchdel', 'Perform batch deletion of items'), + (13, 'items_batchmod', 'Perform batch modification of items'), + (13, 'items_batchdel', 'Perform batch deletion of items'), (13, 'manage_csv_profiles', 'Manage CSV export profiles'), (13, 'moderate_tags', 'Moderate patron tags'), (13, 'rotating_collections', 'Manage rotating collections'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index eb364d3f39..908bb7c7f0 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3555,6 +3555,16 @@ if (C4::Context->preference('Version') < TransformToNum($DBversion)){ SetVersion ($DBversion); } +$DBversion = "3.02.00.129"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("UPDATE `permissions` SET `code` = 'items_batchdel' WHERE `permissions`.`module_bit` =13 AND `permissions`.`code` = 'batchdel' LIMIT 1 ;"); + $dbh->do("UPDATE `permissions` SET `code` = 'items_batchmod' WHERE `permissions`.`module_bit` =13 AND `permissions`.`code` = 'batchmod' LIMIT 1 ;"); + print "Upgrade done (Change permissions names for item batch modification / deletion)\n"; + + SetVersion ($DBversion); +} + + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/koha-tmpl/intranet-tmpl/prog/en/columns.def b/koha-tmpl/intranet-tmpl/prog/en/columns.def index 6493288a35..4aa66378d5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/columns.def +++ b/koha-tmpl/intranet-tmpl/prog/en/columns.def @@ -56,7 +56,7 @@ items.biblioitemnumber Biblioitem Number (koha internal) items.barcode Barcode items.dateaccessioned Accession Date items.booksellerid Supplier ID -items.homebranch Permanent Branch Code +items.homebranch Home Branch items.price Price items.replacementprice Replacement Price items.replacementpricedate Date Replacement Price was set @@ -75,7 +75,7 @@ items.reserves Reserves Count items.restricted Item Restricted items.binding Item needs binding items.itemnotes Item Notes -items.holdingbranch Current Branch +items.holdingbranch Holding Branch items.paidfor Has Item been lost and then paid for items.timestamp Timestamp items.location Location diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc index c5b81c67bb..a9e4450c5e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc @@ -43,10 +43,10 @@
Catalog