Labels overhaul - labels were largely broken (and still are somewhat), but this overh...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / label-manager.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha &rsaquo;  Labels</title>
2 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3 <script type="text/javascript">
4 function Plugin(batch_id) {
5         window.open("label-item-search.pl?batch_id="+batch_id+"",'FindABibIndex','width=640,height=400,toolbar=no,scrollbars=yes');
6 }
7 </script>
8 </head>
9 <body>
10 <!-- TMPL_INCLUDE NAME="header.inc" -->
11 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
12
13 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; Labels</div>
14  <div id="doc3" class="yui-t2">
15   <div id="bd">
16    <div id="yui-main">
17         <div class="yui-b">
18
19 <!-- TMPL_IF NAME="message" -->
20         <!-- TMPL_LOOP NAME="message_loop" -->
21         <div style="color: red; margin: 5pt; font-weight: bold;" class="message"><!-- TMPL_VAR NAME="message_text" --></div>
22         <!-- /TMPL_LOOP -->
23 <!-- /TMPL_IF -->
24
25 <!-- TMPL_UNLESS NAME="batch_id" -->
26 <!-- TMPL_INCLUDE NAME="tools-labels-toolbar.inc" -->
27 <!-- TMPL_IF NAME="batches" -->
28 <div class="yui-g">
29
30 <div class="yui-u first">
31 <h2>Label Batches</h2>
32 <table>
33 <tr>
34         <th>ID</th>
35         <th>#</th>
36         <th>Edit</th>
37         <th>Delete</th>
38         <th>Print</th>
39 </tr>
40 <!-- TMPL_LOOP NAME="batches" -->
41 <tr>
42         <td><!-- TMPL_VAR NAME="batch_id" --></td>
43         <td><!-- TMPL_VAR NAME="num" --> records</td>
44         <td>
45                 <a href="/cgi-bin/koha/labels/label-manager.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->">Edit</a>
46         </td>
47         <td>
48                 <a href="/cgi-bin/koha/labels/label-manager.pl?op=delete_batch&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->">Delete</a>
49                                 <!-- FIXME: should use POST to change server state, not GET -->
50         </td>
51         <td>
52                   <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>
53         </td></tr>
54 <!-- /TMPL_LOOP -->
55 </table>
56 </div>
57 <div class="yui-u">
58 <!-- TMPL_INCLUDE NAME="label-status.inc" -->
59 </div>
60 </div>
61 <!-- TMPL_ELSE -->
62 <!-- TMPL_INCLUDE NAME="label-status.inc" -->
63 <!-- /TMPL_IF --><!-- /batches -->
64
65 <!-- TMPL_ELSE -->
66
67 <div id="toolbar">
68         <script type="text/javascript">
69         //<![CDATA[
70
71         // prepare DOM for YUI Toolbar
72
73          $(document).ready(function() {
74                 $("#additemsc").empty();
75             yuiToolbar();
76          });
77
78         // YUI Toolbar Functions
79
80         function yuiToolbar() {
81                 new YAHOO.widget.Button({
82                                             id: "additems", 
83                                             type: "button", 
84                                             label: "Add item(s) to batch", 
85                                             container: "additemsc",
86                                                                                         onclick: {fn:function(){Plugin(<!-- TMPL_VAR NAME="batch_id" -->)}}
87                                         });
88                 new YAHOO.widget.Button("deletebatch");
89                 new YAHOO.widget.Button("dedup");
90                 new YAHOO.widget.Button("generate");
91         }
92
93         //]]>
94         </script>
95         <ul class="toolbar">
96         <li id="additemsc"><a id="additems" href="#" onclick="Plugin(<!-- TMPL_VAR NAME="batch_id" -->); return false;">Add item(s) to batch</a></li>
97         <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>
98                                 <!-- FIXME: should use POST to change server state, not GET -->
99         <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>
100         <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>
101 </ul></div>
102
103 <h2>Items to be Printed for Batch <!-- TMPL_VAR NAME="batch_id" -->  (<!-- TMPL_VAR NAME="batch_count" -->  items)</h2>
104
105 <table>
106 <tr>
107         <th>Label<br />Num.</th>
108         <th>Summary</th>
109         <th>Item<br />Type</th>
110         <th>Barcode</th>
111         <th>Delete</th>
112 </tr>
113 <!-- TMPL_LOOP NAME="resultsloop" -->
114 <tr>
115         <td><!-- TMPL_VAR NAME="labelno" --></td>
116         <td><b><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"> <!-- TMPL_VAR NAME="title" --></a></b>:
117                         <!-- TMPL_VAR NAME="author" -->:
118             <!-- TMPL_VAR NAME="isbn" --></td>
119         <td><!-- TMPL_VAR NAME="itemtype" --></td>
120         <td><!-- TMPL_VAR NAME="barcode" --></td>
121         <td>
122                 <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>
123                                 <!-- FIXME: should use POST to change server state, not GET -->
124         </td>
125 </tr>
126 <!-- /TMPL_LOOP -->
127 </table>
128 <!-- /TMPL_UNLESS --><!-- batch_id -->
129
130 </div>
131 </div>
132 <div class="yui-b">
133 <!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
134 </div>
135 </div>
136 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->