From 39ad9abb74b4225c23c04a76131a49f17038b2fe Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 21 Sep 2012 12:05:19 +0200 Subject: [PATCH] Bug 8801: Add menu entry to delete items in batch In catalogue/detail.pl you can now select "Delete items in batch" in "Edit" menu. You are redirected to batchMod.pl for chosing which items have to be deleted. You need to have 'tools.items_batchdel' permission to see this menu entry. Signed-off-by: Marc Veron Works as expected. Signed-off-by: Paul Poulain --- .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 1 + .../prog/en/modules/tools/batchMod-del.tt | 10 +++++++++- tools/batchMod.pl | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index 24d389494a..740a3b50fb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -111,6 +111,7 @@ function confirm_items_deletion() { [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Edit record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=&op=" },[% END %] [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Edit items"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]" },[% END %] [% IF ( CAN_user_tools_items_batchmod ) %]{ text: _("Edit items in batch"), url: "/cgi-bin/koha/tools/batchMod.pl?op=show&biblionumber=[% biblionumber %]&src=CATALOGUING" },[% END %] + [% IF ( CAN_user_tools_items_batchdel ) %]{ text: _("Delete items in batch"), url: "/cgi-bin/koha/tools/batchMod.pl?del=1&op=show&biblionumber=[% biblionumber %]&src=CATALOGUING" },[% END %] [% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Attach item"), url: "/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber %]" },[% END %] [% IF ( EasyAnalyticalRecords ) %][% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Link to host item"), url: "/cgi-bin/koha/cataloguing/linkitem.pl?biblionumber=[% biblionumber %]" },[% END %][% END %] [% IF ( LocalCoverImages || OPACLocalCoverImages) %][% IF ( CAN_user_tools_upload_local_cover_images ) %]{ text: _("Upload image"), url: "/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&filetype=image" },[% END %][% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt index 3d511ea4ff..e3f6b296bb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt @@ -65,6 +65,8 @@ for( x=0; x + + @@ -175,7 +177,13 @@ for( x=0; x [% END %] -

Return to batch item deletion

+

+ [% IF ( src == 'CATALOGUING') %] + Done + [% ELSE %] + Return to batch item deletion + [% END %] +

[% END %] diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 3ba93a8ec4..c7a8b9ecca 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -460,6 +460,7 @@ foreach my $error (@errors) { $template->param($error => 1); } $template->param(src => $src); +$template->param(biblionumber => $biblionumber); output_html_with_http_headers $input, $cookie, $template->output; exit; -- 2.39.5