Bug 21141: Handle non-existent itemnumbers in batch item modification/deletion
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / batchMod-del.tt
index 835be89..1845229 100644 (file)
 
     [% UNLESS ( action ) %]
 
-    [% IF ( notfoundbarcodes ) %]
+    [% IF ( notfoundbarcodes.size ) %]
         <div class="dialog alert">
-        [% IF ( itemresults ) %]<p>Warning, the following barcodes were not found:</p>[% ELSE %]<p>Warning: no barcodes were found</p>[% END %]
+            [% IF ( itemresults ) %]<p>Warning, the following barcodes were not found:</p>[% ELSE %]<p>Warning: no barcodes were found</p>[% END %]
         </div>
         <table style="margin:auto;">
-        <thead>
-            <tr>
-            <th>Barcode</th>
-            </tr>
-        </thead>
-        <tbody>
-            [% FOREACH notfoundbarcode IN notfoundbarcodes %]
-            <tr><td>[% notfoundbarcode.barcode |html %]</td></tr>
+            <thead>
+                <tr><th>Barcodes not found</th></tr>
+            </thead>
+            <tbody>
+                [% FOREACH notfoundbarcode IN notfoundbarcodes %]
+                    <tr><td>[% notfoundbarcode |html %]</td></td>
+                [% END %]
+            </tbody>
+        </table>
+        [% IF ( item_loop ) %]
+            [% UNLESS ( too_many_items ) %]
+                <h4>The following barcodes were found: </h4>
             [% END %]
-        </tbody>
+        [% END %]
+    [% END %] <!-- /notfoundbarcodes -->
+    [% IF ( notfounditemnumbers.size ) %]
+        <div class="dialog alert">
+            [% IF ( itemresults ) %]<p>Warning, the following itemnumbers were not found:</p>[% ELSE %]<p>Warning: no itemnumbers were found</p>[% END %]
+        </div>
+        <table style="margin:auto;">
+            <thead>
+                <tr><th>Itemnumbers not found</th></tr>
+            </thead>
+            <tbody>
+                [% FOREACH notfounditemnumber IN notfounditemnumbers %]
+                    <tr><td>[% notfounditemnumber |html %]</td></td>
+                [% END %]
+            </tbody>
         </table>
-        [% UNLESS ( too_many_items ) %]
-        [% IF ( item_loop ) %]<h4>The following barcodes were found: </h4>[% END %]
+        [% IF ( item_loop ) %]
+            [% UNLESS ( too_many_items ) %]
+                <h4>The following itemnumbers were found: </h4>
+            [% END %]
         [% END %]
-    [% END %]
+    [% END %] <!-- /notfounditemnumbers -->
+
+
 
 
 <form name="f" action="batchMod.pl" method="post">