Bug 3721 - advancedMARCeditor options swapped
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / label-manager.tmpl
index 6c3fa67..aab84df 100644 (file)
@@ -1,16 +1,11 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha &rsaquo;  Labels</title>
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha &rsaquo; Tools &rsaquo; Labels &rsaquo; <!-- TMPL_IF NAME="batch_is_labels" -->Label<!-- TMPL_ELSIF NAME="batch_is_patroncards" -->Patron Card<!-- TMPL_ELSE -->Unknown Batchtype<!-- /TMPL_IF --> Batch</title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
-<script type="text/javascript">
-function Plugin(batch_id) {
-       window.open("label-item-search.pl?batch_id="+batch_id+"",'FindABibIndex','width=640,height=400,toolbar=no,scrollbars=yes');
-}
-</script>
 </head>
 <body>
 <!-- TMPL_INCLUDE NAME="header.inc" -->
 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; Labels</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/labels/label-home.pl">Labels</a> &rsaquo; <!-- TMPL_IF NAME="batch_is_labels" -->Label<!-- TMPL_ELSIF NAME="batch_is_patroncards" -->Patron Card<!-- TMPL_ELSE -->Unknown Batchtype<!-- /TMPL_IF --> Batch</div>
  <div id="doc3" class="yui-t2">
   <div id="bd">
    <div id="yui-main">
