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