Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / patroncards / print.tt
blobfcf1d96bb8a1bb8cc7d7153d37ca1f369539f25e
1 [% USE Asset %]
2 [% SET footerjs = 1 %]
3 <!DOCTYPE html>
4 [% IF ( bidi ) %]<html lang="[% lang %]" dir="[% bidi %]">[% ELSE %]<html lang="[% lang %]">[% END %]
5 <head>
6     <title>Koha &rsaquo; Tools &rsaquo; Patron cards &rsaquo; Patron card printing/exporting</title>
7     <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
8     [% INCLUDE intranetstylesheet.inc %]
9     [% IF ( IntranetUserCSS ) %]<style type="text/css">[% IntranetUserCSS %]</style>[% END %]
10     [% INCLUDE 'doc-head-close.inc' popup => 1%]
11     <style type="text/css">#custom-doc {width:47.23em; *width:46.04em; min-width:610px; margin:auto; margin-top:0.4em;}</style>
12 </head>
14 <body id="pcard_print" class="tools pcard">
15     <div id="custom-doc">
16         <div id="bd">
17             [% IF ( batches ) %]
18             <form>
19                 <h3>Click on the following link(s) to download the exported batch(es).</h3>
20                     <fieldset>
21                     [% FOREACH batche IN batches %]
22                         [% IF ( batche.label_ids ) %]
23                         <legend>[% batche.card_count %] Single patron cards</legend>
24                         <p>
25                                 <a class="document pdf" href="/cgi-bin/koha/patroncards/[% batche.create_script %]?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]]&amp;layout_back_id=[% batche.layout_back_id %]&amp;start_card=[% batche.start_card %][% batche.label_ids %]">label_single_[% batche.card_count %].pdf</a>
26                         </p>
27                         [% ELSIF ( batche.borrower_numbers ) %]
28                         <legend>[% batche.card_count %] Single Patron Cards</legend>
29                         <p>
30                                 <a class="document pdf" href="/cgi-bin/koha/patroncards/[% batche.create_script %]?template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]&amp;layout_back_id=[% batche.layout_back_id %]&amp;start_card=[% batche.start_card %][% batche.borrower_numbers %]">label_single_[% batche.card_count %].pdf</a>
31                         </p>
32                         [% ELSE %]
33                         <legend>Card batch number [% batche.batch_id %]</legend>
34                         <p>
35                                 <a class="document pdf" href="/cgi-bin/koha/patroncards/create-pdf.pl?batch_id=[% batche.batch_id %]&amp;template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]&amp;layout_back_id=[% batche.layout_back_id %]&amp;start_card=[% batche.start_card %]">label_batch_[% batche.batch_id %].pdf</a>
36                         </p>
37                         [% END %]
38                     [% END %]
39                     </fieldset>
41                 <fieldset class="action">
42                     <input type="button" class="gb-close" value="Done" />
43                 </fieldset>
44             </form>
45             [% ELSIF ( patronlist_id && template_id && layout_id ) %]
46                 <h3>Click on the link to download the patron cards from the patron list.</h3>
47                     <p>
48                         <a class="document pdf" href="/cgi-bin/koha/patroncards/create-pdf.pl?patronlist_id=[% patronlist_id %]&amp;template_id=[% template_id %]&amp;layout_id=[% layout_id %]&amp;layout_back_id=[% layout_back_id %]&amp;start_card=[% start_card %]">label_patronlist_[% patronlist_id %].pdf</a>
49                     </p>
50             [% ELSE %]
51             <h3>
52                     [% IF ( label_ids ) %]
53                         [% IF ( card_count == 1 ) %]Exporting [% card_count %] patron card[% ELSE %]Exporting [% card_count %] patron cards[% END %]
54                     [% ELSIF ( borrower_numbers ) %]
55                         [% IF ( borrower_count == 1 ) %]Exporting [% borrower_count %] patron card[% ELSE %]Exporting [% borrower_count %] patron cards[% END %]
56                     [% ELSIF ( patronlist_id ) %] Exporting from patron list
57                     [% ELSE %]
58                         [% IF ( multi_batch_count == 1 ) %][% multi_batch_count %] batch to export[% ELSE %][% multi_batch_count %] batches to export[% END %]
59                     [% END %]
60             </h3>
61             <form id="exportingf" name="exporting" method="post" action="/cgi-bin/koha/patroncards/print.pl">
62                 <input type="hidden" name="op" value="export" />
63                 <input type="hidden" name="referer" value="[% referer %]" />
64                 [% FOREACH batch_id IN batch_ids %]
65                     <input type="hidden" name="batch_id" value="[% batch_id.batch_id %]" />
66                 [% END %]
67                 [% FOREACH label_id IN label_ids %]
68                     <input type="hidden" name="label_id" value="[% label_id.label_id %]" />
69                 [% END %]
70                 [% FOREACH borrower_number IN borrower_numbers %]
71                     <input type="hidden" name="borrower_number" value="[% borrower_number.borrower_number %]" />
72                 [% END %]
73                 [% IF (patronlist_id) %] <input type="hidden" name="patronlist_id" value="[% patronlist_id %]" /> [% END %]
74                 <fieldset class="rows">
75                     <ol>
76                         <li>
77                             <label style="width:9em" for="template_id">Select a template to be applied: </label>
78                             <select name="template_id" id="template_id">
79                                 [% FOREACH template IN templates %]
80                                 <option value="[% template.template_id %]">[% template.template_code %]</option>
81                                 [% END %]
82                             </select>
83                         </li>
84                         <li>
85                             <label style="width:9em" for="layout_id">Select a layout to be applied: </label>
86                             <select name="layout_id" id="layout_id">
87                                 [% FOREACH layout IN layouts %]
88                                 <option value="[% layout.layout_id %]">[% layout.layout_name %]</option>
89                                 [% END %]
90                             </select>
91                         </li>
92                         <li>
93                             <label style="width:9em" for="layout_back_id">Select a layout for back side: </label>
94                             <select name="layout_back_id" id="layout_back_id">
95                                 <option value="0">Back side layout not used</option>
96                                 [% FOREACH layout IN layouts %]
97                                 <option value="[% layout.layout_id %]">[% layout.layout_name %]</option>
98                                 [% END %]
99                             </select>
100                             <span class="hint">Used for duplex printers (needs a '1 up template')</span>
101                         </li>
103                         <li>
104                             <label style="width:9em" for="start_card">Enter starting card position: </label>
105                             <input type="text" size="5" id="start_card" name="start_card" class="focus" title="Starting card number" value="1" />
106                         </li>
107                     </ol>
108                 </fieldset>
109                 <fieldset class="action">
110                     <input type="submit" value="Export" />
111                     <a href="#" class="cancel gb-close">Cancel</a>
112                 </fieldset>
113             </form>
114             [% END %]
115         </div>
116     </div>
118 [% IF ( IntranetUserJS ) %]
119     [% Asset.js("lib/jquery/jquery-2.2.3.min.js") %]
120     [% Asset.js("lib/jquery/jquery-migrate-1.3.0.min.js") %]
121     <script>
122         [% IntranetUserJS %]
123         function Done() {
124             window.location = "[% referer %]";
125         };
126         $(document).ready(function(){
127             $(".gb-close").on("click",function(){
128                 parent.parent.GB_hide();
129             });
130         });
131     </script>
132 [% END %]
134 [% INCLUDE 'popup-bottom.inc' %]