Bug 22897: Switch two-column templates to Bootstrap grid: ILL requests
[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>Koha &rsaquo; Tools &rsaquo; Label creator &rsaquo; Label printing/exporting</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                         [% FOREACH batche IN batches %]
15                         <fieldset>
16                             [% IF ( batche.label_ids ) %]
17                                 <legend>[% IF ( batche.label_count == 1 ) %][% batche.label_count | html %] single label[% ELSE %][% batche.label_count | html %] single labels[% END %]</legend>
18                                     <p><a class="document pdf" href="/cgi-bin/koha/labels/[% batche.create_script | html %]?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></p>
19
20                                     <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>
21
22                                     <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>
23                             [% ELSIF ( batche.item_numbers ) %]
24                             <legend>[% IF ( batche.label_count == 1 ) %][% batche.label_count | html %] single label[% ELSE %][% batche.label_count | html %] single labels[% END %]</legend>
25                                     <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>
26
27                                     <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>
28
29                                     <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>
30                             [% ELSE %]
31                             <legend>Label Batch Number [% batche.batch_id | html %]</legend>
32                                     <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>
33                                 </p>
34                                 <p>
35                                     <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>
36                                 </p>
37                                 <p>
38                                     <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>
39                             [% END %]
40                         </fieldset>
41                         [% END %]
42                 <fieldset class="action">
43                     <input type="button" class="gb-close" value="Done" />
44                 </fieldset>
45             </form>
46         [% ELSE %]
47             <h3>
48                 [% IF ( label_ids ) %]
49                     [% IF ( label_count == 1 ) %]Exporting [% label_count | html %] label[% ELSE %]Exporting [% label_count | html %] labels[% END %]
50                 [% ELSIF ( item_numbers ) %]
51                     [% IF ( item_count == 1 ) %]Exporting [% item_count | html %] label[% ELSE %]Exporting [% item_count | html %] labels[% END %]
52                 [% ELSE %]
53                     [% IF ( multi_batch_count == 1 ) %][% multi_batch_count | html %] batch to export[% ELSE %][% multi_batch_count | html %] batches to export[% END %]
54                 [% END %]
55             </h3>
56             <form name="exporting" method="post" action="/cgi-bin/koha/labels/label-print.pl">
57                 <input type="hidden" name="op" value="export" />
58                 <input type="hidden" name="referer" value="[% referer | html %]" />
59                 [% FOREACH batch_id IN batch_ids %]
60                     <input type="hidden" name="batch_id" value="[% batch_id.batch_id | html %]" />
61                 [% END %]
62                 [% FOREACH label_id IN label_ids %]
63                     <input type="hidden" name="label_id" value="[% label_id.label_id | html %]" />
64                 [% END %]
65                 [% FOREACH item_number IN item_numbers %]
66                     <input type="hidden" name="item_number" value="[% item_number.item_number | html %]" />
67                 [% END %]
68                 <fieldset class="rows">
69                     <ol>
70                         <li>
71                             <label for="template_id" style="width:20em">Select a template to be applied: </label>
72                             <select name="template_id" id="template_id">
73                                     [% FOREACH template IN templates %]
74                                     <option value="[% template.template_id | html %]">[% template.template_code | html %]</option>
75                                     [% END %]
76                                 </select>
77                         </li>
78                         <li>
79                             <label for="layout_id" style="width:20em">Select a layout to be applied: </label>
80                             <select name="layout_id" id="layout_id">
81                                     [% FOREACH layout IN layouts %]
82                                     <option value="[% layout.layout_id | html %]">[% layout.layout_name | html %]</option>
83                                     [% END %]
84                                 </select>
85                         </li>
86                         <li>
87                             <label for="start_label" style="width:20em">Enter starting label position (for PDF): </label>
88                             <input type="text" size="5" id="start_label" name="start_label" class="focus" title="Starting label number" value="1"/>
89                         </li>
90                     </ol>
91                 </fieldset>
92                 <fieldset class="action">
93                     <input type="submit" value="Export" />
94                     <a href="#" class="cancel gb-close">Cancel</a>
95                 </fieldset>
96             </form>
97         [% END %]
98     </div>
99
100 [% MACRO jsinclude BLOCK %]
101     [% Asset.js("js/tools-menu.js") | $raw %]
102     [% INCLUDE 'greybox.inc' %]
103     <script>
104         function Done() {
105             window.location = "[% referer | html %]";
106         };
107         $(document).ready(function(){
108             $(".gb-close").on("click",function(){
109                 parent.parent.GB_hide();
110             });
111         });
112     </script>
113 [% END %]
114
115 [% INCLUDE 'popup-bottom.inc' %]