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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt (-14 / +36 lines)
Lines 28-53 Link Here
28
28
29
    [% UNLESS ( action ) %]
29
    [% UNLESS ( action ) %]
30
30
31
    [% IF ( notfoundbarcodes ) %]
31
    [% IF ( notfoundbarcodes.size ) %]
32
        <div class="dialog alert">
32
        <div class="dialog alert">
33
        [% IF ( itemresults ) %]<p>Warning, the following barcodes were not found:</p>[% ELSE %]<p>Warning: no barcodes were found</p>[% END %]
33
            [% IF ( itemresults ) %]<p>Warning, the following barcodes were not found:</p>[% ELSE %]<p>Warning: no barcodes were found</p>[% END %]
34
        </div>
34
        </div>
35
        <table style="margin:auto;">
35
        <table style="margin:auto;">
36
        <thead>
36
            <thead>
37
            <tr>
37
                <tr><th>Barcodes not found</th></tr>
38
            <th>Barcode</th>
38
            </thead>
39
            </tr>
39
            <tbody>
40
        </thead>
40
                [% FOREACH notfoundbarcode IN notfoundbarcodes %]
41
        <tbody>
41
                    <tr><td>[% notfoundbarcode |html %]</td></td>
42
            [% FOREACH notfoundbarcode IN notfoundbarcodes %]
42
                [% END %]
43
            <tr><td>[% notfoundbarcode.barcode |html %]</td></tr>
43
            </tbody>
44
        </table>
45
        [% IF ( item_loop ) %]
46
            [% UNLESS ( too_many_items ) %]
47
                <h4>The following barcodes were found: </h4>
44
            [% END %]
48
            [% END %]
45
        </tbody>
49
        [% END %]
50
    [% END %] <!-- /notfoundbarcodes -->
51
    [% IF ( notfounditemnumbers.size ) %]
52
        <div class="dialog alert">
53
            [% IF ( itemresults ) %]<p>Warning, the following itemnumbers were not found:</p>[% ELSE %]<p>Warning: no itemnumbers were found</p>[% END %]
54
        </div>
55
        <table style="margin:auto;">
56
            <thead>
57
                <tr><th>Itemnumbers not found</th></tr>
58
            </thead>
59
            <tbody>
60
                [% FOREACH notfounditemnumber IN notfounditemnumbers %]
61
                    <tr><td>[% notfounditemnumber |html %]</td></td>
62
                [% END %]
63
            </tbody>
46
        </table>
64
        </table>
47
        [% UNLESS ( too_many_items ) %]
65
        [% IF ( item_loop ) %]
48
        [% IF ( item_loop ) %]<h4>The following barcodes were found: </h4>[% END %]
66
            [% UNLESS ( too_many_items ) %]
67
                <h4>The following itemnumbers were found: </h4>
68
            [% END %]
49
        [% END %]
69
        [% END %]
50
    [% END %]
70
    [% END %] <!-- /notfounditemnumbers -->
