Bug 19623: (follow-up) Correct footer include in pop-up windows
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / label-print.tt
1     [% INCLUDE 'doc-head-open.inc' %]
2     <title>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Label printing/exporting</title>
3     [% INCLUDE 'doc-head-close.inc' popup => 1 %]
4     <script type="text/javascript">
5         //<![CDATA[
6             function Done() {
7                 window.location = "[% referer %]";
8             };
9             $(document).ready(function(){
10                 $(".gb-close").on("click",function(){
11                     parent.parent.GB_hide();
12                 });
13             });
14         //]]>
15     </script>
16     <style type="text/css">#custom-doc {width:47.23em; *width:46.04em; min-width:610px; margin:auto; margin-top:0.4em;}</style>
17     <style type="text/css">table {border-collapse: separate; border-spacing: 0; border: hidden none;} .header {cursor: auto; background-position: center center; background-repeat: repeat;}</style>
18 </head>
19 <body id="labels_label-print" class="tools labels">
20     <div id="custom-doc" class="yui-t2">
21         <div id="bd">
22             [% IF ( batches ) %]
23             <form>
24                 <h3>Click on the following links to download the exported batch(es).</h3>
25                         [% FOREACH batche IN batches %]
26                         <fieldset>
27                             [% IF ( batche.label_ids ) %]
28                                 <legend>[% IF ( batche.label_count == 1 ) %][% batche.label_count %] single label[% ELSE %][% batche.label_count %] single labels[% END %]</legend>
29                                     <p><a class="document pdf" href="/cgi-bin/koha/labels/[% batche.create_script %]?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]&amp;start_label=[% batche.start_label %][% batche.label_ids %]">Download as PDF</a></p>
30
31                                     <p><a class="document csv" href="/cgi-bin/koha/labels/label-create-csv.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %][% batche.label_ids %]">Download as CSV</a></p>
32
33                                     <p><a class="document xml" href="/cgi-bin/koha/labels/label-create-xml.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %][% batche.label_ids %]">Download as XML</a></p>
34                             [% ELSIF ( batche.item_numbers ) %]
35                             <legend>[% IF ( batche.label_count == 1 ) %][% batche.label_count %] single label[% ELSE %][% batche.label_count %] single labels[% END %]</legend>
36                                     <p><a class="document pdf" href="/cgi-bin/koha/labels/[% batche.create_script %]?template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]&amp;start_label=[% batche.start_label %][% batche.item_numbers %]">Download as PDF</a></p>
37
38                                     <p><a class="document csv" href="/cgi-bin/koha/labels/label-create-csv.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %][% batche.item_numbers %]">Download as CSV</a></p>
39
40                                     <p><a class="document xml" href="/cgi-bin/koha/labels/label-create-xml.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %][% batche.item_numbers %]">Download as XML</a></p>
41                             [% ELSE %]
42                             <legend>Label Batch Number [% batche.batch_id %]</legend>
43                                     <p><a class="document pdf" href="/cgi-bin/koha/labels/label-create-pdf.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]&amp;start_label=[% batche.start_label %]">Download as PDF</a>
44                                 </p>
45                                 <p>
46                                     <a class="document csv" href="/cgi-bin/koha/labels/label-create-csv.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]">Download as CSV</a>
47                                 </p>
48                                 <p>
49                                     <a class="document xml" href="/cgi-bin/koha/labels/label-create-xml.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]">Download as XML</a></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 %] label[% ELSE %]Exporting [% label_count %] labels[% END %]
61                 [% ELSIF ( item_numbers ) %]
62                     [% IF ( item_count == 1 ) %]Exporting [% item_count %] label[% ELSE %]Exporting [% item_count %] labels[% END %]
63                 [% ELSE %]
64                     [% IF ( multi_batch_count == 1 ) %][% multi_batch_count %] batch to export[% ELSE %][% multi_batch_count %] 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 %]" />
70                 [% FOREACH batch_id IN batch_ids %]
71                     <input type="hidden" name="batch_id" value="[% batch_id.batch_id %]" />
72                 [% END %]
73                 [% FOREACH label_id IN label_ids %]
74                     <input type="hidden" name="label_id" value="[% label_id.label_id %]" />
75                 [% END %]
76                 [% FOREACH item_number IN item_numbers %]
77                     <input type="hidden" name="item_number" value="[% item_number.item_number %]" />
78                 [% END %]
79                 <fieldset class="rows">
80                     <ol>
81                         <li>
82                             <label for="template_id" style="width:20em">Select a template to be applied: </label>
83                             <select name="template_id" id="template_id">
84                                     [% FOREACH template IN templates %]
85                                     <option value="[% template.template_id %]">[% template.template_code %]</option>
86                                     [% END %]
87                                 </select>
88                         </li>
89                         <li>
90                             <label for="layout_id" style="width:20em">Select a layout to be applied: </label>
91                             <select name="layout_id" id="layout_id">
92                                     [% FOREACH layout IN layouts %]
93                                     <option value="[% layout.layout_id %]">[% layout.layout_name %]</option>
94                                     [% END %]
95                                 </select>
96                         </li>
97                         <li>
98                             <label for="start_label" style="width:20em">Enter starting label position (for PDF): </label>
99                             <input type="text" size="5" id="start_label" name="start_label" class="focus" title="Starting label number" value="1"/>
100                         </li>
101                     </ol>
102                 </fieldset>
103                 <fieldset class="action">
104                     <input type="submit" value="Export" />
105                     <a href="#" class="cancel gb-close">Cancel</a>
106                 </fieldset>
107             </form>
108             [% END %]
109         </div>
110 [% INCLUDE 'popup-bottom.inc' %]