2 <script type="text/javascript">
4 function Plugin(batch_id) {
5 window.open("label-item-search.pl?batch_id="+batch_id+"&type=labels",'FindABibIndex','width=875,height=400,toolbar=no,scrollbars=yes');
8 // prepare DOM for YUI Toolbar
9 $(document).ready(function() {
10 $("#additemsc").empty();
13 // YUI Toolbar Functions
14 function yuiToolbar() {
15 new YAHOO.widget.Button({
19 label: _("Add item(s) to batch"),
20 container: "additemsc",
21 onclick: {fn:function(){Plugin(<!-- TMPL_VAR NAME="batch_id" -->)}}
23 new YAHOO.widget.Button("deletebatch");
24 new YAHOO.widget.Button("dedup");
25 new YAHOO.widget.Button("generate");
30 <li id="additemsc"><a id="additems" href="#">Add item(s) to batch</a></li>
31 <li><a id="deletebatch" href="/cgi-bin/koha/labels/label-manage.pl?op=delete&label_element=batch&element_id=<!-- TMPL_VAR NAME="batch_id" -->">Delete current batch</a></li>
32 <!-- FIXME: should use POST to change server state, not GET -->
33 <li><a id="dedup" href="/cgi-bin/koha/labels/label-manager.pl?op=deduplicate&batch_id=<!-- TMPL_VAR NAME="batch_id" -->&type=<!-- TMPL_VAR NAME="batch_type" -->">Remove duplicates</a></li>
34 <li><a id="generate" href="/cgi-bin/koha/labels/label-print-<!-- TMPL_VAR NAME="outputformat" -->.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->&type=<!-- TMPL_VAR NAME="batch_type" -->">Generate labels for Batch</a></li>