Bug 22083: Typo in circulation_batch_checkouts.tt
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / circulation_batch_checkouts.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Branches %]
4 [% USE KohaDates %]
5 [% USE Price %]
6 [% USE AuthorisedValues %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 [% SET destination = "circ" %]
10 <title>Koha &rsaquo; Circulation
11 [% IF patron %]
12   &rsaquo; Batch check out &rsaquo; Issuing items to [% INCLUDE 'patron-title.inc' invert_name = 1 no_html = 1 %]
13 [% END %]
14 </title>
15 [% INCLUDE 'doc-head-close.inc' %]
16 [% Asset.css("css/datatables.css") | $raw %]
17 </head>
18
19 <body id="circ_circulation_batch_checkouts" class="circ">
20
21 [% INCLUDE 'header.inc' %]
22 [% INCLUDE 'circ-search.inc' %]
23
24 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo;
25     [% IF patron %]
26         <a href="/cgi-bin/koha/circ/circulation.pl">Batch check out</a> &rsaquo; [% INCLUDE 'patron-title.inc' %]
27     [% ELSE %]
28         Batch check out
29     [% END %]
30 </div>
31 <div id="doc3" class="yui-t2">
32
33    <div id="bd">
34 <div id="yui-main">
35 <div class="yui-b">
36
37 <div class="yui-g">
38
39 [% IF patron %]
40 [% INCLUDE 'members-toolbar.inc' %]
41 [% END %]
42
43 [% IF patron and not batch_allowed %]
44   <div class="dialog alert">You are not allowed to use batch checkout for this patron</div>
45 [% ELSIF patron and noissues and not checkout_infos %]
46   <div class="dialog alert">
47     Cannot check out!
48     [% IF charges %]
49       <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
50     [% END %]
51     [% IF charges_guarantees %]
52         <li>
53             <span class="circ-hlt">Fees &amp; Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees | $Price %].
54         </li>
55         <li>
56             <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
57         </li>
58     [% END %]
59   </div>
60 [% ELSIF patron and not checkout_infos %]
61   <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl">
62     <fieldset id="circ_circulation_issue">
63       <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
64       <fieldset class="rows">
65         <legend>Use a file</legend>
66         <ol>
67           <li><label for="uploadfile">File: </label> <input type="file" id="uploadfile" name="uploadfile" /></li>
68         </ol>
69       </fieldset>
70       <fieldset class="rows">
71         <legend>Or list barcodes one by one</legend>
72         <ol>
73           <li>
74             <label for="barcodelist">Barcode list (one barcode per line): </label>
75             <textarea rows="10" cols="30" id="barcodelist" name="barcodelist"></textarea>
76           </li>
77         </ol>
78       </fieldset>
79       <input type="hidden" name="op" value="show" />
80       <fieldset class="action">
81         <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
82         <input type="hidden" name="branch" value="[% branch | html %]" />
83         <input type="hidden" name="batch" value="1" />
84         <input type="submit" value="Check out" class="button" />
85       </fieldset>
86     </fieldset>
87   </form>
88
89 [% ELSIF patron %]
90   [% IF confirmation_needed && CAN_user_circulate_force_checkout %]
91     <h3>Batch checkout confirmation [% IF patron %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] [% END %]</h3>
92     <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
93   [% ELSE %]
94     <h3>Batch checkout information [% IF patron.borrowernumber %] for [% INCLUDE 'patron-title.inc' invert_name = 1 %] |[% batch | html %]|[% END %]</h3>
95   [% END %]
96     <table id="checkout_infos">
97       <thead>
98         <tr>
99           [% IF confirmation_needed && CAN_user_circulate_force_checkout %]
100             <th class="NoSort"></th>
101           [% END %]
102           <th>Barcode</th>
103           <th class="anti-the">Title</th>
104           <th>Information</th>
105         </tr>
106       </thead>
107       <tbody>
108         [% FOR checkout_info IN checkout_infos %]
109           <tr>
110             [% IF confirmation_needed && CAN_user_circulate_force_checkout %]
111               <td>
112                 [% IF checkout_info.NEEDSCONFIRMATION %]
113                   <input type="checkbox" name="barcodes" value="[% checkout_info.barcode | html %]" checked="checked" />
114                 [% END %]
115               </td>
116             [% END %]
117             <td>[% checkout_info.barcode | html %]</td>
118             <td>
119               <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% checkout_info.biblio.biblionumber | uri %]&amp;type=intra"><strong>[% checkout_info.biblio.title | html %][% FOREACH subtitle IN checkout_info.biblio.subtitles %] [% subtitle.subfield | html %][% END %]</strong></a>[% IF checkout_info.biblio.author %], by [% checkout_info.biblio.author | html %][% END %][% IF ( checkout_info.item.itemnotes ) %]- <span class="circ-hlt">[% checkout_info.item.itemnotes | html %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% checkout_info.biblio.biblionumber | html %]&amp;itemnumber=[% checkout_info.item.itemnumber | html %]#item[% checkout_info.item.itemnumber | html %]">[% checkout_info.item.barcode | html %]</a>
120             </td>
121             <td>
122               [% IF checkout_info.NEEDSCONFIRMATION %]
123                 <ul class="fa-ul warn">
124                   [% IF checkout_info.AGE_RESTRICTION %]
125                       <li><i class="fa fa-li fa-warning"></i>Age restriction [% checkout_info.AGE_RESTRICTION | html %].</li>
126                   [% END %]
127                   [% IF checkout_info.RENEW_ISSUE %]
128                       <li><i class="fa fa-li fa-warning"></i>This item is currently checked out to this patron. Renew?</li>
129                   [% END %]
130                   [% IF checkout_info.RESERVE_WAITING %]
131                       <li><i class="fa fa-li fa-warning"></i>This item is waiting for another patron.</li>
132                   [% END %]
133                   [% IF checkout_info.RESERVED %]
134                       <li><i class="fa fa-li fa-warning"></i>This item is on hold for another patron.</li>
135                   [% END %]
136                   [% IF checkout_info.ISSUED_TO_ANOTHER %]
137                       <li><i class="fa fa-li fa-warning"></i>This item is checked out to another patron.
138                     [% IF CAN_user_circulate_force_checkout %]
139                       Check in and check out?
140                       [% END %]</li>
141                   [% END %]
142                   [% IF checkout_info.TOO_MANY %]
143                       <li><i class="fa fa-li fa-warning"></i>Too many checked out.</li>
144                   [% END %]
145                   [% IF checkout_info.BORRNOTSAMEBRANCH %]
146                       <li><i class="fa fa-li fa-warning"></i>This patron is from a different library ([% Branches.GetName( checkout_info.BORRNOTSAMEBRANCH ) | html %]).</li>
147                   [% END %]
148                   [% IF checkout_info.PATRON_CANT %]
149                       <li><i class="fa fa-li fa-warning"></i>This patron can't check out this item per library circulation policy.</li>
150                   [% END %]
151                   [% IF checkout_info.NOT_FOR_LOAN_FORCING %]
152                     [% IF checkout_info.itemtype_notforloan %]
153                         <li><i class="fa fa-li fa-warning"></i>Item type is normally not for loan.</li>
154                     [% ELSIF checkout_info.item_notforloan %]
155                       [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, checkout_info.item_notforloan, 0 ) %]
156                         <li><i class="fa fa-li fa-warning"></i>Item is normally not for loan [% IF item_notforloan_lib %]([% item_notforloan_lib | html %])[% END %].</li>
157                     [% END %]
158                   [% END %]
159                   [% IF checkout_info.USERBLOCKEDOVERDUE %]
160                       <li><i class="fa fa-li fa-warning"></i>Patron has [% checkout_info.USERBLOCKEDOVERDUE | html %] overdue item(s).</li>
161                   [% END %]
162                   [% IF checkout_info.ITEM_LOST %]
163                       <li><i class="fa fa-li fa-warning"></i>This item has been lost with a status of "[% checkout_info.ITEM_LOST | html %]."</li>
164                   [% END %]
165                   [% IF checkout_info.HIGHHOLDS %]
166                       <li><i class="fa fa-li fa-warning"></i>High demand item. Loan period shortened to [% checkout_info.HIGHHOLDS.duration | html %] days (due [% checkout_info.HIGHHOLDS.returndate | html %]).</li>
167                   [% END %]
168                   [% IF checkout_info.HIGHHOLDS %] <!-- FIXME -->
169                       <script type="text/javascript">
170                           $(document).ready(function() {
171                               $("input[name=duedatespec]:hidden").val('[% checkout_info.HIGHHOLDS.returndate | html %]');
172                           });
173                       </script>
174                   [% END %]
175
176                   [% IF NOT checkout_info.IMPOSSIBLE && ( CAN_user_circulate_force_checkout or checkout_info.HIGHHOLDS ) %]
177                       [% IF checkout_info.RESERVED || checkout_info.RESERVE_WAITING %] <!-- arbitrary choice, revert the reserve is not possible-->
178                         <li><i class="fa fa-li fa-warning"></i>This item is on hold for another patron. The hold will be overridden, but not cancelled.</li>
179                       [% END %]
180                   [% END %]
181
182                   [% IF checkout_info.PREVISSUE %]
183                       <li>This item has previously been checked out to this patron.</li>
184                   [% END %]
185                 </ul>
186               [% END %]
187
188
189               [% IF checkout_info.alert.ITEM_LOST || checkout_info.alert.OTHER_CHARGES %]
190                 <ul class="info">
191                   [% IF checkout_info.alert.ITEM_LOST %]
192                       <li>This item has been lost with a status of "[% checkout_info.alert.ITEM_LOST | html %]."</li>
193                   [% END %]
194                   [% IF checkout_info.alert.OTHER_CHARGES %]
195                       <li>The patron has unpaid charges for holds, rentals etc of [% checkout_info.alert.OTHER_CHARGES | html %].</li>
196                   [% END %]
197                 </ul>
198               [% END %]
199
200
201               [% IF checkout_info.IMPOSSIBLE %]
202                 <ul class="fa-ul error">
203                   [% IF checkout_info.STATS  %]
204                       <li><i class="fa fa-li fa-exclamation"></i>Local use recorded.</li>
205                   [% END %]
206
207                   [% IF checkout_info.NOT_FOR_LOAN %]
208                     [% IF checkout_info.itemtype_notforloan %]
209                        <li><i class="fa fa-li fa-exclamation"></i>Item type not for loan.</li>
210                     [% ELSIF checkout_info.item_notforloan %]
211                       [% item_notforloan_lib = AuthorisedValues.GetByCode( checkout_info.authvalcode_notforloan, checkout_info.item_notforloan, 0 ) %]
212                         <li><i class="fa fa-li fa-exclamation"></i>Item not for loan [% IF checkout_info.item_notforloan_lib %]([% checkout_info.item_notforloan_lib | html %])[% END %].</li>
213                     [% END %]
214                   [% END %]
215                   [% IF checkout_info.WTHDRAWN %]
216                       <li><i class="fa fa-li fa-exclamation"></i>Item has been withdrawn.</li>
217                   [% END %]
218                   [% IF checkout_info.RESTRICTED %]
219                       <li><i class="fa fa-li fa-exclamation"></i>Item is restricted.</li>
220                   [% END %]
221                   [% IF checkout_info.GNA %]
222                       <li><i class="fa fa-li fa-exclamation"></i>Patron's address is in doubt.</li>
223                   [% END %]
224                   [% IF checkout_info.CARD_LOST %]
225                       <li><i class="fa fa-li fa-exclamation"></i>Patron's card is lost.</li>
226                   [% END %]
227                   [% IF checkout_info.DEBARRED %]
228                       <li><i class="fa fa-li fa-exclamation"></i>Patron is restricted.</li>
229                   [% END %]
230                   [% IF checkout_info.NO_MORE_RENEWALS %]
231                       <li><i class="fa fa-li fa-exclamation"></i>No more renewals possible.</li>
232                   [% END %]
233                   [% IF checkout_info.EXPIRED %]
234                       <li><i class="fa fa-li fa-exclamation"></i>Patron's card is expired.</li>
235                   [% END %]
236                   [% IF checkout_info.ITEMNOTSAMEBRANCH %]
237                       <li><i class="fa fa-li fa-exclamation"></i>This item belongs to [% Branches.GetName( checkout_info.itemhomebranch ) | html %] and cannot be checked out from this location.</li>
238                   [% END %]
239                   [% IF checkout_info.USERBLOCKEDREMAINING %]
240                       <li><i class="fa fa-li fa-exclamation"></i>Patron has had overdue items and is blocked for [% checkout_info.USERBLOCKEDREMAINING | html %] day(s).</li>
241                   [% END %]
242                   [% IF checkout_info.USERBLOCKEDOVERDUE %]
243                       <li><i class="fa fa-li fa-exclamation"></i>Checkouts are BLOCKED because patron has overdue items.</li>
244                   [% END %]
245                   [% IF checkout_info.TOO_MANY %]
246                       <li><i class="fa fa-li fa-exclamation"></i>Too many checked out.</li>
247                   [% END %]
248                   [% IF checkout_info.UNKNOWN_BARCODE %]
249                       <li><i class="fa fa-li fa-exclamation"></i>The barcode was not found [% checkout_info.barcode | html %].</li>
250                   [% END %]
251                   [% IF checkout_info.DEBT %]
252                       <li><i class="fa fa-li fa-exclamation"></i>The patron has a debt of [% checkout_info.DEBT | $Price %].</li> <!-- Need debt_confirmed -->
253                   [% END %]
254                 </p>
255               [% END %]
256
257               [% IF checkout_info.issue.date_due %]
258                 <li>Due on [% checkout_info.issue.date_due | $KohaDates %]</li>
259               [% END %]
260             </td>
261           </tr>
262         [% END %]
263       </tbody>
264     </table>
265
266     [% IF confirmation_needed && CAN_user_circulate_force_checkout %]
267         <fieldset>
268             <legend>Please confirm checkout</legend>
269       <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
270       <input type="hidden" name="issueconfirmed" value="1" />
271       <input type="hidden" name="debt_confirmed" value="1" />
272       <input type="hidden" name="branch" value="[% branch | html %]" />
273       <input type="hidden" name="batch" value="1" />
274       <input type="submit" id="checkoutrenew" class="approve" value="Checkout or renew" />
275         </fieldset>
276     </form>
277     [% END %]
278
279 [% ELSE %]
280     <div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
281 [% END %]
282
283 </div>
284 </div>
285 </div>
286 [% IF patron %]
287     <div class="yui-b">
288         [% INCLUDE 'circ-menu.inc' %]
289     </div>
290 [% END %]
291 </div>
292
293 [% MACRO jsinclude BLOCK %]
294     [% INCLUDE 'calendar.inc' %]
295     [% INCLUDE 'datatables.inc' %]
296     [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
297     <script type="text/javascript">
298
299         $(document).ready(function() {
300             if($('#barcodelist').length) {
301                 $('#barcodelist').focus();
302             } else if ($('#checkoutrenew').length) {
303                 $('#checkoutrenew').focus();
304             }
305             $("#checkout_infos").dataTable($.extend(true, {}, dataTablesDefaults, {
306                 "sDom": 't',
307                 "aaSorting": [],
308                 "aoColumnDefs": [
309                     { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
310                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
311                 ],
312                 "bPaginate": false
313             }));
314         });
315     </script>
316     [% INCLUDE 'str/members-menu.inc' %]
317     [% Asset.js("js/members-menu.js") | $raw %]
318 [% END %]
319
320 [% INCLUDE 'intranet-bottom.inc' %]