From 1671eecffaabb8721b1507ee717602657710f6d7 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 7 Aug 2020 00:43:29 +0000 Subject: [PATCH] Bug 5428: (QA follow-up) Add searchid for deleting items in a batch and editing in batch Signed-off-by: Nick Clemens --- .../intranet-tmpl/prog/en/modules/tools/batchMod-del.tt | 16 +++++++++++++++- .../intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt | 13 +++++++++++-- tools/batchMod.pl | 3 ++- 3 files changed, 28 insertions(+), 4 deletions(-) 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 eb5ddd82c6..acdf6bcd02 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 @@ -76,6 +76,7 @@
+ @@ -221,9 +222,16 @@ [% IF delete_records %]

[% deleted_records | html %] record(s) deleted.

[% END %] [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%] [% IF biblio_deleted %] + [% IF searchid %] + + [% END %] Return to the cataloging module [% ELSE %] - Return to the record + [% IF searchid %] + Return to the record + [% ELSE %] + Return to the record + [% END %] [% END %] [% ELSIF src %] Return to where you were @@ -289,6 +297,7 @@ [% INCLUDE 'datatables.inc' %] [% Asset.js("js/pages/batchMod.js") | $raw %] [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] + [% Asset.js("js/browser.js") | $raw %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt index 283ef381ef..3730e316bb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt @@ -98,7 +98,11 @@ $(document).ready(function(){ [% END %]
[% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%] - Return to the record + [% IF searchid %] + Return to the record + [% ELSE %] + Return to the record + [% END %] [% ELSIF src %] Return to where you were [% ELSE %] @@ -150,6 +154,7 @@ $(document).ready(function(){ + @@ -350,7 +355,11 @@ $(document).ready(function(){ [% ELSE %]
[% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%] - Return to the record + [% IF searchid %] + Return to the record + [% ELSE %] + Return to the record + [% END %] [% ELSIF src %] Return to where you were [% ELSE %] diff --git a/tools/batchMod.pl b/tools/batchMod.pl index fe40f84c7e..975f7997c5 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -69,7 +69,6 @@ if (!defined $op) { $template_flag = ($del) ? { tools => 'items_batchdel' } : { tools => 'items_batchmod' }; } - my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => $template_name, query => $input, @@ -78,6 +77,8 @@ my ($template, $loggedinuser, $cookie) flagsrequired => $template_flag, }); +$template->param( searchid => scalar $input->param('searchid'), ); + # Does the user have a restricted item edition permission? my $uid = $loggedinuser ? Koha::Patrons->find( $loggedinuser )->userid : undef; my $restrictededition = $uid ? haspermission($uid, {'tools' => 'items_batchmod_restricted'}) : undef; -- 2.11.0