@@ -, +, @@ things --- .../intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt | 3 ++- tools/batchMod.pl | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt @@ -1,3 +1,4 @@ +[% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Batch item modification [% INCLUDE 'doc-head-close.inc' %] @@ -163,7 +164,7 @@ $(document).ready(function(){ [% IF ( show ) %] [% IF ( too_many_items ) %] -

Too many items ([% too_many_items %]): not displaying each one individually.

+

Too many items ([% too_many_items %]): You are not allowed to edit more than [% Koha.Preference('MaxItemsToProcessForBatchMod') %] items in a batch.

[% FOREACH itemnumber IN itemnumbers_array %] [% END %] --- a/tools/batchMod.pl +++ a/tools/batchMod.pl @@ -115,7 +115,7 @@ if ($op eq "action") { # Once the job is done if ($completedJobID) { # If we have a reasonable amount of items, we display them - if (scalar(@itemnumbers) <= ( C4::Context->preference("MaxItemsForBatch") // 1000 ) ) { + if (scalar(@itemnumbers) <= ( C4::Context->preference("MaxItemsToDisplayForBatchDel") // 1000 ) ) { $items_display_hashref=BuildItemsData(@itemnumbers); } else { # Else, we only display the barcode @@ -270,8 +270,11 @@ if ($op eq "show"){ # Flag to tell the template there are valid results, hidden or not if(scalar(@itemnumbers) > 0){ $template->param("itemresults" => 1); } - # Only display the items if there are no more than pref MaxItemsForBatch - if (scalar(@itemnumbers) <= ( C4::Context->preference("MaxItemsForBatch") // 1000 ) ) { + # Only display the items if there are no more than pref MaxItemsToProcessForBatchMod or MaxItemsToDisplayForBatchDel + my $max_items = $del + ? C4::Context->preference("MaxItemsToDisplayForBatchDel") + : C4::Context->preference("MaxItemsToProcessForBatchMod"); + if (scalar(@itemnumbers) <= ( $max_items // 1000 ) ) { $items_display_hashref=BuildItemsData(@itemnumbers); } else { $template->param("too_many_items" => scalar(@itemnumbers)); --