Bug 14399: Results form also needs a few interface changes
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 12 Apr 2017 14:06:29 +0000 (16:06 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Wed, 10 May 2017 16:23:56 +0000 (16:23 +0000)
Currently, the value of compareinv2barcd is used to determine if the
Seen column, the Select/Clear all buttons and the Mark seen buttons are
displayed. But if we scanned barcodes, we already marked items as seen.
So we should only display these buttons when we did not upload barcodes.

Test plan:
[1] Upload a barcode file. Check that the result form does not show
    the buttons.
[2] Generate an inventory list, so do not upload a barcode file. Verify
    that you still see the buttons.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt
tools/inventory.pl

index 58f3897..6fcbff8 100644 (file)
@@ -269,14 +269,14 @@ $(document).ready(function(){
     <input type="hidden" name="branchcode" value="[% branchcode %]" />
     <input type="hidden" name="datelastseen" value="[% datelastseen %]" />
 
-    [% UNLESS compareinv2barcd %]
+    [% UNLESS uploadedbarcodesflag %]
       <div><a href="#" class="checkall"><i class="fa fa-check"></i> Select all</a> <a href="#" class="clearall"><i class="fa fa-remove"></i> Clear all</a></div>
     [% END %]
 
     <table id="inventoryt">
     <thead>
         <tr>
-            [% UNLESS compareinv2barcd %]<th>Seen</th>[% END %]
+            [% UNLESS uploadedbarcodesflag %]<th>Seen</th>[% END %]
             <th>Barcode</th>
             <th>Call number</th>
             <th>Library</th>
@@ -292,7 +292,7 @@ $(document).ready(function(){
     <tbody>
     [% FOREACH result IN loop %]
         <tr>
-            [% UNLESS compareinv2barcd %]
+            [% UNLESS uploadedbarcodesflag %]
               <td>
                 <input type="checkbox" name="SEEN-[% result.itemnumber %]" value="1" />
               </td>
@@ -344,7 +344,7 @@ $(document).ready(function(){
     </tbody>
     </table>
     <div class="spacer"></div>
-    [% UNLESS compareinv2barcd %]
+    [% UNLESS uploadedbarcodesflag %]
       <div style="padding : .3em 0"><a href="#" class="checkall"><i class="fa fa-check"></i> Select all</a> <a href="#" class="clearall"><i class="fa fa-remove"></i> Clear all</a></div>
       <input type="submit" id="markseenandquit" value="Mark seen and quit" />
       <input type="submit" value="Mark seen and continue &gt;&gt;" id="markseenandcontinuebutton" />
index 76a0925..1ee40a1 100755 (executable)
@@ -123,6 +123,7 @@ $template->param(
     branch                   => $branch,
     datelastseen             => $datelastseen,
     compareinv2barcd         => $compareinv2barcd,
+    uploadedbarcodesflag     => $uploadbarcodes ? 1 : 0,
 );
 
 # Walk through uploaded barcodes, report errors, mark as seen, check in