MT 2269 : Granular permissions for items batch modification and deletion
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
This commit is contained in:
parent
2bfca06cbc
commit
06c5cb2cf6
|
|
@ -1,7 +1,11 @@
|
|||
<script type="text/javascript">//<![CDATA[
|
||||
$(document).ready(function() {
|
||||
var path = location.pathname.substring(1);
|
||||
$('#navmenulist a[href$="/' + path + '"]').css('font-weight','bold');
|
||||
var url = window.location.toString();
|
||||
url.match(/\?(.+)$/);
|
||||
var params = RegExp.$1;
|
||||
if (params) { params = "?" + params; }
|
||||
$('#navmenulist a[href$="/' + path + params + '"]').css('font-weight','bold');
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
|
@ -33,9 +37,12 @@
|
|||
<!-- TMPL_IF NAME="CAN_user_tools_inventory" -->
|
||||
<li><a href="/cgi-bin/koha/tools/inventory.pl">Inventory/stocktaking</a></li>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="CAN_user_tools_inventory" -->
|
||||
<!-- TMPL_IF NAME="CAN_user_tools_batchdel" -->
|
||||
<li><a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Batch deletion of items</a></li>
|
||||
<!--/TMPL_IF-->
|
||||
<!-- TMPL_IF NAME="CAN_user_tools_batchmod" -->
|
||||
<li><a href="/cgi-bin/koha/tools/batchMod.pl">Batch modification of items</a></li>
|
||||
<!--/TMPL_IF-->
|
||||
<!--/TMPL_IF-->
|
||||
<!-- TMPL_IF NAME="CAN_user_tools_stage_marc_import" -->
|
||||
<li><a href="/cgi-bin/koha/tools/stage-marc-import.pl">MARC Import (staging)</a></li>
|
||||
<!-- /TMPL_IF -->
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue