Bug 18695: Translatability: Get rid of [%% INCLUDE in translation for circulation.tt
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / circulation.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% USE KohaDates %]
4 [% USE Categories %]
5 [% USE ColumnsSettings %]
6 [% USE ItemTypes %]
7 [% USE Price %]
8 [% IF Koha.Preference('ExportRemoveFields') OR Koha.Preference('ExportWithCsvProfile') %]
9    [% SET exports_enabled = 1 %]
10 [% END %]
11 [% USE AuthorisedValues %]
12 [% INCLUDE 'doc-head-open.inc' %]
13 [% SET destination = "circ" %]
14 <title>Koha &rsaquo; Circulation
15 [% IF borrowernumber and borrower%]
16   &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
17 [% END %]
18 </title>
19 [% INCLUDE 'doc-head-close.inc' %]
20 [% INCLUDE 'calendar.inc' %]
21
22 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
23 [% INCLUDE 'strings.inc' %]
24 [% INCLUDE 'datatables.inc' %]
25 [% INCLUDE 'columns_settings.inc' %]
26 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
27 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
28 [% INCLUDE 'timepicker.inc' %]
29 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
30 <script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation.js"></script>
31 <script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts.js"></script>
32 <script type="text/javascript" src="[% interface %]/[% theme %]/js/holds.js"></script>
33 <script type="text/javascript">
34 //<![CDATA[
35 /* Set some variable needed in circulation.js */
36 var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
37 var interface = "[% interface %]";
38 var theme = "[% theme %]";
39 var borrowernumber = "[% borrowernumber %]";
40 var branchcode = "[% branch %]";
41 var exports_enabled = "[% exports_enabled %]";
42 var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
43 var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %];
44 var script = "circulation";
45 var relatives_borrowernumbers = new Array();
46 [% FOREACH b IN relatives_borrowernumbers %]
47     relatives_borrowernumbers.push("[% b %]");
48 [% END %]
49
50 var MSG_ADD_MESSAGE = _("Add a new message");
51 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
52 var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
53
54 columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %]
55
56 [% IF borrowernumber and borrower %]
57     if($.cookie("holdfor") != [% borrowernumber %]){
58         $.removeCookie("holdfor", { path: '/' });
59     }
60 [% ELSE %]
61     $.removeCookie("holdfor", { path: '/' });
62 [% END %]
63
64 [% UNLESS ( borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
65
66 // On-site checkout
67 function toggle_onsite_checkout(){
68     if ( $("#onsite_checkout").prop('checked') ) {
69         $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
70         [% IF !Koha.Preference('SpecifyDueDate') %]
71             $("#duedatespec").datetimepicker('destroy');
72         [% END %]
73     } else {
74         $("#duedatespec").datetimepicker({
75             onClose: function(dateText, inst) {
76                 if (validate_date(dateText, inst) ) {
77                     $("#barcode").focus();
78                 }
79             },
80             hour: 23,
81             minute: 59
82         }).on("change", function(e, value) {
83             if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
84         });
85     }
86 }
87
88 function Dopop(link) {
89     var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
90 }
91 $(document).ready(function() {
92     $('#mainform').on('submit',function() {
93         if ($("#barcode") && $("#barcode").val()) {
94             $('#barcode').on('keypress',function(event) {
95                 $('#barcodeSubmittedModal').modal();
96                 event.preventDefault(); }
97             );
98         }
99     });
100
101     [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
102         // listen submit to trigger qslip on empty checkout
103         $('#mainform').bind('submit',function() {
104             if ($('#barcode').val() == '') {
105                 return printx_window( '[% CircAutoPrintQuickSlip %]' );
106             }
107         });
108     [% END %]
109     toggle_onsite_checkout();
110     $("#onsite_checkout").click(function(){
111         toggle_onsite_checkout();
112     });
113
114     $("#suspend_until").datepicker({
115         onClose: function(dateText, inst) {
116             validate_date(dateText, inst);
117         },
118         minDate: 1, // require that hold suspended until date is after today
119     });
120
121 });
122
123 //]]>
124 </script>
125 </head>
126 <body id="circ_circulation" class="circ">
127
128 [% INCLUDE 'header.inc' %]
129 [% INCLUDE 'circ-search.inc' %]
130
131 <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;
132 [% IF borrowernumber and borrower %]
133     <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> &rsaquo; [% INCLUDE 'patron-title.inc' %]
134 [% ELSE %]
135     <strong>Checkouts</strong>
136 [% END %]
137 </div>
138 [% IF ( $borrowers ) %]
139 <div id="doc" class="yui-t7">
140
141    <div id="bd">
142         <div id="yui-main">
143         <div class="yui-g">
144 [% ELSE %]
145 <div id="doc3" class="yui-t2">
146
147    <div id="bd">
148         <div id="yui-main">
149         <div class="yui-b">
150 [% END %]
151
152 [% IF borrowernumber and borrower %]
153 [% INCLUDE 'members-toolbar.inc' %]
154 [% END %]
155
156 <!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
157 <div style="display: none;" id="add_message_form">
158 <form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
159 <fieldset id="borrower_messages" class="brief">
160 <legend>Leave a message</legend>
161         <ol>
162     <li>
163             <label for="message_type">Add a message for:</label>
164           <select name="message_type" id="message_type">
165             <option value="L">Staff - Internal note</option>
166             <option value="B">OPAC - [% firstname %] [% surname %]</option>
167         </select>
168     </li>
169     [% IF ( canned_bor_notes_loop ) %]
170         <li>
171                 <label for="type">Predefined notes: </label>
172                 <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
173                     <option value="">Select note</option>
174                     [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %]
175                     <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option>
176                     [% END %]
177                 </select>
178         </li>
179     [% END %]
180     <li>
181         <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
182     </li>
183         </ol>
184     <fieldset class="action">
185         <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a>
186     </fieldset>
187
188         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
189         <input type="hidden" name="branchcode" value="[% branch %]" />
190 </fieldset>
191 </form>
192 </div>
193
194 [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>[% END %]
195
196 [% IF additional_materials %]
197     <div id="materials" class="dialog message">Note about the accompanying materials: <br />
198     [% additional_materials %]
199     </div>
200 [% END %]
201
202 [% IF ( alert.ITEM_LOST ) %]
203     <div class="dialog message">This item has been lost with a status of "[% alert.ITEM_LOST %]".</div>
204 [% END %]
205
206 [% IF ( alert.OTHER_CHARGES ) %]
207     <div class="dialog message">The patron has unpaid charges for holds, rentals etc of [% alert.OTHER_CHARGES %]</div>
208 [% END %]
209
210 [% IF alert.HIGHHOLDS %]
211     <div class="dialog message">High demand item. <b>Loan period was not shortened due to override.</b> Shortened due date would have been [% alert.HIGHHOLDS.returndate %] ([% alert.HIGHHOLDS.duration %] days).</div>
212 [% END %]
213
214 [% IF ( nopermission ) %]
215     <div class="dialog alert">Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.</div>
216 [% END %]
217
218 [% IF ( NEEDSCONFIRMATION ) %]
219 <div class="yui-g">
220
221 <div id="circ_needsconfirmation" class="dialog alert audio-alert-action">
222 [% IF CAN_user_circulate_force_checkout %]
223   <h3>Please confirm checkout</h3>
224 [% ELSE %]
225   <h3>Cannot check out</h3>
226 [% END %]
227
228 <ul>
229 [%IF ( AGE_RESTRICTION ) %]
230     <li>Age restriction [% AGE_RESTRICTION %].
231       [% IF CAN_user_circulate_force_checkout %]
232         Check out anyway?
233       [% END %]
234     </li>
235 [% END %]
236
237 [% IF ( DEBT ) %]
238     <li>The patron has a debt of [% DEBT %].</li>
239 [% END %]
240
241 [% IF ( DEBT_GUARANTEES ) %]
242     <li>The patron's guarantees collectively have a debt of [% DEBT_GUARANTEES | $Price %].</li>
243 [% END %]
244
245 [% IF ( RENTALCHARGE && RENTALCHARGE > 0 ) %]
246     <li>Rental charge for this item: [% RENTALCHARGE %]</li>
247 [% END %]
248
249 [% IF ( RENEW_ISSUE ) %]
250     <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is currently checked out to this patron.  Renew?</li>
251 [% END %]
252
253 [% IF ( RESERVE_WAITING ) %]
254     <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% resbranchname %] since [% reswaitingdate | $KohaDates %]</li>
255 [% END %]
256
257 [% IF ( RESERVED ) %]
258     <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been on hold for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% resbranchname %] since [% resreservedate | $KohaDates %]</li>
259 [% END %]
260
261 [% IF ( ISSUED_TO_ANOTHER ) %]
262     <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issued_borrowernumber %]">[% issued_firstname %] [% issued_surname %]</a> ([% issued_cardnumber %]).
263       [% IF CAN_user_circulate_force_checkout %]
264         Check in and check out?
265       [% END %]
266     </li>
267 [% END %]
268
269 [% IF TOO_MANY and TOO_MANY == 'TOO_MANY_CHECKOUTS' %]
270     <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
271 [% END %]
272
273 [% IF TOO_MANY and TOO_MANY == 'TOO_MANY_ONSITE_CHECKOUTS' %]
274     <li>Too many on-site checked out. [% current_loan_count %] on-site checked out, only [% max_loans_allowed %] are allowed.</li>
275 [% END %]
276
277 [% IF ( BORRNOTSAMEBRANCH ) %]
278     <li>This patron is from a different library ([% BORRNOTSAMEBRANCH %])</li>
279 [% END %]
280
281 [% IF ( PATRON_CANT ) %]
282     <li>This patron can't check out this item per library circulation policy.</li>
283 [% END %]
284
285 [% IF ( TOO_MANY and TOO_MANY == 'NO_RULE_DEFINED' ) %]
286     <li>No circulation rule is defined for this patron and itemtype combination.</li>
287 [% END %]
288
289 [% IF ( NOT_FOR_LOAN_FORCING ) %]
290     <li>
291     [% IF ( itemtype_notforloan ) %]
292         Item type is normally not for loan.
293     [% ELSIF ( item_notforloan ) %]
294         [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
295         Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
296     [% END %]
297       [% IF CAN_user_circulate_force_checkout %]
298         Check out anyway?
299       [% END %]
300     </li>
301 [% END %]
302
303 [% IF ( USERBLOCKEDOVERDUE ) %]
304     <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).
305       [% IF CAN_user_circulate_force_checkout %]
306        Check out anyway?
307       [% END %]
308     </li>
309 [% END %]
310
311 [% IF ( ITEM_LOST ) %]
312     <li>This item has been lost with a status of "[% ITEM_LOST %]".
313       [% IF CAN_user_circulate_force_checkout %]
314         Check out anyway?
315       [% END %]
316     </li>
317 [% END %]
318
319 [% IF HIGHHOLDS %]
320     <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
321 [% END %]
322
323 [% IF BIBLIO_ALREADY_ISSUED %]
324   <li>
325     Patron has already checked out another item from this record.
326     [% IF CAN_user_circulate_force_checkout %]
327       Check out anyway?
328     [% END %]
329   </li>
330 [% END %]
331 </ul>
332
333 [% IF HIGHHOLDS %]
334 <script language="JavaScript" type="text/javascript">
335 $(document).ready(function() {
336     [% IF !override_high_holds %]
337         $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]');
338         if ('[% duedatespec %]' === '') {
339             $("input[name=restoreduedatespec]:hidden").val('highholds_empty');
340         } else {
341             $("input[name=restoreduedatespec]:hidden").val('[% duedatespec %]');
342         }
343     [% END %]
344
345     $("#override_high_holds_tmp").on( 'change', function() {
346         if ( this.checked ) {
347             $("input[name=duedatespec]:hidden").val('');
348         }
349     });
350 });
351 </script>
352 [% END %]
353
354 [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
355 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
356     <input type="hidden" name="restoreduedatespec" />
357
358 [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
359
360 [% IF HIGHHOLDS %]
361     <p class="circ-override-high-holds">
362     <input type="checkbox" name="override_high_holds_tmp" id="override_high_holds_tmp" value="1" />
363     <label for="override_high_holds_tmp">Don't decrease loan length based on holds</label>
364     </p>
365 [% END %]
366
367 [% IF ( RESERVED ) %]
368     <p>
369     <input type="checkbox" id="cancelreserve" name="cancelreserve" value="cancel" />
370     <label for="cancelreserve">Cancel hold</label>
371     </p>
372 [% END %]
373
374 [% IF ( RESERVE_WAITING ) %]
375 <p>
376     <label for="cancelreserve">Cancel hold</label>
377     <input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
378     <label for="revertreserve">Revert waiting status</label>
379     <input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
380 </p>
381 [% END %]
382
383     <input type="hidden" name="barcode" value="[% barcode |html %]" />
384     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
385     <input type="hidden" name="issueconfirmed" value="1" />
386     <input type="hidden" name="override_high_holds" value="[% override_high_holds %]"/>
387     [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
388     [% IF ( INVALID_DATE ) %]
389     <p>
390     <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
391     <label for="duedatespec">Due date</label>
392     </p>
393     [% ELSE %]
394     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
395     [% END %]
396     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
397     <input type="hidden" name="branch" value="[% branch %]" />
398     [% IF ( RENEW_ISSUE ) %]
399     <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, renew (Y)</button>
400     [% ELSE %]
401     <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, check out (Y)</button>
402     [% END %]
403     <input type="hidden" name="onsite_checkout" value="[% onsite_checkout %]" />
404 </form>
405 [% END %]
406
407 [% IF ( RESERVED ) %]
408 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
409     <input type="hidden" name="restoreduedatespec" />
410     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
411     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
412     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
413     <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
414 </form>
415 [% END %]
416
417 [% IF ( RESERVE_WAITING ) %]
418 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
419     <input type="hidden" name="restoreduedatespec" />
420     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
421     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
422     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
423     <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% reserveborrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
424 </form>
425 [% END %]
426
427 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
428     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
429     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
430     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
431     <input type="hidden" name="restoreduedatespec" />
432     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
433     [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
434         [% IF ( RENEW_ISSUE ) %]
435         <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't renew (N)</button>
436         [% ELSE %]
437         <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't check out (N)</button>
438         [% END %]
439     [% ELSE %]
440         <button type="submit" class="deny"><i class="fa fa-times"></i> Continue</button>
441     [% END %]
442 </form>
443
444 [% IF ( RESERVED || ISSUED_TO_ANOTHER ) && (CAN_user_reserveforothers_place_holds ) %]
445     [% UNLESS noissues %]
446         <button type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber %]&borrowernumber=[% borrowernumber %]'"><i class="fa fa-sticky-note-o"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
447     [% END %]
448 [% END %]
449 </div></div>
450 [% END %] <!-- NEEDSCONFIRMATION -->
451
452         [% IF ( IMPOSSIBLE ) %]
453
454 <div class="yui-g">
455 <div id="circ_impossible" class="dialog alert audio-alert-warning">
456     [% IF ( UNKNOWN_BARCODE ) %]
457         <h3>Barcode not found</h3>
458     [% END %]
459 <!-- RESULT OF ISSUING REQUEST -->
460         <ul>
461         [% IF ( STATS ) %]
462             <li>Local use recorded</li>
463         [% END %]
464
465         [% IF ( INVALID_DATE ) %]
466             <li>The due date &quot;[% INVALID_DATE %]&quot; is invalid</li>
467         [% END %]
468
469         [% IF ( UNKNOWN_BARCODE ) %]
470             <li>The barcode was not found: <span class="ex">[% barcode |html %]</span>
471             [% IF ( fast_cataloging ) %]
472                 [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
473             <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&amp;barcode=[% barcode |uri %]&amp;circborrowernumber=[% borrowernumber %]&amp;branch=[% branch %]&amp;duedatespec=[% duedatespec %]&amp;stickyduedate=[% stickyduedate %]">Add record using fast cataloging</a>
474                 [% END %]
475             [% END %]
476
477         [% IF ( FALLBACK ) %]
478             [% IF options %]
479                 <br />The following items were found by searching:
480                 [% FOREACH book IN options %]
481                     <br />
482                     <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
483                     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
484                         <input type="hidden" name="restoreduedatespec" />
485                         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
486                         <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
487                         <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
488                         <input type="hidden" name="branch" value="[% branch %]" />
489                         <input type="hidden" name="barcode" value="[% book.barcode %]" />
490                         <button type="submit" name="x"><i class="fa fa-check"></i> Check out [% book.barcode %]: [% book.title %]</button>
491                     </form>
492                 [% END %]
493             [% ELSE %]
494                 <br />No items were found by searching.
495             [% END %]
496         [% END %]
497
498      </li>
499         [% END %]
500
501         [% IF ( NOT_FOR_LOAN ) %]
502             <li>
503             [% IF ( itemtype_notforloan ) %]
504                 Item type not for loan.
505             [% ELSIF ( item_notforloan ) %]
506                 [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
507                 Item not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
508             [% END %]
509             </li>
510         [% END %]
511
512         [% IF ( WTHDRAWN ) %]
513             <li>Item has been withdrawn</li>
514         [% END %]
515
516         [% IF ( RESTRICTED ) %]
517             <li>Item is restricted</li>
518         [% END %]
519
520         [% IF ( GNA ) %]
521             <li>Patron's address is in doubt</li>
522         [% END %]
523
524         [% IF ( CARD_LOST ) %]
525             <li>Patron's card is lost</li>
526         [% END %]
527
528         [% IF ( DEBARRED ) %]
529             <li>Patron is restricted</li>
530         [% END %]
531
532         [% IF ( NO_MORE_RENEWALS ) %]
533             <li>No more renewals possible</li>
534         [% END %]
535
536         [% IF NO_RENEWAL_FOR_ONSITE_CHECKOUTS %]
537             <li>This item can not be renewed, it's an on-site checkout</li>
538         [% END %]
539
540         [%IF ( AGE_RESTRICTION ) %]
541             <li>Age restriction [% AGE_RESTRICTION %].</li>
542         [% END %]
543
544         [% IF ( EXPIRED ) %]
545             <li>Patron's card is expired</li>
546         [% END %]
547
548         [% IF ( TOO_MANY ) %]
549             <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
550         [% END %]
551
552         [% IF ( ITEMNOTSAMEBRANCH ) %]
553             <li>This item belongs to [% Branches.GetName( itemhomebranch ) %] and cannot be checked out from this location.</li>
554         [% END %]
555
556         [% IF RETURN_IMPOSSIBLE %]
557             <li>This item must be returned to [% Branches.GetName( branch_to_return ) %].</li>
558         [% END %]
559
560         [% IF ( USERBLOCKEDWITHENDDATE ) %]
561             <li>Patron has a restriction until [% USERBLOCKEDWITHENDDATE | $KohaDates %].</li>
562         [% END %]
563
564         [% IF ( USERBLOCKEDNOENDDATE ) %]
565             <li>Patron has an indefinite restriction.</li>
566         [% END %]
567
568         [% IF ( USERBLOCKEDOVERDUE ) %]
569             <li>Checkouts are BLOCKED because patron has overdue items.</li>
570         [% END %]
571         </ul>
572
573         [% IF (forceallow) %]
574             <li>Restriction overridden temporarily.</li>
575         [% END %]
576
577 </div></div>
578 [% ELSE %]
579   [% IF (forceallow) %]
580       <div id="overridden_debarment" class="dialog alert">Restriction overridden temporarily</div>
581   [% END %]
582 [% END %] <!-- /impossible -->
583
584 <span class="audio-alert-success"></span>
585
586 [% IF ( issued ) %]
587 <p>Item checked out</p>
588 [% END %]
589
590 [% IF ( message ) %]
591 [% INCLUDE 'patron-toolbar.inc' %]
592 <h4>
593 No patron matched <span class="ex">[% message | html %]</span>
594 </h4>
595 [% END %]
596
597 [% IF ( borrowers ) %]
598 [% INCLUDE 'patron-toolbar.inc' %]
599
600 <fieldset id="circ_circulation_selectborrower">
601     [% INCLUDE 'circ-patron-search-results.inc' destination = "circ" %]
602 </fieldset>
603 [% ELSE %]
604
605 <!-- BARCODE ENTRY -->
606
607 [% IF borrowernumber and borrower %]
608 <div class="yui-g">
609
610 [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
611     <div class="dialog alert"><strong>Error:</strong> This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.</div>
612 [% END %]
613
614 [% IF ( !noissues ) || ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') )%]
615 <div class="yui-u first">
616
617 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
618     <input type="hidden" name="restoreduedatespec" />
619 [% IF ( issue ) %]
620     <fieldset id="circ_circulation_issue" class="lastchecked">
621 [% ELSE %]
622     <fieldset id="circ_circulation_issue">
623 [% END %]
624     [% IF ( DisplayClearScreenButton ) %]
625         <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
626     [% END %]
627
628     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
629
630     <label class="circ_barcode" for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
631
632         [% IF Koha.Preference('itemBarcodeFallbackSearch') %]
633             <div class="hint">Enter item barcode or keyword:</div>
634         [% ELSE %]
635             <div class="hint">Enter item barcode:</div>
636         [% END %]
637
638     [% IF NEEDSCONFIRMATION %]
639         <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
640     [% ELSE %]
641         <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
642     [% END %]
643     <button type="submit" class="btn">Check out</button>
644
645     <div id="show-checkout-settings">
646         <a href="#"><i class="fa fa-caret-right checkout-settings-icon"></i> Checkout settings</a>
647     </div>
648
649     <div class="checkout-settings">
650
651         [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
652             [% IF ( SpecifyDueDate ) %]
653                 <div id="specify-due-date" class="checkout-setting">
654                     <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
655                     [% IF ( duedatespec ) %]
656                         <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
657                     [% ELSE %]
658                         <input type="text" size="13" id="duedatespec" name="duedatespec" value="" />
659                     [% END %]
660                     <label for="stickyduedate"> Remember for session:</label>
661                     [% IF ( stickyduedate ) %]
662                         <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
663                     [% ELSE %]
664                         <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
665                     [% END %]
666                     <button class="btn btn-small action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
667                 </div>
668             [% END %]
669         [% END %]
670
671         [% UNLESS ( noissues ) %]
672             <div id="set-automatic-renewal" class="checkout-setting">
673                 [% IF NEEDSCONFIRMATION %]
674                     <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
675                 [% ELSE %]
676                     <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
677                 [% END %]
678
679                 <label for="auto_renew">Automatic renewal</label>
680             </div>
681             [% IF Koha.Preference('decreaseLoanHighHolds') %]
682                 <div id="set_high_holds_overrride" class="checkout-setting">
683                     [% IF NEEDSCONFIRMATION %]
684                         [% IF override_high_holds %]
685                             <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled" checked="checked"/>
686                         [% ELSE %]
687                             <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled"/>
688                         [% END %]
689                     [% ELSE %]
690                         [% IF override_high_holds %]
691                             <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" checked="checked" />
692                         [% ELSE %]
693                             <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" />
694                         [% END %]
695                     [% END %]
696                     <label for="override_high_holds">Don't decrease checkout length based on holds</label>
697                 </div>
698             [% END %]
699         [% END %]
700
701         [% IF Koha.Preference('OnSiteCheckouts') %]
702             <div id="onsite_checkout-select" class="checkout-setting">
703                 [% IF noissues %]
704                     <div class="onsite-checkout-only">
705                         <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
706                         <input type="text" name="duedatespec" id="duedatespec" />
707                         <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
708                     </div>
709                 [% ELSE %]
710                     <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" /> <label for="onsite_checkout">On-site checkout</label>
711                 [% END %]
712             </div>
713         [% END %]
714
715     </div> <!-- /.checkout-settings -->
716
717           <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
718           <input type="hidden" name="branch" value="[% branch %]" />
719           <input type="hidden" name="print" value="maybe" />
720           <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
721                 [% IF ( CHARGES ) %]
722                         <input type="hidden" name="charges" value="yes" />
723                         <input type="hidden" name="oldamount" value="[% amountold %]" />
724                 [% END %]
725 </fieldset>
726 [% IF ( issue ) %]
727     <div class="lastchecked">
728         <p><strong>Checked out: </strong>[% issue.item.biblioitemnumber.biblionumber.title %] ([% issue.item.barcode %]). Due on [% issue.date_due | $KohaDates %]</p>
729     </div>
730 [% END %]
731 </form></div>
732
733 [% END %]<!-- /unless noissues -->
734
735 [% IF ( noissues ) %]
736     [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
737         <div class="yui-u">
738     [% ELSE %]
739         <div>
740     [% END %]
741 [% ELSE %]
742     <div class="yui-u">
743 [% END %]
744
745         [% IF ( noissues ) %]
746             [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
747                 <div id="circmessages" class="circmessage attention">
748             [% ELSE %]
749                 <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
750                 <div id="circmessages" class="circmessage warning">
751             [% END %]
752             <h3>
753                 Cannot check out!
754                 [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
755                     <span class="circ-hlt">Only on-site checkouts are allowed</span>
756                 [% END %]
757             </h3>
758         [% ELSE %]
759             <div id="circmessages" class="circmessage attention">
760                 <h3>Attention:</h3>
761         [% END %]
762
763                 <ul>
764
765                    [% IF ( modifications ) %]
766                     <li><span class="circ-hlt">Pending modifications:</span> Patron has pending modifications.
767                             [% IF CAN_user_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
768                                     <a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a>
769                             [% END %]
770                    </li>
771                   [% END %]
772
773                         [% IF ( warndeparture ) %]
774                         <li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
775             Patron's card expires on [% expiry | $KohaDates %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]">Edit Details</a>
776
777                         </li>
778                         [% END %]
779
780                         [% IF ( returnbeforeexpiry ) %]
781                          <li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
782                          expiry date is before the date due, the date due will be set to the expiry date
783                          </li>
784                         [% END %]
785
786                         [% IF ( expired ) %]
787                         <li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
788             [% IF ( expiry ) %]Patron's card expired on [% expiry | $KohaDates %][% END %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]">Edit Details</a>
789
790                         </li>
791                         [% END %]
792
793             [% IF ( gna ) %]
794                         <li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
795                         [% END %]
796
797             [% IF ( lost ) %]
798                         <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
799                         [% END %]
800
801             [% IF ( userdebarred ) %]
802                <li class="blocker">
803                    <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
804
805                    [% IF ( userdebarreddate ) %]
806                        until [% userdebarreddate | $KohaDates %]
807                    [% END %]
808
809                    [% IF ( debarredcomment ) %]
810                        with the explanation: <br/><i>
811                            [% IF debarredcomment.search('OVERDUES_PROCESS') %]
812                                Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
813                            [% ELSE %]
814                                [% debarredcomment | html_line_break %]
815                            [% END %]
816                     </i>
817                    [% END %]
818                    <br/>
819                    <a class="btn btn-small" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a>
820                     [% IF (noissues && borrowernumber && CAN_user_circulate_force_checkout) %]
821                         <span class="override_debarment">
822                             <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% borrowernumber %]" class="btn btn-small">Override restriction temporarily</a>
823                         </span>
824                     [% END %]
825                </li>
826             [% END %]
827
828                 [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE</span>. See highlighted items <a href="#checkouts">below</a>[% END %]</li>
829             [% END %]
830
831             [% IF ( charges ) %]
832                 [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
833             [% END %]
834
835             [% IF ( charges_guarantees ) %]
836                 <li>
837                     <span class="circ-hlt">Fees &amp; Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees %].
838                         [% IF ( charges_guarantees_is_blocker ) %]
839                             <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
840                         [% END %]
841                 </li>
842             [% END %]
843
844
845             [% IF ( credits ) %]
846                 <li>
847                     <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount %][% END %]
848                 </li>
849             [% END %]
850
851                         </ul>
852         </div>
853
854             [% IF WaitingHolds.count %]
855                 <div id="holdswaiting" class="circmessage">
856                     <h4>Holds waiting:</h4>
857                     [% FOREACH w IN WaitingHolds %]
858                         <ul>
859                             <li>
860                                 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% w.biblio.biblionumber %]">[% w.biblio.title | html %]</a>
861                                 ([% ItemTypes.GetDescription( w.item.effective_itemtype ) %]),
862                                 [% IF ( w.biblio.author ) %] by [% w.biblio.author | html %] [% END %]
863                                 [% IF ( w.item.itemcallnumber ) %] [[% w.item.itemcallnumber %]] [% END %]
864                                 Hold placed on [% w.reservedate | $KohaDates %].
865
866                                 <br/>
867                                 [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]
868                                     [% SET waiting_expires_on = w.waiting_expires_on %]
869                                     Waiting at [% w.branch.branchname | html %] [% IF waiting_expires_on %] until [% waiting_expires_on | $KohaDates %] [% END %]
870                                 </strong>
871                             </li>
872                         </ul>
873                     [% END %]
874                 </div>
875             [% END %]
876
877         [% IF ( notes ) %]
878                         <div id="circnotes" class="circmessage">
879                         <h4>Notes:</h4>
880             <p><span class="circ-hlt">[% notesmsg %]</span></p>
881                         </div>
882
883
884     <!-- /If notes -->[% END %]
885
886     <div id="messages" class="circmessage">
887         <h4>Messages:</h4>
888         <ul>
889             [% FOREACH message IN librarian_messages %]
890                 <li>
891                     <span class="circ-hlt">
892                         [% message.message_date | $KohaDates %]
893                         [% Branches.GetName( message.branchcode ) %]
894                         <i>"[% message.message %]"</i>
895                     </span>
896                     [% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
897                         <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&amp;borrowernumber=[% message.borrowernumber %]" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);">[Delete]</a>
898                     [% END %]
899                 </li>
900             [% END %]
901             [% FOREACH message IN patron_messages %]
902                 <li><span class="">[% message.message_date | $KohaDates %] [% Branches.GetName( message.branchcode )%] <i>"[% message.message %]"</i></span>
903                 [% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
904                     <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&amp;borrowernumber=[% message.borrowernumber %]">[Delete]</a>
905                 [% END %]</li>
906             [% END %]
907         </ul>
908     </div>
909
910 </div>
911 </div>
912
913 <div class="yui-g"><div id="patronlists" class="toptabs">
914
915 <ul>
916     <li>
917         [% IF ( issuecount ) %]
918             <a href="#checkouts">[% issuecount %] Checkout(s)</a>
919         [% ELSE %]
920             <a href="#checkouts">0 Checkouts</a>
921         [% END %]
922     </li>
923
924     [% IF relatives_issues_count %]
925         <li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
926     [% END %]
927
928     <li>
929         [% IF ( holds_count ) %]
930             <a href="#reserves" id="holds-tab">[% holds_count %] Hold(s)</a>
931         [% ELSE %]
932             <a href="#reserves" id="holds-tab">0 Holds</a>
933         [% END %]
934
935     <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
936 </ul>
937
938 <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
939
940 [% INCLUDE "checkouts-table.inc" %]
941
942 [% IF ( relatives_issues_count ) %]
943     <div id="relatives-issues">
944         <table id="relatives-issues-table">
945             <thead>
946                 <tr>
947                     <th scope="col">Due date (unformatted, hidden)</th>
948                     <th scope="col">Due date</th>
949                     <th scope="col">Title</th>
950                     <th scope="col">Item type</th>
951                     <th scope="col">Location</th>
952                     <th scope="col">Checked out on</th>
953                     <th scope="col">Checked out from</th>
954                     <th scope="col">Call no</th>
955                     <th scope="col">Charge</th>
956                     <th scope="col">Fine</th>
957                     <th scope="col">Price</th>
958                     <th scope="col">Patron</th>
959                 </tr>
960             </thead>
961         </table>
962     </div>
963 [% END %]
964
965 [% INCLUDE borrower_debarments.inc %]
966
967 <div id="reserves">
968 [% IF ( holds_count ) %]
969     <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
970         <input type="hidden" name="from" value="circ" />
971         <table id="holds-table" style="width: 100% !Important;">
972             <thead>
973                 <tr>
974                     <th>Hold date</th>
975                     <th>Title</th>
976                     <th>Call number</th>
977                     <th>Barcode</th>
978                     <th>Pickup at</th>
979                     <th>Expiration</th>
980                     <th>Priority</th>
981                     <th>Delete?</th>
982                     <th>Suspend?</th>
983                 </tr>
984             </thead>
985         </table>
986
987         <fieldset class="action">
988             <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
989         </fieldset>
990     </form>
991
992     [% IF SuspendHoldsIntranet %]
993     <fieldset class="action">
994         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
995             <input type="hidden" name="from" value="circ" />
996             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
997             <input type="submit" value="Suspend all holds" />
998
999             [% IF AutoResumeSuspendedHolds %]
1000             <label for="suspend_until">until</label>
1001             <input type="text" size="10" id="suspend_until" name="suspend_until datepicker" />
1002             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
1003              [% END %]
1004         </form>
1005     </fieldset>
1006
1007     <fieldset class="action">
1008         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
1009             <input type="hidden" name="from" value="circ" />
1010             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
1011             <input type="hidden" name="suspend" value="0" />
1012             <input type="submit" value="Resume all suspended holds" />
1013         </form>
1014     </fieldset>
1015     [% END # IF SuspendHoldsIntranet %]
1016
1017 [% ELSE %]
1018         <p>Patron has nothing on hold.</p>
1019 [% END %]
1020 </div> <!-- reservesloop -->
1021
1022 [% ELSIF borrowernumber %]
1023     <div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
1024 [% END %] <!-- borrowernumber and borrower-->
1025 </div></div>
1026 [% END %]
1027
1028 </div>
1029 </div>
1030 [% UNLESS ( borrowers ) %][% IF borrowernumber and borrower %]<div class="yui-b">
1031 [% INCLUDE 'circ-menu.inc' %]
1032 </div>[% END %][% END %]
1033 </div>
1034 <!-- Modal -->
1035 <div id="barcodeSubmittedModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="barcodeSubmittedModalLabel" aria-hidden="true">
1036     <div class="modal-header">
1037         <h3 id="barcodeSubmittedModalLabel">Barcode submitted</h3>
1038     </div>
1039
1040     <div class="modal-body">
1041         <p>You have already submitted a barcode, please wait for the checkout to process...</p>
1042     </div>
1043 </div>
1044 [% INCLUDE 'intranet-bottom.inc' %]