@@ -18,115 +13,140 @@ function Plugin(batch_id) {
 
 <!-- TMPL_IF NAME="message" -->
        <!-- TMPL_LOOP NAME="message_loop" -->
-       <div style="color: red; margin: 5pt; font-weight: bold;" class="message"><!-- TMPL_VAR NAME="message_text" --></div>
+       <div class="dialog message"><!-- TMPL_VAR NAME="message_text" --></div>
        <!-- /TMPL_LOOP -->
 <!-- /TMPL_IF -->
 
-<!-- TMPL_UNLESS NAME="batch_id" -->
-<!-- TMPL_INCLUDE NAME="tools-labels-toolbar.inc" -->
-<!-- TMPL_IF NAME="batches" -->
+<!-- TMPL_IF NAME="batch_id" -->
+<!-- TMPL_INCLUDE NAME="labels-batches-toolbar.inc" -->
 <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" -->">Edit</a>
-        </td>
-        <td>
-                <a href="/cgi-bin/koha/labels/label-manager.pl?op=delete_batch&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->">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" -->">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 class="yui-u first">
+<!-- TMPL_IF NAME="batch_is_labels" -->
+    <h2>Items to be Printed for Batch <!-- TMPL_VAR NAME="batch_id" -->  (<!-- TMPL_VAR NAME="batch_count" -->  items)</h2>
+    <table>
+        <tr>
+            <th>Label Num.</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/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"> <!-- TMPL_VAR NAME="title" escape="html" --></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&amp;labelid=<!-- TMPL_VAR NAME="labelid" -->&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=labels">Delete</a></td>
+                           <!-- FIXME: should use POST to change server state, not GET -->
+        </tr>
+        <!-- /TMPL_LOOP -->
+    </table>
+<!-- TMPL_ELSIF NAME="batch_is_patroncards" -->
+    <h2>Patron Cards to be Printed for Batch <!-- TMPL_VAR NAME="batch_id" -->  (<!-- TMPL_VAR NAME="batch_count" -->  items)</h2>
+    <table>
+        <tr>
+            <th>Card<br />Num.</th>
+            <th>Patron Name</th>
+            <th>Borrower Number</th>
+            <th>Card Number</th>
+            <th>Delete</th>
+        </tr>
+        <!-- TMPL_LOOP NAME="resultsloop" -->
+        <tr>
+            <td><!-- TMPL_VAR NAME="cardno" --></td>
+            <td><b><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"> <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a></b></td>
+            <td><!-- TMPL_VAR NAME="borrowernumber" --></td>
+            <td><!-- TMPL_VAR NAME="cardnumber" --></td>
+            <td><a href="/cgi-bin/koha/labels/label-manager.pl?op=delete&amp;cardid=<!-- TMPL_VAR NAME="cardid" -->&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=patroncards">Remove</a></td>
+                           <!-- FIXME: should use POST to change server state, not GET -->
+        </tr>
+        <!-- /TMPL_LOOP -->
+    </table>
+<!-- TMPL_ELSE -->
+       <div class="dialog alert">Error: Unknown Batch Type &quot;<!-- TMPL_VAR NAME="batch_type" -->&quot;</div>
+<!-- /TMPL_IF -->
+    </div>
+    <div class="yui-u">
+        <!-- TMPL_INCLUDE NAME="label-status.inc" -->
+    </div>
 </div>
 <!-- TMPL_ELSE -->
-<!-- TMPL_INCLUDE NAME="label-status.inc" -->
+<!-- TMPL_INCLUDE NAME="labels-toolbar.inc" -->
+<!-- TMPL_IF NAME="batch_is_labels" -->
+    <div class="yui-g">
+        <div class="yui-u first">
+<!-- TMPL_IF NAME="batches" -->
+            <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" -->&amp;type=labels">Edit</a></td>
+                    <td><a href="/cgi-bin/koha/labels/label-manager.pl?op=delete_batch&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;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-<!-- TMPL_VAR NAME="outputformat" -->.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=labels">Generate and download <!-- TMPL_VAR NAME="batch_id" --></a></td>
+                </tr>
+                <!-- /TMPL_LOOP -->
+            </table>
+<!-- TMPL_ELSE -->
+            <fieldset class="brief">
+            <legend>No Label Batches Currently Defined</legend>
+            <div class="hint">
+                Select "New Label Batch" to create a Label batch.
+            </div>
+            </fieldset>
 <!-- /TMPL_IF --><!-- /batches -->
-
+        </div>
+        <div class="yui-u">
+        <!-- TMPL_INCLUDE NAME="label-status.inc" -->
+        </div>
+    </div>
+<!-- TMPL_ELSIF NAME="batch_is_patroncards" -->
+    <div class="yui-g">
+        <div class="yui-u first">
+<!-- TMPL_IF NAME="batches" -->
+            <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" -->&amp;type=patroncards">Edit</a></td>
+                    <td><a href="/cgi-bin/koha/labels/label-manager.pl?op=delete_batch&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;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-<!-- TMPL_VAR NAME="outputformat" -->.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=patroncards">Generate and download <!-- TMPL_VAR NAME="batch_id" --></a></td>
+                </tr>
+                <!-- /TMPL_LOOP -->
+            </table>
 <!-- TMPL_ELSE -->
-
-<div id="toolbar">
-       <script type="text/javascript">
-       //<![CDATA[
-
-       // prepare DOM for YUI Toolbar
-
-        $(document).ready(function() {
-               $("#additemsc").empty();
-           yuiToolbar();
-        });
-
-       // YUI Toolbar Functions
-
-       function yuiToolbar() {
-               new YAHOO.widget.Button({
-                                            id: "additems", 
-                                            type: "button", 
-                                            label: "Add item(s) to batch", 
-                                            container: "additemsc",
-                                                                                       onclick: {fn:function(){Plugin(<!-- TMPL_VAR NAME="batch_id" -->)}}
-                                        });
-               new YAHOO.widget.Button("deletebatch");
-               new YAHOO.widget.Button("dedup");
-               new YAHOO.widget.Button("generate");
-       }
-
-       //]]>
-       </script>
-       <ul class="toolbar">
-       <li id="additemsc"><a id="additems" href="#" onclick="Plugin(<!-- TMPL_VAR NAME="batch_id" -->); return false;">Add item(s) to batch</a></li>
-       <li><a id="deletebatch" href="/cgi-bin/koha/labels/label-manager.pl?op=delete_batch&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->">Delete current batch</a></li>
-                               <!-- FIXME: should use POST to change server state, not GET -->
-       <li><a id="dedup" href="/cgi-bin/koha/labels/label-manager.pl?op=deduplicate&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->">Remove duplicate barcodes</a></li>
-       <li><a id="generate" href="/cgi-bin/koha/labels/label-print-pdf.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->">Generate PDF for Batch</a></li>
-</ul></div>
-
-<h2>Items to be Printed for Batch <!-- TMPL_VAR NAME="batch_id" -->  (<!-- TMPL_VAR NAME="batch_count" -->  items)</h2>
-
-<table>
-<tr>
-        <th>Label<br />Num.</th>
-        <th>Summary</th>
-        <th>Item<br />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/catalogue/detail.pl?biblionumber=<!-- 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&amp;labelid=<!-- TMPL_VAR NAME="labelid" -->&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->">Delete</a>
-                               <!-- FIXME: should use POST to change server state, not GET -->
-        </td>
-</tr>
-<!-- /TMPL_LOOP -->
-</table>
-<!-- /TMPL_UNLESS --><!-- batch_id -->
-
+            <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>
+<!-- /TMPL_IF --><!-- /batches -->
+        </div>
+        <div class="yui-u">
+            <!-- TMPL_INCLUDE NAME="label-status.inc" -->
+        </div>
+    </div>
+<!-- /TMPL_IF --><!-- /type -->
+<!-- /TMPL_IF --><!-- batch_id -->
 </div>
 </div>
 <div class="yui-b">