@@ -, +, @@ from bachMod-del commit 928c0af2b6a2c7aa6ed54019c5bd7dbddbccf4ee Bug 15824 - 'Done' button is unclear on batch item modification and deletion --- .../prog/en/modules/tools/batchMod-del.tt | 12 ++++++++++-- tools/batchMod.pl | 18 ++++++++++++------ 2 files changed, 22 insertions(+), 8 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt @@ -200,7 +200,11 @@

[% deleted_items | html %] item(s) deleted.

[% IF delete_records %]

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

[% END %] [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%] - Return to the record + [% IF biblio_deleted %] + Return to the cataloging module + [% ELSE %] + Return to the record + [% END %] [% ELSIF src %] Return to where you were [% ELSE %] @@ -235,7 +239,11 @@

[% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%] - Return to the record + [% IF biblio_deleted %] + Return to the cataloging module + [% ELSE %] + Return to the record + [% END %] [% ELSIF src %] Return to where you were [% ELSE %] --- a/tools/batchMod.pl +++ a/tools/batchMod.pl @@ -200,14 +200,20 @@ if ($op eq "action") { }; } - # If there are no items left, delete the biblio - if ( $del_records ) { - my $itemscount = Koha::Biblios->find( $itemdata->{'biblionumber'} )->items->count; - if ( $itemscount == 0 ) { - my $error = DelBiblio($itemdata->{'biblionumber'}); - $deleted_records++ unless ( $error ); + # If there are no items left, delete the biblio + if ($del_records) { + my $itemscount = Koha::Biblios->find( $itemdata->{'biblionumber'} )->items->count; + if ( $itemscount == 0 ) { + my $error = DelBiblio( $itemdata->{'biblionumber'} ); + unless ($error) { + $deleted_records++; + if ( $src eq 'CATALOGUING' ) { + # We are coming catalogue/detail.pl, there were items from a single bib record + $template->param( biblio_deleted => 1 ); } } + } + } } else { if ($values_to_modify || $values_to_blank) { my $localmarcitem = Item2Marc($itemdata); --