Bug 5917 : Swapping templates over
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / patroncards / print.tt
1     [% INCLUDE 'doc-head-open.inc' %]
2     <title>Koha &rsaquo; Tools &rsaquo; Patron Cards &rsaquo; Patron Card Printing/Exporting</title>
3     [% INCLUDE 'doc-head-close.inc' %]
4     <script type="text/JavaScript" language="JavaScript">
5         //<![CDATA[
6             function Done() {
7                 window.location = "[% referer %]";
8             };
9         //]]>
10     </script>
11     <style type="text/css">#custom-doc {width:47.23em; *width:46.04em; min-width:610px; margin:auto; margin-top:0.4em;}</style>
12     <style type="text/css">table {border-collapse: separate; border-spacing: 0; border: hidden none;} .header {cursor: auto; background-position: center center; background-repeat: repeat;} .tr {border-collapse: separate;}</style>
13 </head>
14 <body>
15     <div id="custom-doc" class="yui-t2">
16         <div id="bd">
17             [% IF ( batches ) %]
18             <form>
19                 <div align="center">
20                     <div class="message">
21                         <b>Click on the following link(s) to download the exported batch(es).</b>
22                     </div>
23                 </div>
24                 <fieldset class="rows">
25                     <table class="borderless">
26                         [% FOREACH batche IN batches %]
27                         <tr>
28                             [% IF ( batche.label_ids ) %]
29                             <td class="borderless">
30                                 [% batche.card_count %] Single Patron Cards
31                             </td>
32                             <td class="borderless">
33                                 <h1 id="pdf">
34                                     <a 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;start_card=[% batche.start_card %][% batche.label_ids %]">label_single_[% batche.card_count %].pdf</a>
35                                 </h1>
36                             </td>
37                             [% ELSIF ( batche.borrower_numbers ) %]
38                             <td class="borderless">
39                                 [% batche.card_count %] Single Patron Cards
40                             </td>
41                             <td class="borderless">
42                                 <h1 id="pdf">
43                                     <a href="/cgi-bin/koha/patroncards/[% batche.create_script %]?template_id=[% batche.template_id %]&amp;layout_id=[% batche.layout_id %]&amp;start_card=[% batche.start_card %][% batche.borrower_numbers %]">label_single_[% batche.card_count %].pdf</a>
44                                 </h1>
45                             </td>
46                             [% ELSE %]
47                             <td class="borderless">
48                                 Card Batch Number [% batche.batch_id %]
49                             </td>
50                             <td class="borderless">
51                                 <h1 id="pdf">
52                                     <a 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;start_card=[% batche.start_card %]">label_batch_[% batche.batch_id %].pdf</a>
53                                 </h1>
54                             </td>
55                             [% END %]
56                         </tr>
57                         [% END %]
58                     </table>
59                 </fieldset>
60                 <fieldset class="action">
61                     <div style="margin: 10px 10px 10px 0px;">
62                         <span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="done" onclick="parent.parent.GB_hide();" value="Done"></span></span>
63                     </div>
64                 </fieldset>
65             </form>
66             [% ELSE %]
67             <div align="center">
68                 <div class="message">
69                     [% IF ( label_ids ) %]
70                     <b>Exporting [% card_count %] patroncard(s).</b>
71                     [% ELSIF ( borrower_numbers ) %]
72                     <b>Exporting [% borrower_count %] patroncard(s).</b>
73                     [% ELSE %]
74                     <b>[% multi_batch_count %] batch(es) to export.</b>
75                     [% END %]
76                 </div>
77             </div>
78             <form name="exporting" method="post" action="/cgi-bin/koha/patroncards/print.pl">
79                 <input type="hidden" name="op" value="export" />
80                 <input type="hidden" name="referer" value="[% referer %]" />
81                 [% FOREACH batch_id IN batch_ids %]
82                     <input type="hidden" name="batch_id" value="[% batch_id.batch_id %]" />
83                 [% END %]
84                 [% FOREACH label_id IN label_ids %]
85                     <input type="hidden" name="label_id" value="[% label_id.label_id %]" />
86                 [% END %]
87                 [% FOREACH borrower_number IN borrower_numbers %]
88                     <input type="hidden" name="borrower_number" value="[% borrower_number.borrower_number %]" />
89                 [% END %]
90                 <fieldset class="rows">
91                     <table class="borderless">
92                         <tr>
93                             <td class="borderless">
94                                 <label for="template">Select a template to be applied: </label>
95                             </td>
96                             <td class="borderless">
97                                 <select name="template_id">
98                                     [% FOREACH template IN templates %]
99                                     <option value="[% template.template_id %]">[% template.template_code %]</option>
100                                     [% END %]
101                                 </select>
102                             </td>
103                         </tr>
104                         <tr>
105                             <td class="borderless">
106                                 <label for="layout">Select a layout to be applied: </label>
107                             </td>
108                             <td class="borderless">
109                                 <select name="layout_id">
110                                     [% FOREACH layout IN layouts %]
111                                     <option value="[% layout.layout_id %]">[% layout.layout_name %]</option>
112                                     [% END %]
113                                 </select>
114                             </td>
115                         </tr>
116                         <tr>
117                             <td class="borderless">
118                                 <label for="start_card">Enter starting card number: </label>
119                             </td>
120                             <td class="borderless">
121                                 <input type="text" size="5" id="start_card" name="start_card" class="focus" title="Starting card number" value="1"/>
122                             </td>
123                         </tr>
124                     </table>
125                 </fieldset>
126                 <fieldset class="action">
127                     <div style="margin: 10px 10px 10px 0px;">
128                         <span class="yui-button yui-link-button"><span class="first-child"><input type="submit" value="Export" /></span></span>
129                         <span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="done" onclick="parent.parent.GB_hide();" value="Cancel"></span></span>
130                     </div>
131                 </fieldset>
132             </form>
133             [% END %]
134         </div>
135     [% INCLUDE 'intranet-bottom.inc' %]