Lines 119-139
if ($op eq "action") {
Link Here
|
119 |
# Once the job is done |
119 |
# Once the job is done |
120 |
if ($completedJobID) { |
120 |
if ($completedJobID) { |
121 |
# If we have a reasonable amount of items, we display them |
121 |
# If we have a reasonable amount of items, we display them |
122 |
if (scalar(@itemnumbers) <= ( C4::Context->preference("MaxItemsToDisplayForBatchDel") // 1000 ) ) { |
122 |
my $max_items = $del ? C4::Context->preference("MaxItemsToDisplayForBatchDel") : C4::Context->preference("MaxItemsToDisplayForBatchMod"); |
123 |
$items_display_hashref=BuildItemsData(@itemnumbers); |
123 |
if (scalar(@itemnumbers) <= $max_items ){ |
124 |
} else { |
124 |
if (scalar(@itemnumbers) <= 1000 ) { |
125 |
# Else, we only display the barcode |
125 |
$items_display_hashref=BuildItemsData(@itemnumbers); |
126 |
my @simple_items_display = map { |
126 |
} else { |
127 |
my $itemnumber = $_; |
127 |
# Else, we only display the barcode |
128 |
my $item = Koha::Items->find($itemnumber); |
128 |
my @simple_items_display = map { |
129 |
{ |
129 |
my $itemnumber = $_; |
130 |
itemnumber => $itemnumber, |
130 |
my $item = Koha::Items->find($itemnumber); |
131 |
barcode => $item ? ( $item->barcode // q{} ) : q{}, |
131 |
{ |
132 |
biblionumber => $item ? $item->biblio->biblionumber : q{}, |
132 |
itemnumber => $itemnumber, |
133 |
}; |
133 |
barcode => $item ? ( $item->barcode // q{} ) : q{}, |
134 |
} @itemnumbers; |
134 |
biblionumber => $item ? $item->biblio->biblionumber : q{}, |
135 |
$template->param("simple_items_display" => \@simple_items_display); |
135 |
}; |
136 |
} |
136 |
} @itemnumbers; |
|
|
137 |
$template->param("simple_items_display" => \@simple_items_display); |
138 |
} |
139 |
} else { |
140 |
$template->param( "too_many_items_display" => scalar(@itemnumbers) ); |
141 |
$template->param( "job_completed" => 1 ); |
142 |
} |
137 |
|
143 |
|
138 |
# Setting the job as done |
144 |
# Setting the job as done |
139 |
my $job = C4::BackgroundJob->fetch($sessionID, $completedJobID); |
145 |
my $job = C4::BackgroundJob->fetch($sessionID, $completedJobID); |
140 |
- |
|
|