Bug 34889: Convert PatronSelfRegistrationAdditionalInstructions system preference...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / patroncards / print.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% PROCESS 'i18n.inc' %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6     <title>[% FILTER collapse %]
7         [% t("Patron card printing/exporting") | html %] &rsaquo;
8         [% t("Patron cards") | html %] &rsaquo;
9         [% t("Tools") | html %] &rsaquo;
10         [% t("Koha") | html %]
11     [% END %]</title>
12     [% INCLUDE 'doc-head-close.inc' popup => 1%]
13 </head>
14
15 <body id="pcard_print" class="tools pcard">
16     <div class="container-fluid">
17         <h1>Patron card printing/exporting</h1>
18             [% IF ( batches ) %]
19             <form>
20                 <h3>Click on the following link(s) to download the exported batch(es).</h3>
21                     <fieldset>
22                     [% FOREACH batche IN batches %]
23                         [% IF ( batche.label_ids ) %]
24                         <legend>[% batche.card_count | html %] Single patron cards</legend>
25                         <p>
26                                 <a class="document pdf" href="/cgi-bin/koha/patroncards/[% 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;layout_back_id=[% batche.layout_back_id | html %]&amp;start_card=[% batche.start_card | html %][% batche.label_ids | html %]">label_single_[% batche.card_count | html %].pdf</a>
27                         </p>
28                         [% ELSIF ( batche.borrower_numbers ) %]
29                         <legend>[% batche.card_count | html %] Single patron cards</legend>
30                         <p>
31                                 <a class="document pdf" href="/cgi-bin/koha/patroncards/[% batche.create_script | html %]?template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %]&amp;layout_back_id=[% batche.layout_back_id | html %]&amp;start_card=[% batche.start_card | html %][% batche.borrower_numbers | html %]">label_single_[% batche.card_count | html %].pdf</a>
32                         </p>
33                         [% ELSE %]
34                         <legend>Card batch number [% batche.batch_id | html %]</legend>
35                         <p>
36                                 <a class="document pdf" href="/cgi-bin/koha/patroncards/create-pdf.pl?batch_id=[% batche.batch_id | html %]&amp;template_id=[% batche.template_id | html %]&amp;layout_id=[% batche.layout_id | html %]&amp;layout_back_id=[% batche.layout_back_id | html %]&amp;start_card=[% batche.start_card | html %]">label_batch_[% batche.batch_id | html %].pdf</a>
37                         </p>
38                         [% END %]
39                     [% END %]
40                     </fieldset>
41
42                 <fieldset class="action">
43                     <input type="button" class="gb-close" value="Done" />
44                 </fieldset>
45             </form>
46             [% ELSIF ( patronlist_id && template_id && layout_id ) %]
47                 <div id="export_patron_list">
48                     <h3>Click on the link to download the patron cards from the patron list.</h3>
49                     <p>
50                         <a class="document pdf" href="/cgi-bin/koha/patroncards/create-pdf.pl?patronlist_id=[% patronlist_id | html %]&amp;template_id=[% template_id | html %]&amp;layout_id=[% layout_id | html %]&amp;layout_back_id=[% layout_back_id | html %]&amp;start_card=[% start_card | html %]">label_patronlist_[% patronlist_id | html %].pdf</a>
51                     </p>
52                 </div>
53             [% ELSE %]
54             <h3>
55                     [% IF ( label_ids ) %]
56                         [% IF ( card_count == 1 ) %]<span>Exporting 1 patron card</span>[% ELSE %]<span>Exporting [% card_count | html %] patron cards</span>[% END %]
57                     [% ELSIF ( borrower_numbers ) %]
58                         [% IF ( borrower_count == 1 ) %]<span>Exporting 1 patron card</span>[% ELSE %]<span>Exporting [% borrower_count | html %] patron cards</span>[% END %]
59                     [% ELSIF ( patronlist_id ) %] <span>Exporting from patron list</span>
60                     [% ELSE %]
61                         [% IF ( multi_batch_count == 1 ) %]<span>1 batch to export</span>[% ELSE %]<span>[% multi_batch_count | html %] batches to export</span>[% END %]
62                     [% END %]
63             </h3>
64             <form id="exportingf" name="exporting" method="post" action="/cgi-bin/koha/patroncards/print.pl">
65                 <input type="hidden" name="op" value="export" />
66                 <input type="hidden" name="referer" value="[% referer | html %]" />
67                 [% FOREACH batch_id IN batch_ids %]
68                     <input type="hidden" name="batch_id" value="[% batch_id.batch_id | html %]" />
69                 [% END %]
70                 [% FOREACH label_id IN label_ids %]
71                     <input type="hidden" name="label_id" value="[% label_id.label_id | html %]" />
72                 [% END %]
73                 [% FOREACH borrower_number IN borrower_numbers %]
74                     <input type="hidden" name="borrower_number" value="[% borrower_number.borrower_number | html %]" />
75                 [% END %]
76                 [% IF (patronlist_id) %] <input type="hidden" name="patronlist_id" value="[% patronlist_id | html %]" /> [% END %]
77                 <fieldset class="rows">
78                     <ol>
79                         <li>
80                             <label style="width:9em" for="template_id">Select a template to be applied: </label>
81                             <select name="template_id" id="template_id">
82                                 [% FOREACH template IN templates %]
83                                 <option value="[% template.template_id | html %]">[% template.template_code | html %]</option>
84                                 [% END %]
85                             </select>
86                         </li>
87                         <li>
88                             <label style="width:9em" for="layout_id">Select a layout to be applied: </label>
89                             <select name="layout_id" id="layout_id">
90                                 [% FOREACH layout IN layouts %]
91                                 <option value="[% layout.layout_id | html %]">[% layout.layout_name | html %]</option>
92                                 [% END %]
93                             </select>
94                         </li>
95                         <li>
96                             <label style="width:9em" for="layout_back_id">Select a layout for back side: </label>
97                             <select name="layout_back_id" id="layout_back_id">
98                                 <option value="0">Back side layout not used</option>
99                                 [% FOREACH layout IN layouts %]
100                                 <option value="[% layout.layout_id | html %]">[% layout.layout_name | html %]</option>
101                                 [% END %]
102                             </select>
103                             <span class="hint">Used for duplex printers (needs a '1 up template')</span>
104                         </li>
105
106                         <li>
107                             <label style="width:9em" for="start_card">Enter starting card position: </label>
108                             <input type="text" size="5" id="start_card" name="start_card" class="focus" title="Starting card 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     [% INCLUDE 'greybox.inc' %]
122     <script>
123         function Done() {
124             window.location = "[% referer | html %]";
125         };
126         $(document).ready(function(){
127             $(".gb-close").on("click",function(){
128                 parent.parent.GB_hide();
129             });
130         });
131     </script>
132 [% END %]
133
134 [% INCLUDE 'popup-bottom.inc' %]