-
-<h2>Items to be Printed for Batch <!-- TMPL_VAR NAME="batch_id" --> (<!-- TMPL_VAR NAME="batch_count" --> items)</h2>
-
-<table>
-<tr>
- <th>Label Number</th>
- <th>Summary</th>
- <th>Item Type</th>
- <th>Barcode</th>
- <th>Delete</th>
-</tr>
-<!-- TMPL_LOOP NAME="resultsloop" -->
-<tr>
- <td>
- <!-- TMPL_VAR NAME="labelno" -->
- </td>
- <td>
- <b> <a href="/cgi-bin/koha/detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"> <!-- TMPL_VAR NAME="title" -->:</a></b> <!-- TMPL_VAR NAME="author" -->:
- <!-- TMPL_VAR NAME="isbn" --> </td>
- <td> <!-- TMPL_VAR NAME="itemtype" --> </td>
- <td> <!-- TMPL_VAR NAME="barcode" --> </td>
- <td>
- <a href="/cgi-bin/koha/labels/label-manager.pl?op=delete&itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->&batch_id=<!-- TMPL_VAR NAME="batch_id" -->">Delete</a>
- </td>
-</tr>
-<!-- /TMPL_LOOP -->
-</table>
-
-
-<!-- /TMPL_UNLESS -->
-
+<!-- TMPL_ELSE -->
+<!-- TMPL_INCLUDE NAME="tools-labels-toolbar.inc" -->
+<!-- TMPL_IF EXPR="(type eq 'labels')" -->
+<!-- TMPL_IF NAME="batches" -->
+ <div class="yui-g">
+ <div class="yui-u first">
+ <h2>Label Batches</h2>
+ <table>
+ <tr>
+ <th>ID</th>
+ <th>#</th>
+ <th>Edit</th>
+ <th>Delete</th>
+ <th>Print</th>
+ </tr>
+ <!-- TMPL_LOOP NAME="batches" -->
+ <tr>
+ <td><!-- TMPL_VAR NAME="batch_id" --></td>
+ <td><!-- TMPL_VAR NAME="num" --> records</td>
+ <td><a href="/cgi-bin/koha/labels/label-manager.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->&type=labels">Edit</a></td>
+ <td><a href="/cgi-bin/koha/labels/label-manager.pl?op=delete_batch&batch_id=<!-- TMPL_VAR NAME="batch_id" -->&type=labels">Delete</a><!-- FIXME: should use POST to change server state, not GET --></td>
+ <td><a style="float: left;" href="/cgi-bin/koha/labels/label-print-pdf.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->&type=labels">Generate PDF for Batch <!-- TMPL_VAR NAME="batch_id" --></a></td>
+ </tr>
+ <!-- /TMPL_LOOP -->
+ </table>
+ </div>
+ <div class="yui-u">
+ <!-- TMPL_INCLUDE NAME="label-status.inc" -->
+ </div>
+ </div>
+<!-- TMPL_ELSE -->
+ <div class="yui-g">
+ <div class="yui-u first">
+ <fieldset class="brief">
+ <legend>No Label Batches Currently Defined</legend>
+ <div class="hint">
+ Select "New Label Batch" to create a Label batch.
+ </div>
+ </fieldset>
+ </div>
+ <div class="yui-u">
+ <!-- TMPL_INCLUDE NAME="label-status.inc" -->
+ </div>
+ </div>
+<!-- /TMPL_IF --><!-- /batches -->
+<!-- TMPL_ELSIF EXPR="(type eq 'patroncards')" -->
+<!-- TMPL_IF NAME="batches" -->
+ <div class="yui-g">
+ <div class="yui-u first">
+ <h2>Patron Card Batches</h2>
+ <table>
+ <tr>
+ <th>ID</th>
+ <th>#</th>
+ <th>Edit</th>
+ <th>Delete</th>
+ <th>Print</th>
+ </tr>
+ <!-- TMPL_LOOP NAME="batches" -->
+ <tr>
+ <td><!-- TMPL_VAR NAME="batch_id" --></td>
+ <td><!-- TMPL_VAR NAME="num" --> records</td>
+ <td><a href="/cgi-bin/koha/labels/label-manager.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->&type=patroncards">Edit</a></td>
+ <td><a href="/cgi-bin/koha/labels/label-manager.pl?op=delete_batch&batch_id=<!-- TMPL_VAR NAME="batch_id" -->&type=patroncards">Delete</a><!-- FIXME: should use POST to change server state, not GET --></td>
+ <td><a style="float: left;" href="/cgi-bin/koha/labels/label-print-pdf.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->&type=patroncards">Generate PDF for Batch <!-- TMPL_VAR NAME="batch_id" --></a></td>
+ </tr>
+ <!-- /TMPL_LOOP -->
+ </table>
+ </div>
+ <div class="yui-u">
+ <!-- TMPL_INCLUDE NAME="label-status.inc" -->
+ </div>
+ </div>
+<!-- TMPL_ELSE -->
+ <div class="yui-g">
+ <div class="yui-u first">
+ <fieldset class="brief">
+ <legend>No Patron Card Batches Currently Defined</legend>
+ <div class="hint">
+ Select "New Patron Card Batch" to create a Label batch.
+ </div>
+ </fieldset>
+ </div>
+ <div class="yui-u">
+ <!-- TMPL_INCLUDE NAME="label-status.inc" -->
+ </div>
+ </div>
+<!-- /TMPL_IF --><!-- /batches -->
+<!-- /TMPL_IF --><!-- /type -->
+<!-- /TMPL_IF --><!-- batch_id -->