3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Label printing/exporting › Label creator › Tools › Koha</title>
5 [% INCLUDE 'doc-head-close.inc' popup => 1 %]
6 <style>table {border-collapse: separate; border-spacing: 0; border: hidden none;} .header {cursor: auto; background-position: center center; background-repeat: repeat;}</style>
9 <body id="labels_label-print" class="tools labels">
10 <div class="main container-fluid">
11 <h1>Label printing/exporting</h1>
14 <h3>Click on the following links to download the exported batch(es).</h3>
15 [% IF warn_empty_range %]
16 <div class="dialog alert">
17 <p>Some or all of the barcodes in the range you have selected have no corresponding items.</p>
18 <p>If you are using a layout without barcodes, this may result in missing entries or a blank page</p>
21 [% FOREACH batche IN batches %]
23 [% IF ( batche.label_ids ) %]
24 <legend>[% IF ( batche.label_count == 1 ) %][% batche.label_count | html %] single label[% ELSE %][% batche.label_count | html %] single labels[% END %]</legend>
25 <a class="document pdf" href="/cgi-bin/koha/labels/label-create-pdf.pl?batch_id=[% batche.batch_id | html %]&template_id=[% batche.template_id | html %]&layout_id=[% batche.layout_id | html %][% batche.label_ids | html %]">Download as PDF</a>
27 <p><a class="document csv" href="/cgi-bin/koha/labels/label-create-csv.pl?batch_id=[% batche.batch_id | html %]&template_id=[% batche.template_id | html %]&layout_id=[% batche.layout_id | html %][% batche.label_ids | html %]">Download as CSV</a></p>
29 <p><a class="document xml" href="/cgi-bin/koha/labels/label-create-xml.pl?batch_id=[% batche.batch_id | html %]&template_id=[% batche.template_id | html %]&layout_id=[% batche.layout_id | html %][% batche.label_ids | html %]">Download as XML</a></p>
30 [% ELSIF ( batche.item_numbers ) %]
31 <legend>[% IF ( batche.label_count == 1 ) %][% batche.label_count | html %] single label[% ELSE %][% batche.label_count | html %] single labels[% END %]</legend>
32 <p><a class="document pdf" href="/cgi-bin/koha/labels/[% batche.create_script | html %]?template_id=[% batche.template_id | html %]&layout_id=[% batche.layout_id | html %]&start_label=[% batche.start_label | html %][% batche.item_numbers | html %]">Download as PDF</a></p>
34 <p><a class="document csv" href="/cgi-bin/koha/labels/label-create-csv.pl?batch_id=[% batche.batch_id | html %]&template_id=[% batche.template_id | html %]&layout_id=[% batche.layout_id | html %][% batche.item_numbers | html %]">Download as CSV</a></p>
36 <p><a class="document xml" href="/cgi-bin/koha/labels/label-create-xml.pl?batch_id=[% batche.batch_id | html %]&template_id=[% batche.template_id | html %]&layout_id=[% batche.layout_id | html %][% batche.item_numbers | html %]">Download as XML</a></p>
37 [% ELSIF ( batche.batch_id) %]
38 <legend>Label batch number [% batche.batch_id | html %]</legend>
39 <p><a class="document pdf" href="/cgi-bin/koha/labels/label-create-pdf.pl?batch_id=[% batche.batch_id | html %]&template_id=[% batche.template_id | html %]&layout_id=[% batche.layout_id | html %]&start_label=[% batche.start_label | html %]">Download as PDF</a>
42 <a class="document csv" href="/cgi-bin/koha/labels/label-create-csv.pl?batch_id=[% batche.batch_id | html %]&template_id=[% batche.template_id | html %]&layout_id=[% batche.layout_id | html %]">Download as CSV</a>
45 <a class="document xml" href="/cgi-bin/koha/labels/label-create-xml.pl?batch_id=[% batche.batch_id | html %]&template_id=[% batche.template_id | html %]&layout_id=[% batche.layout_id | html %]">Download as XML</a></p>
46 [% ELSIF (batche.from && batche.to) %]
47 <legend>Barcodes from [% batche.from | html %] to [% batche.to | html %]</legend>
49 <a class="document pdf" href="/cgi-bin/koha/labels/label-create-pdf.pl?batch_id=0&template_id=[% batche.template_id | html %]&layout_id=[% batche.layout_id | html %]&start_label=[% batche.start_label | html %]&from=[% batche.from | html %]&to=[% batche.to | html %]&barcode_length=[% batche.barcode_length | html %]">Download as PDF</a>
54 <fieldset class="action">
55 <input type="button" class="gb-close" value="Done" />
60 [% IF ( label_ids ) %]
61 [% IF ( label_count == 1 ) %]<span>Exporting 1 label</span>[% ELSE %]<span>Exporting [% label_count | html %] labels</span>[% END %]
62 [% ELSIF ( item_numbers ) %]
63 [% IF ( item_count == 1 ) %]<span>Exporting 1 label</span>[% ELSE %]<span>Exporting [% item_count | html %] labels</span>[% END %]
65 [% IF ( multi_batch_count == 1 ) %]<span>1 batch to export</span>[% ELSE %]<span>[% multi_batch_count | html %] batches to export</span>[% END %]
68 <form name="exporting" method="post" action="/cgi-bin/koha/labels/label-print.pl">
69 <input type="hidden" name="op" value="export" />
70 <input type="hidden" name="referer" value="[% referer | html %]" />
71 [% FOREACH batch_id IN batch_ids %]
72 <input type="hidden" name="batch_id" value="[% batch_id.batch_id | html %]" />
74 [% FOREACH label_id IN label_ids %]
75 <input type="hidden" name="label_id" value="[% label_id.label_id | html %]" />
77 [% FOREACH item_number IN item_numbers %]
78 <input type="hidden" name="item_number" value="[% item_number.item_number | html %]" />
80 <input type="hidden" name="from" value="[% txt_from | html %]" />
81 <input type="hidden" name="to" value="[% txt_to | html %]" />
82 <input type="hidden" name="barcode_length" value="[% barcode_length | html %]" />
83 <fieldset class="rows">
86 <label for="template_id" style="width:20em">Select a template to be applied: </label>
87 <select name="template_id" id="template_id">
88 [% FOREACH template IN templates %]
89 <option value="[% template.template_id | html %]">[% template.template_code | html %]</option>
94 <label for="layout_id" style="width:20em">Select a layout to be applied: </label>
95 <select name="layout_id" id="layout_id">
96 [% FOREACH layout IN layouts %]
97 <option value="[% layout.layout_id | html %]">[% layout.layout_name | html %]</option>
102 <label for="start_label" style="width:20em">Enter starting label position (for PDF): </label>
103 <input type="text" size="5" id="start_label" name="start_label" class="focus" title="Starting label number" value="1"/>
107 <fieldset class="action">
108 <input type="submit" value="Export" />
109 <a href="#" class="cancel gb-close">Cancel</a>
115 [% MACRO jsinclude BLOCK %]
116 [% Asset.js("js/tools-menu.js") | $raw %]
117 [% INCLUDE 'greybox.inc' %]
120 window.location = "[% referer | html %]";
122 $(document).ready(function(){
123 $(".gb-close").on("click",function(){
124 parent.parent.GB_hide();
130 [% INCLUDE 'popup-bottom.inc' %]