71
72
51
73
52
74
53
<form name="f" action="batchMod.pl" method="post">
75
<form name="f" action="batchMod.pl" method="post">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt (-17 / +37 lines)
Lines 90-113 $(document).ready(function(){ Link Here
90
[% IF ( book_on_loan ) %]<div class="dialog alert"><strong>Cannot Delete</strong>: item is checked out.</div>[% END %]
90
[% IF ( book_on_loan ) %]<div class="dialog alert"><strong>Cannot Delete</strong>: item is checked out.</div>[% END %]
91
[% IF ( book_reserved ) %]<div class="dialogalert"><strong>Cannot Delete</strong>: item has a waiting hold.</div>[% END %]
91
[% IF ( book_reserved ) %]<div class="dialogalert"><strong>Cannot Delete</strong>: item has a waiting hold.</div>[% END %]
92
92
93
    [% IF ( notfoundbarcodes ) %]
93
    [% IF ( notfoundbarcodes.size ) %]
94
      <div class="dialog alert"><p>Warning, the following barcodes were not found:</p></div>
94
        <div class="dialog alert"><p>Warning, the following barcodes were not found:</p></div>
95
      <table style="margin:auto;">
95
        <table style="margin:auto;">
96
    <thead>
96
            <thead>
97
        <tr><th>Barcodes not found</th></tr>
97
                <tr><th>Barcodes not found</th></tr>
98
    </thead>
98
            </thead>
99
    <tbody>
99
            <tbody>
100
        [% FOREACH notfoundbarcode IN notfoundbarcodes %]
100
                [% FOREACH notfoundbarcode IN notfoundbarcodes %]
101
      <tr><td>[% notfoundbarcode.barcode |html %]</td></td>
101
                    <tr><td>[% notfoundbarcode |html %]</td></td>
102
                [% END %]
103
            </tbody>
104
        </table>
105
        [% IF ( item_loop ) %]
106
            [% UNLESS ( too_many_items ) %]
107
                <h4>The following barcodes were found: </h4>
108
            [% END %]
102
        [% END %]
109
        [% END %]
103
    </tbody>
110
    [% END %] <!-- /notfoundbarcodes -->
104
      </table>
111
    [% IF ( notfounditemnumbers.size ) %]
105
      [% IF ( item_loop ) %]
112
        <div class="dialog alert"><p>Warning, the following itemnumbers were not found:</p></div>
106
          [% UNLESS ( too_many_items ) %]
113
        <table style="margin:auto;">
107
          <h4>The following barcodes were found: </h4>
114
            <thead>
108
          [% END %]
115
                <tr><th>Itemnumbers not found</th></tr>
109
      [% END %]
116
            </thead>
110
  [% END %] <!-- /notfoundbarcodes -->
117
            <tbody>
118
                [% FOREACH notfounditemnumber IN notfounditemnumbers %]
119
                    <tr><td>[% notfounditemnumber |html %]</td></td>
120
                [% END %]
121
            </tbody>
122
        </table>
123
        [% IF ( item_loop ) %]
124
            [% UNLESS ( too_many_items ) %]
125
                <h4>The following itemnumbers were found: </h4>
126
            [% END %]
127
        [% END %]
128
    [% END %] <!-- /notfounditemnumbers -->
129
130
111
131
112
<form name="f" action="batchMod.pl" method="post">
132
<form name="f" action="batchMod.pl" method="post">
113
     <input type="hidden" name="op" value="[% op %]" />
133
     <input type="hidden" name="op" value="[% op %]" />
(-)a/tools/batchMod.pl (-8 / +9 lines)
Lines 233-239 if ($op eq "action") { Link Here
233
if ($op eq "show"){
233
if ($op eq "show"){
234
    my $filefh = $input->upload('uploadfile');
234
    my $filefh = $input->upload('uploadfile');
235
    my $filecontent = $input->param('filecontent');
235
    my $filecontent = $input->param('filecontent');
236
    my @notfoundbarcodes;
236
    my ( @notfoundbarcodes, @notfounditemnumbers);
237
237
238
    my @contentlist;
238
    my @contentlist;
239
    if ($filefh){
239
    if ($filefh){
Lines 255-261 if ($op eq "show"){ Link Here
255
            }
255
            }
256
        }
256
        }
257
        elsif ( $filecontent eq 'itemid_file') {
257
        elsif ( $filecontent eq 'itemid_file') {
258
            @itemnumbers = @contentlist;
258
            @itemnumbers = Koha::Items->search({ itemnumber => \@contentlist })->get_column('itemnumber');
259
            my %exists = map {$_=>1} @itemnumbers;
260
            @notfounditemnumbers = grep { !$exists{$_} } @contentlist;
259
        }
261
        }
260
    } else {
262
    } else {
261
        if (defined $biblionumber){
263
        if (defined $biblionumber){
Lines 496-506 $authorised_values_sth->finish; Link Here
496
498
497
499
498
    # what's the next op ? it's what we are not in : an add if we're editing, otherwise, and edit.
500
    # what's the next op ? it's what we are not in : an add if we're editing, otherwise, and edit.
499
    $template->param(item => \@loop_data);
501
    $template->param(
500
    if (@notfoundbarcodes) { 
502
        item                => \@loop_data,
501
	my @notfoundbarcodesloop = map{{barcode=>$_}}@notfoundbarcodes;
503
        notfoundbarcodes    => \@notfoundbarcodes,
502
    	$template->param(notfoundbarcodes => \@notfoundbarcodesloop);
504
        notfounditemnumbers => \@notfounditemnumbers
503
    }
505
    );
504
    $nextop="action"
506
    $nextop="action"
505
} # -- End action="show"
507
} # -- End action="show"
506
508
507
- 

Return to bug 21141