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