From 06c5cb2cf63610298766da8f459b779ecac0cc47 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Tue, 10 Nov 2009 15:55:52 +0100 Subject: [PATCH] MT 2269 : Granular permissions for items batch modification and deletion MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Notes : Permissions themselves were already added in commit 50ef9288606077dfc2b457db490f6fc2a5461c6c : (bug #3396) This add batch deletion of items and fixes permissions for batch modification by Jean-André Santoni Javascript for bolding currently selected page in tools-menu.inc enhanced to support url with parameters --- .../intranet-tmpl/prog/en/includes/tools-menu.inc | 13 ++++++++++--- tools/batchMod.pl | 5 ++++- 2 files changed, 14 insertions(+), 4 deletions(-) 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 a8131c6955..31ac7545a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc @@ -1,7 +1,11 @@ @@ -33,9 +37,12 @@
  • Inventory/stocktaking
  • - + +
  • Batch deletion of items
  • + +
  • Batch modification of items
  • - +
  • MARC Import (staging)
  • diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 69598d2670..84236eaf68 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -42,10 +42,13 @@ my $op = $input->param('op'); my $del = $input->param('del'); my $template_name; +my $template_flag; if (!defined $op) { $template_name = "tools/batchMod.tmpl"; + $template_flag = { tools => '*' }; } else { $template_name = ($del) ? "tools/batchMod-del.tmpl" : "tools/batchMod-edit.tmpl"; + $template_flag = ($del) ? { tools => 'batchdel' } : { tools => 'batchmod' }; } @@ -54,7 +57,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {editcatalogue => 1}, + flagsrequired => $template_flag, }); -- 2.39.5