Fix bad behaviour of Label Batches table when Generate PDF link is clicked in staff...
[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
15 <div id="doc3" class="yui-t2">
16    
17    <div id="bd">
18         <div id="yui-main">
19         <div class="yui-b">
20
21 <!-- TMPL_UNLESS NAME="batch_id" -->
22 <!-- TMPL_INCLUDE NAME="tools-labels-toolbar.inc" -->
23
24 <!-- TMPL_IF NAME="batches" -->
25 <div class="yui-g">
26
27 <div class="yui-u first">
28 <h2>Label Batches</h2>
29 <table>
30 <tr>
31         <th>Batch id</th>
32         <th>#</th>
33         <th>Edit</th>
34         <th>Delete</th>
35         <th>Print</th>
36 </tr>
37 <!-- TMPL_LOOP NAME="batches" -->
38 <tr>
39         <td>
40                 <!-- TMPL_VAR NAME="batch_id" -->
41         </td>
42         <td>
43                 <!-- TMPL_VAR NAME="num" --> records
44         </td>
45         <td>
46                 <a href="/cgi-bin/koha/labels/label-manager.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->">Edit</a>
47         </td>
48         <td>
49                 <a href="/cgi-bin/koha/labels/label-manager.pl?op=delete_batch&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->">Delete</a>
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 -->
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("generate");
90         }
91
92         //]]>
93         </script>
94         <ul class="toolbar">
95         <li id="additemsc"><a id="additems" href="#" onclick="Plugin(<!-- TMPL_VAR NAME="batch_id" -->); return false;">Add item(s) to batch</a></li>
96         <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>
97         <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>
98 </ul></div>
99
100 <h2>Items to be Printed for Batch <!-- TMPL_VAR NAME="batch_id" -->  (<!-- TMPL_VAR NAME="batch_count" -->  items)</h2>
101
102 <table>
103 <tr>
104         <th>Label Number</th>
105         <th>Summary</th>
106         <th>Item Type</th>
107         <th>Barcode</th>
108         <th>Delete</th>
109 </tr>
110 <!-- TMPL_LOOP NAME="resultsloop" -->
111 <tr>
112         <td>
113                 <!-- TMPL_VAR NAME="labelno" -->
114         </td>
115         <td>
116                 <b> <a href="/cgi-bin/koha/detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"> <!-- TMPL_VAR NAME="title" -->:</a></b> <!-- TMPL_VAR NAME="author" -->:
117                 <!-- TMPL_VAR NAME="isbn" -->         </td>
118         <td>           <!-- TMPL_VAR NAME="itemtype" -->         </td>
119         <td>          <!-- TMPL_VAR NAME="barcode" -->         </td>
120         <td>
121                 <a href="/cgi-bin/koha/labels/label-manager.pl?op=delete&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->">Delete</a>
122         </td>
123 </tr>
124 <!-- /TMPL_LOOP -->
125 </table>
126
127
128 <!-- /TMPL_UNLESS -->
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" -->