View | Details | Raw Unified | Return to bug 11490
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt (-1 / +2 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; Batch item modification</title>
3
<title>Koha &rsaquo; Tools &rsaquo; Batch item modification</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
Lines 163-169 $(document).ready(function(){ Link Here
163
[% IF ( show ) %]
164
[% IF ( show ) %]
164
165
165
[% IF ( too_many_items ) %]
166
[% IF ( too_many_items ) %]
166
    <p>Too many items ([% too_many_items %]): not displaying each one individually.</p>
167
    <p>Too many items ([% too_many_items %]): You are not allowed to edit more than [% Koha.Preference('MaxItemsToProcessForBatchMod') %] items in a batch.</p>
167
    [% FOREACH itemnumber IN itemnumbers_array %]
168
    [% FOREACH itemnumber IN itemnumbers_array %]
168
  <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
169
  <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
169
    [% END %]
170
    [% END %]
(-)a/tools/batchMod.pl (-4 / +6 lines)
Lines 115-121 if ($op eq "action") { Link Here
115
    # Once the job is done
115
    # Once the job is done
116
    if ($completedJobID) {
116
    if ($completedJobID) {
117
	# If we have a reasonable amount of items, we display them
117
	# If we have a reasonable amount of items, we display them
118
    if (scalar(@itemnumbers) <= ( C4::Context->preference("MaxItemsForBatch") // 1000 ) ) {
118
    if (scalar(@itemnumbers) <= ( C4::Context->preference("MaxItemsToDisplayForBatchDel") // 1000 ) ) {
119
	    $items_display_hashref=BuildItemsData(@itemnumbers);
119
	    $items_display_hashref=BuildItemsData(@itemnumbers);
120
	} else {
120
	} else {
121
	    # Else, we only display the barcode
121
	    # Else, we only display the barcode
Lines 270-277 if ($op eq "show"){ Link Here
270
270
271
    # Flag to tell the template there are valid results, hidden or not
271
    # Flag to tell the template there are valid results, hidden or not
272
    if(scalar(@itemnumbers) > 0){ $template->param("itemresults" => 1); }
272
    if(scalar(@itemnumbers) > 0){ $template->param("itemresults" => 1); }
273
    # Only display the items if there are no more than pref MaxItemsForBatch
273
    # Only display the items if there are no more than pref MaxItemsToProcessForBatchMod or MaxItemsToDisplayForBatchDel
274
    if (scalar(@itemnumbers) <= ( C4::Context->preference("MaxItemsForBatch") // 1000 ) ) {
274
    my $max_items = $del
275
        ? C4::Context->preference("MaxItemsToDisplayForBatchDel")
276
        : C4::Context->preference("MaxItemsToProcessForBatchMod");
277
    if (scalar(@itemnumbers) <= ( $max_items // 1000 ) ) {
275
        $items_display_hashref=BuildItemsData(@itemnumbers);
278
        $items_display_hashref=BuildItemsData(@itemnumbers);
276
    } else {
279
    } else {
277
        $template->param("too_many_items" => scalar(@itemnumbers));
280
        $template->param("too_many_items" => scalar(@itemnumbers));
278
- 

Return to bug 11490