Bug 29002: (follow-up) Use $patron_to_html function
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / label-print.tt
1 [% USE raw %]
2 [% SET footerjs = 1 %]
3     [% INCLUDE 'doc-head-open.inc' %]
4     <title>[% FILTER collapse %]
5         [% t("Label printing/exporting") | html %] &rsaquo;
6         [% t("Label creator") | html %] &rsaquo;
7     [% t("Tools") | html %] &rsaquo;
8         [% t("Koha") | html %]
9     [% END %]</title>
10     [% INCLUDE 'doc-head-close.inc' popup => 1 %]
11     <style>table {border-collapse: separate; border-spacing: 0; border: hidden none;} .header {cursor: auto; background-position: center center; background-repeat: repeat;}</style>
12 </head>
13
14 <body id="labels_label-print" class="tools labels">
15     <div class="main container-fluid">
16         <h1>Label printing/exporting</h1>
17         [% IF ( batches ) %]
18             <form>
19                 <h3>Click on the following links to download the exported batch(es).</h3>
20                 [% IF warn_empty_range %]
21                 <div class="dialog alert">
22                     <p>Some or all of the barcodes in the range you have selected have no corresponding items.</p>
23                     <p>If you are using a layout without barcodes, this may result in missing entries or a blank page</p>
24                 </div>
25                 [% END %]
26                         [% FOREACH batche IN batches %]
27                         <fieldset>
28                             [% IF ( batche.label_ids ) %]
29                                 <legend>[% IF ( batche.label_count == 1 ) %][% batche.label_count | html %] single label[% ELSE %][% batche.label_count | html %] single labels[% END %]</legend>
30                                 <a class="document pdf" href="/cgi-bin/koha/labels/label-create-pdf.pl?batch_id=[% batche.batch_id | html %]&amp;template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %]&amp;start_label=[% batche.start_label | html %][% batche.label_ids | html %]">Download as PDF</a>
31
32                                     <p><a class="document csv" href="/cgi-bin/koha/labels/label-create-csv.pl?batch_id=[% batche.batch_id | html %]&amp;template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %][% batche.label_ids | html %]">Download as CSV</a></p>
33
34                                     <p><a class="document xml" href="/cgi-bin/koha/labels/label-create-xml.pl?batch_id=[% batche.batch_id | html %]&amp;template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %][% batche.label_ids | html %]">Download as XML</a></p>
35                             [% ELSIF ( batche.item_numbers ) %]
36                             <legend>[% IF ( batche.label_count == 1 ) %][% batche.label_count | html %] single label[% ELSE %][% batche.label_count | html %] single labels[% END %]</legend>
37                                     <p><a class="document pdf" href="/cgi-bin/koha/labels/[% batche.create_script | html %]?template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %]&amp;start_label=[% batche.start_label | html %][% batche.item_numbers | html %]">Download as PDF</a></p>
38
39                                     <p><a class="document csv" href="/cgi-bin/koha/labels/label-create-csv.pl?batch_id=[% batche.batch_id | html %]&amp;template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %][% batche.item_numbers | html %]">Download as CSV</a></p>
40
41                                     <p><a class="document xml" href="/cgi-bin/koha/labels/label-create-xml.pl?batch_id=[% batche.batch_id | html %]&amp;template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %][% batche.item_numbers | html %]">Download as XML</a></p>
42                             [% ELSIF ( batche.batch_id) %]
43                             <legend>Label batch number [% batche.batch_id | html %]</legend>
44                                     <p><a class="document pdf" href="/cgi-bin/koha/labels/label-create-pdf.pl?batch_id=[% batche.batch_id | html %]&amp;template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %]&amp;start_label=[% batche.start_label | html %]">Download as PDF</a>
45                                 </p>
46                                 <p>
47                                     <a class="document csv" href="/cgi-bin/koha/labels/label-create-csv.pl?batch_id=[% batche.batch_id | html %]&amp;template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %]">Download as CSV</a>
48                                 </p>
49                                 <p>
50                                     <a class="document xml" href="/cgi-bin/koha/labels/label-create-xml.pl?batch_id=[% batche.batch_id | html %]&amp;template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %]">Download as XML</a></p>
51                             [% ELSIF (batche.from && batche.to) %]
52                             <legend>Barcodes from [% batche.from | html %] to [% batche.to | html %]</legend>
53                             <p>
54                                 <a class="document pdf" href="/cgi-bin/koha/labels/label-create-pdf.pl?batch_id=0&amp;template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %]&amp;start_label=[% batche.start_label | html %]&amp;from=[% batche.from | html %]&amp;to=[% batche.to | html %]&amp;barcode_length=[% batche.barcode_length | html %]">Download as PDF</a>
55                             </p>
56                             [% END %]
57                         </fieldset>
58                         [% END %]
59                 <fieldset class="action">
60                     <input type="button" class="gb-close" value="Done" />
61                 </fieldset>
62             </form>
63         [% ELSE %]
64             <h3>
65                 [% IF ( label_ids ) %]
66                     [% IF ( label_count == 1 ) %]<span>Exporting 1 label</span>[% ELSE %]<span>Exporting [% label_count | html %] labels</span>[% END %]
67                 [% ELSIF ( item_numbers ) %]
68                     [% IF ( item_count == 1 ) %]<span>Exporting 1 label</span>[% ELSE %]<span>Exporting [% item_count | html %] labels</span>[% END %]
69                 [% ELSE %]
70                     [% IF ( multi_batch_count == 1 ) %]<span>1 batch to export</span>[% ELSE %]<span>[% multi_batch_count | html %] batches to export</span>[% END %]
71                 [% END %]
72             </h3>
73             <form name="exporting" method="post" action="/cgi-bin/koha/labels/label-print.pl">
74                 <input type="hidden" name="op" value="export" />
75                 <input type="hidden" name="referer" value="[% referer | html %]" />
76                 [% FOREACH batch_id IN batch_ids %]
77                     <input type="hidden" name="batch_id" value="[% batch_id.batch_id | html %]" />
78                 [% END %]
79                 [% FOREACH label_id IN label_ids %]
80                     <input type="hidden" name="label_id" value="[% label_id.label_id | html %]" />
81                 [% END %]
82                 [% FOREACH item_number IN item_numbers %]
83                     <input type="hidden" name="item_number" value="[% item_number.item_number | html %]" />
84                 [% END %]
85                 <input type="hidden" name="from" value="[% txt_from | html %]" />
86                 <input type="hidden" name="to" value="[% txt_to | html %]" />
87                 <input type="hidden" name="barcode_length" value="[% barcode_length | html %]" />
88                 <fieldset class="rows">
89                     <ol>
90                         <li>
91                             <label for="template_id" style="width:20em">Select a template to be applied: </label>
92                             <select name="template_id" id="template_id">
93                                     [% FOREACH template IN templates %]
94                                     <option value="[% template.template_id | html %]">[% template.template_code | html %]</option>
95                                     [% END %]
96                                 </select>
97                         </li>
98                         <li>
99                             <label for="layout_id" style="width:20em">Select a layout to be applied: </label>
100                             <select name="layout_id" id="layout_id">
101                                     [% FOREACH layout IN layouts %]
102                                     <option value="[% layout.layout_id | html %]">[% layout.layout_name | html %]</option>
103                                     [% END %]
104                                 </select>
105                         </li>
106                         <li>
107                             <label for="start_label" style="width:20em">Enter starting label position (for PDF): </label>
108                             <input type="text" size="5" id="start_label" name="start_label" class="focus" title="Starting label number" value="1"/>
109                         </li>
110                     </ol>
111                 </fieldset>
112                 <fieldset class="action">
113                     <input type="submit" class="btn btn-primary" value="Export" />
114                     <a href="#" class="cancel gb-close">Cancel</a>
115                 </fieldset>
116             </form>
117         [% END %]
118     </div>
119
120 [% MACRO jsinclude BLOCK %]
121     [% Asset.js("js/tools-menu.js") | $raw %]
122     [% INCLUDE 'greybox.inc' %]
123     <script>
124         function Done() {
125             window.location = "[% referer | html %]";
126         };
127         $(document).ready(function(){
128             $(".gb-close").on("click",function(){
129                 parent.parent.GB_hide();
130             });
131         });
132     </script>
133 [% END %]
134
135 [% INCLUDE 'popup-bottom.inc' %]