Bug 643: Allow override of 'debarred' status
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / circulation.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% USE KohaDates %]
4 [% IF ( export_remove_fields OR export_with_csv_profile ) %]
5    [% SET exports_enabled = 1 %]
6 [% END %]
7 [% USE AuthorisedValues %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 [% SET destination = "circ" %]
10 <title>Koha &rsaquo; Circulation
11 [% IF borrowernumber %]
12   &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
13 [% END %]
14 </title>
15 [% INCLUDE 'doc-head-close.inc' %]
16 [% INCLUDE 'calendar.inc' %]
17
18 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
19 [% INCLUDE 'strings.inc' %]
20 [% INCLUDE 'datatables.inc' %]
21 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
22 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
23 [% INCLUDE 'timepicker.inc' %]
24 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
25 <script type="text/javascript" src="[% themelang %]/js/pages/circulation.js"></script>
26 <script type="text/javascript" src="[% themelang %]/js/checkouts.js"></script>
27 <script type="text/javascript" src="[% themelang %]/js/holds.js"></script>
28 <script type="text/javascript">
29 //<![CDATA[
30 /* Set some variable needed in circulation.js */
31 var interface = "[% interface %]";
32 var theme = "[% theme %]";
33 var borrowernumber = "[% borrowernumber %]";
34 var branchcode = "[% branch %]";
35 var exports_enabled = "[% exports_enabled %]";
36 var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && AllowRenewalLimitOverride)? 1: 0 %];
37 var script = "circulation";
38 var relatives_borrowernumbers = new Array();
39 [% FOREACH b IN relatives_borrowernumbers %]
40     relatives_borrowernumbers.push("[% b %]");
41 [% END %]
42
43 var MSG_ADD_MESSAGE = _("Add a new message");
44 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
45 [% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
46 [% UNLESS ( borrowernumber ) %][% UNLESS ( selectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
47
48 $(document).ready(function() {
49     [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
50         // listen submit to trigger qslip on empty checkout
51         $('#mainform').bind('submit',function() {
52             if ($('#barcode').val() == '') {
53                 return printx_window( '[% CircAutoPrintQuickSlip %]' );
54             }
55         });
56     [% END %]
57 });
58 //]]>
59 </script>
60 </head>
61 <body id="circ_circulation" class="circ">
62
63 [% INCLUDE 'header.inc' %]
64 [% INCLUDE 'circ-search.inc' %]
65
66 <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;
67 [% IF ( borrowernumber ) %]
68     <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> &rsaquo; [% INCLUDE 'patron-title.inc' %]
69 [% ELSE %]
70     <strong>Checkouts</strong>
71 [% END %]
72 </div>
73 [% IF ( selectborrower ) %]
74 <div id="doc" class="yui-t7">
75
76    <div id="bd">
77         <div id="yui-main">
78         <div class="yui-g">
79 [% ELSE %]
80 <div id="doc3" class="yui-t2">
81
82    <div id="bd">
83         <div id="yui-main">
84         <div class="yui-b">
85 [% END %]
86
87 [% IF ( borrowernumber ) %]
88 [% INCLUDE 'members-toolbar.inc' %]
89 [% END %]
90
91 <!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
92 <div style="display: none;" id="add_message_form">
93 <form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
94 <fieldset id="borrower_messages" class="brief">
95 <legend>Leave a message</legend>
96         <ol>
97     <li>
98             <label for="message_type">Add a message for:</label>
99           <select name="message_type" id="message_type">
100             <option value="L">Other librarians</option>
101             <option value="B">[% firstname %]</option>
102         </select>
103     </li>
104     [% IF ( canned_bor_notes_loop ) %]
105         <li>
106                 <label for="type">Predefined notes: </label>
107                 <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
108                     <option value="">Select note</option>
109                     [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %]
110                     <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option>
111                     [% END %]
112                 </select>
113         </li>
114     [% END %]
115     <li>
116         <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
117     </li>
118         </ol>
119     <fieldset class="action">
120         <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a>
121     </fieldset>
122
123         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
124         <input type="hidden" name="branchcode" value="[% branch %]" />
125 </fieldset>
126 </form>
127 </div>
128
129 [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry %]</div>[% END %]
130
131 [% IF additional_materials %]
132     <div id="materials" class="dialog message">Note about the accompanying materials: <br />
133     [% additional_materials %]
134     </div>
135 [% END %]
136
137 [% IF ( alert.ITEM_LOST ) %]
138     <div class="dialog message">This item has been lost with a status of "[% alert.ITEM_LOST %]".</div>
139 [% END %]
140
141 [% IF ( alert.OTHER_CHARGES ) %]
142     <div class="dialog message">The patron has unpaid charges for reserves, rentals etc of [% alert.OTHER_CHARGES %]</div>
143 [% END %]
144
145 [% IF ( NEEDSCONFIRMATION ) %]
146 <div class="yui-g">
147
148 <div id="circ_needsconfirmation" class="dialog alert">
149 [% IF CAN_user_circulate_force_checkout %]
150   <h3>Please confirm checkout</h3>
151 [% ELSE %]
152   <h3>Cannot check out</h3>
153 [% END %]
154
155 <ul>
156 [%IF ( AGE_RESTRICTION ) %]
157     <li>Age restriction [% AGE_RESTRICTION %].
158       [% IF CAN_user_circulate_force_checkout %]
159         Check out anyway?
160       [% END %]
161     </li>
162 [% END %]
163
164 [% IF ( DEBT ) %]
165     <li>The patron has a debt of [% DEBT %]</li>
166 [% END %]
167
168 [% IF ( RENEW_ISSUE ) %]
169     <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is currently checked out to this patron.  Renew?</li>
170 [% END %]
171
172 [% IF ( RESERVE_WAITING ) %]
173     <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 %]</li>
174 [% END %]
175
176 [% IF ( RESERVED ) %]
177     <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 %]</li>
178 [% END %]
179
180 [% IF ( ISSUED_TO_ANOTHER ) %]
181     <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 %]).
182       [% IF CAN_user_circulate_force_checkout %]
183         Check in and check out?
184       [% END %]
185     </li>
186 [% END %]
187
188 [% IF ( TOO_MANY ) %]
189     <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
190 [% END %]
191
192 [% IF ( BORRNOTSAMEBRANCH ) %]
193     <li>This patrons is from a different library ([% BORRNOTSAMEBRANCH %])</li>
194 [% END %]
195
196 [% IF ( PATRON_CANT ) %]
197     <li>This patron can't check out this item per library circulation policy</li>
198 [% END %]
199
200 [% IF ( NOT_FOR_LOAN_FORCING ) %]
201     <li>
202     [% IF ( itemtype_notforloan ) %]
203         Item type is normally not for loan.
204     [% ELSIF ( item_notforloan ) %]
205         [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
206         Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
207     [% END %]
208       [% IF CAN_user_circulate_force_checkout %]
209         Check out anyway?
210       [% END %]
211     </li>
212 [% END %]
213
214 [% IF ( USERBLOCKEDOVERDUE ) %]
215     <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).
216       [% IF CAN_user_circulate_force_checkout %]
217        Check out anyway?
218       [% END %]
219     </li>
220 [% END %]
221
222 [% IF ( ITEM_LOST ) %]
223     <li>This item has been lost with a status of "[% ITEM_LOST %]".
224       [% IF CAN_user_circulate_force_checkout %]
225         Check out anyway?
226       [% END %]
227     </li>
228 [% END %]
229
230 [% IF  HIGHHOLDS %]
231     <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
232 [% END %]
233
234 [% IF BIBLIO_ALREADY_ISSUED %]
235   <li>
236     Patron has already checked out another item from this record.
237     [% IF CAN_user_circulate_force_checkout %]
238       Check out anyway?
239     [% END %]
240   </li>
241 [% END %]
242 </ul>
243
244 [% IF HIGHHOLDS %]
245         <script language="JavaScript" type="text/javascript">
246         $(document).ready(function() {
247                 $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]');
248         });
249         </script>
250 [% END %]
251
252 [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
253 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
254
255 [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
256
257 [% IF ( RESERVED ) %]
258     <p>
259     <input type="checkbox" id="cancelreserve" name="cancelreserve" value="cancel" />
260     <label for="cancelreserve">Cancel hold</label>
261     </p>
262 [% END %]
263
264 [% IF ( RESERVE_WAITING ) %]
265 <p>
266     <label for="cancelreserve">Cancel hold</label>
267     <input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
268     <label for="revertreserve">Revert waiting status</label>
269     <input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
270 </p>
271 [% END %]
272
273     <input type="hidden" name="barcode" value="[% barcode |html %]" />
274     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
275     <input type="hidden" name="issueconfirmed" value="1" />
276     [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
277     [% IF ( INVALID_DATE ) %]
278     <p>
279     <input type="text" size="13" id="duedatespec" name="duedatespec" readonly="readonly" value="[% duedatespec %]" />
280     <label for="duedatespec">Due date</label>
281     </p>
282     [% ELSE %]
283     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
284     [% END %]
285     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
286     <input type="hidden" name="branch" value="[% branch %]" />
287     [% IF ( RENEW_ISSUE ) %]
288     <input type="submit" class="approve" value="Yes, renew (Y)" accesskey="y" />
289     [% ELSE %]
290     <input type="submit" class="approve" value="Yes, check out (Y)" accesskey="y" />
291     [% END %]
292 </form>
293 [% END %]
294
295 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
296     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
297     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
298     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
299     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
300     [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
301         [% IF ( RENEW_ISSUE ) %]
302         <input type="submit" class="deny" value="No, don't renew (N)" accesskey="n" />
303         [% ELSE %]
304         <input type="submit" class="deny" value="No, don't check out (N)" accesskey="n" />
305         [% END %]
306     [% ELSE %]
307         <input type="submit" class="deny" value="Continue" />
308     [% END %]
309 </form>
310
311 </div></div>
312 [% END %] <!-- NEEDSCONFIRMATION -->
313
314         [% IF ( IMPOSSIBLE ) %]
315
316 [% IF ( soundon ) %]
317 <audio src="[% interface %]/[% theme %]/sound/critical.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
318 [% END %]        
319
320 <div class="yui-g">
321 <div id="circ_impossible" class="dialog alert">
322 <!-- RESULT OF ISSUING REQUEST -->
323         <ul>
324         [% IF ( STATS ) %]
325             <li>Local use recorded</li>
326         [% END %]
327
328         [% IF ( INVALID_DATE ) %]
329             <li>The due date &quot;[% INVALID_DATE %]&quot; is invalid</li>
330         [% END %]
331
332         [% IF ( UNKNOWN_BARCODE ) %]
333             <li>The barcode was not found [% barcode |html %]
334             [% IF ( fast_cataloging ) %]
335                 [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
336             <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 %]">Fast cataloging</a>
337                 [% END %]
338             [% END %]
339
340         [% IF ( FALLBACK ) %]
341             [% IF options %]
342                 <br />The following items were found by searching:
343                 [% FOREACH book IN options %]
344                     <br />
345                     <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
346                     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
347                         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
348                         <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
349                         <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
350                         <input type="hidden" name="branch" value="[% branch %]" />
351                         <input type="hidden" name="barcode" value="[% book.barcode %]" />
352                         <input type="submit" name="x" value="Check out [% book.barcode %]: [% book.title %]" />
353                     </form>
354                 [% END %]
355             [% ELSE %]
356                 <br />No items were found by searching.
357             [% END %]
358         [% END %]
359
360      </li>
361         [% END %]
362
363         [% IF ( NOT_FOR_LOAN ) %]
364             <li>
365             [% IF ( itemtype_notforloan ) %]
366                 Item type not for loan.
367             [% ELSIF ( item_notforloan ) %]
368                 [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
369                 Item not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
370             [% END %]
371             </li>
372         [% END %]
373
374         [% IF ( WTHDRAWN ) %]
375             <li>Item has been withdrawn</li>
376         [% END %]
377
378         [% IF ( RESTRICTED ) %]
379             <li>Item is restricted</li>
380         [% END %]
381
382         [% IF ( GNA ) %]
383             <li>Patron's address is in doubt</li>
384         [% END %]
385
386         [% IF ( CARD_LOST ) %]
387             <li>Patron's card is lost</li>
388         [% END %]
389
390         [% IF ( DEBARRED ) %]
391             <li>Patron is restricted</li>
392         [% END %]
393
394         [% IF ( NO_MORE_RENEWALS ) %]
395             <li>No more renewals possible</li>
396         [% END %]
397
398         [%IF ( AGE_RESTRICTION ) %]
399             <li>Age restriction [% AGE_RESTRICTION %].</li>
400         [% END %]
401
402         [% IF ( EXPIRED ) %]
403             <li>Patron's card is expired</li>
404         [% END %]
405
406         [% IF ( TOO_MANY ) %]
407             <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
408         [% END %]
409
410         [% IF ( ITEMNOTSAMEBRANCH ) %]
411             <li>This item belongs to [% Branches.GetName( itemhomebranch ) %] and cannot be checked out from this location.</li>
412         [% END %]
413
414         [% IF ( USERBLOCKEDWITHENDDATE ) %]
415             <li>Patron has a restriction until [% USERBLOCKEDWITHENDDATE | $KohaDates %].</li>
416         [% END %]
417
418         [% IF ( USERBLOCKEDNOENDDATE ) %]
419             <li>Patron has a restriction (no expiry date).</li>
420         [% END %]
421
422         [% IF ( USERBLOCKEDOVERDUE ) %]
423             <li>Checkouts are BLOCKED because patron has overdue items.</li>
424         [% END %]
425         </ul>
426
427         [% IF (forceallow) %]
428             <li>Debarment overridden temporarily</li>
429         [% END %]
430
431 </div></div>
432 [% ELSE %]
433 [% IF ( soundon ) %]
434 <audio src="[% interface %]/[% theme %]/sound/beep.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
435 [% END %]
436
437   [% IF (forceallow) %]
438       <div id="overridden_debarment" class="dialog alert">Debarment overridden temporarily</div>
439   [% END %]
440
441     [% END %] <!-- /impossible -->
442
443 [% IF ( issued ) %]
444 <p>Item checked out</p>
445 [% END %]
446
447 [% IF ( message ) %]
448 [% INCLUDE 'patron-toolbar.inc' %]
449 <h4>
450 No patron matched <span class="ex">[% message %]</span>
451 </h4>
452 [% END %]
453
454
455 [% IF ( selectborrower ) %]
456 [% INCLUDE 'patron-toolbar.inc' %]
457
458 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
459 <fieldset id="circ_circulation_selectborrower" class="brief">
460     <legend>Patron selection</legend>
461
462 [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
463     <input type="hidden" name="branch" value="[% branch %]" />
464     <input type="hidden" name="printer" value="[% printer %]" />
465     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
466     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
467
468 <ol>    <li>
469     <label for="borrowernumber">Select a patron: </label>
470     <select name="borrowernumber" id="borrowernumber" size="7" class="focus" ondblclick="document.forms['mainform'].submit()">
471         [% FOREACH borrower IN selectborrower.values %]
472         <option value="[% borrower %]">[% selectborrower.labels.$borrower %]</option>
473         [% END %]
474     </select>
475     </li>
476 </ol>
477 <p><input type="submit" value="Select" /></p>
478 </fieldset>
479 </form>
480 [% ELSE %] <!-- selectborrower -->
481
482 <!-- BARCODE ENTRY -->
483
484 [% IF ( borrowernumber ) %]
485 <div class="yui-g">
486 [% UNLESS ( noissues ) %]
487 [% IF ( flagged ) %]
488 <div class="yui-u first">
489 [% ELSE %]
490 <div>
491
492 [% END %]
493
494
495 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
496 <fieldset id="circ_circulation_issue">
497     [% IF ( DisplayClearScreenButton ) %]
498         <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
499     [% END %]
500
501     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
502
503     <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
504
505         <div class="hint">Enter item barcode:</div>
506
507     [% IF NEEDSCONFIRMATION %]
508             <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
509     [% ELSE %]
510             <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
511     [% END %]
512     <button type="submit" class="btn">Check out</button>
513
514     <div class="date-select">
515         [% IF NEEDSCONFIRMATION %]
516             <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
517         [% ELSE %]
518             <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" />
519         [% END %]
520         <label for="auto_renew">Automatic renewal</label>
521     </div>
522
523     [% IF ( SpecifyDueDate ) %]<div class="date-select">
524         <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
525         [% IF ( duedatespec ) %]<input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" readonly="readonly" />[% ELSE %]<input type="text" size="13" id="duedatespec" name="duedatespec" value="" readonly="readonly" />
526 [% END %]
527           <label for="stickyduedate"> Remember for session:</label>
528 [% IF ( stickyduedate ) %]
529 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
530 [% ELSE %]
531 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
532 [% END %]
533           <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>
534 </div>[% END %]
535           <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
536           <input type="hidden" name="branch" value="[% branch %]" />
537           <input type="hidden" name="printer" value="[% printer %]" />
538           <input type="hidden" name="print" value="maybe" />
539           <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
540                 [% IF ( CHARGES ) %]
541                         <input type="hidden" name="charges" value="yes" />
542                         <input type="hidden" name="oldamount" value="[% amountold %]" />
543                 [% END %]
544 </fieldset>
545 </form></div>[% END %]<!-- /unless noissues -->
546
547 [% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
548
549     [% IF ( flagged ) %]
550                 [% IF ( noissues ) %]
551                 <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
552         <div id="circmessages" class="circmessage warning">
553                 [% ELSE %]
554         <div id="circmessages" class="circmessage attention">
555                 [% END %]
556
557                 <h3>[% IF ( noissues ) %]
558                         Cannot check out!
559                 [% ELSE %]Attention:[% END %]</h3>
560
561
562                 <ul>
563
564                         [% IF ( warndeparture ) %]
565                         <li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
566                         Patron's card expires on [% expiry %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&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>
567
568                         </li>
569                         [% END %]
570
571                         [% IF ( returnbeforeexpiry ) %]
572                          <li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
573                          expiry date is before the date due, the date due will be set to the expiry date
574                          </li>
575                         [% END %]
576
577                         [% IF ( expired ) %]
578                         <li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
579                         [% IF ( expiry ) %]Patron's card expired on [% expiry %][% END %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&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>
580
581                         </li>
582                         [% END %]
583
584             [% IF ( gna ) %]
585                         <li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
586                         [% END %]
587
588             [% IF ( lost ) %]
589                         <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
590                         [% END %]
591
592             [% IF ( userdebarred ) %]
593                <li class="blocker">
594                    <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
595
596                    [% IF ( userdebarreddate ) %]
597                        until [% userdebarreddate %]
598                    [% END %]
599
600                    [% IF ( debarredcomment ) %]
601                        with the explanation: <br/><i>[% debarredcomment | html_line_break %]</i>
602                    [% END %]
603
604                    <br/>
605                    <a class="btn btn-small" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="icon-ban-circle"></i> View restrictions</a>
606                </li>
607             [% END %]
608
609                 [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues:</span> Patron has <span class="circ-hlt">ITEMS OVERDUE</span>. See highlighted items <a href="#checkouts">below</a>[% END %]</li>
610             [% END %]
611
612                 [% IF ( charges ) %]
613                             <li>
614             <span class="circ-hlt">Fees &amp; Charges:</span> Patron has  <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrowernumber %]">Outstanding fees &amp; charges[% IF ( chargesamount ) %] of [% chargesamount %][% END %]</a>.
615                 [% IF ( charges_is_blocker ) %]
616                     Checkouts are <span class="circ-hlt">BLOCKED</span> because fine balance is <span class="circ-hlt">OVER THE LIMIT</span>.
617                 [% END %]
618             <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">Make payment</a></li>
619                         [% END %]
620
621                 [% IF ( credits ) %]
622                         <li>
623                 <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount %][% END %]
624             </li>
625                         [% END %]
626
627
628
629                         </ul>
630
631 [% IF (noissues && borrowernumber) %]
632 <div class="override_debarment">
633 <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% borrowernumber %]" class="btn btn-small">Override debarment temporarily</a>
634 </div>
635 [% END %]
636
637         </div>
638
639                         [% IF ( WaitingReserveLoop ) %]
640                         <div id="holdswaiting" class="circmessage">
641                     <h4>Holds waiting:</h4>
642                                 [% FOREACH WaitingReserveLoo IN WaitingReserveLoop %]
643                                     <ul>
644                                         <li> <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% WaitingReserveLoo.biblionumber %]">[% WaitingReserveLoo.title |html %]</a> ([% WaitingReserveLoo.itemtype %]), [% IF ( WaitingReserveLoo.author ) %]by [% WaitingReserveLoo.author %][% END %] [% IF ( WaitingReserveLoo.itemcallnumber ) %][[% WaitingReserveLoo.itemcallnumber %]] [% END %]Hold placed on [% WaitingReserveLoo.reservedate %].
645                                     [% IF ( WaitingReserveLoo.waitingat ) %]
646                                         <br />[% IF ( WaitingReserveLoo.waitinghere ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]Waiting at [% WaitingReserveLoo.waitingat %]</strong>
647                                     [% END %]
648                                         </li>
649                                     </ul>
650                             [% END %]
651                         </div>
652                         <!-- /If WaitingReserveLoop -->[% END %]
653         [% IF ( notes ) %]
654                         <div id="circnotes" class="circmessage">
655                         <h4>Notes:</h4>
656             <p><span class="circ-hlt">[% notesmsg %]</span></p>
657                         </div>
658
659
660     <!-- /If notes -->[% END %]
661
662         <div id="messages" class="circmessage">
663                 <h4>Messages:</h4>
664                 <ul>
665                         [% FOREACH lib_messages_loo IN lib_messages_loop %]
666                                 <li>
667                                         <span class="circ-hlt">
668                                                 [% lib_messages_loo.message_date_formatted %]
669                                                 [% lib_messages_loo.branchcode %]
670                                                 <i>"[% lib_messages_loo.message %]"</i>
671                                         </span>
672                                         [% IF ( lib_messages_loo.can_delete ) %]
673                                                 <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
674                                         [% ELSE %]
675                                                 [% IF ( all_messages_del ) %]
676                                                         <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
677                                                 [% END %]
678                                         [% END %]
679                                 </li>
680                         [% END %]
681                         [% FOREACH bor_messages_loo IN bor_messages_loop %]
682                                 <li><span class="">[% bor_messages_loo.message_date_formatted %] [% bor_messages_loo.branchcode %] <i>"[% bor_messages_loo.message %]"</i></span> [% IF ( bor_messages_loo.can_delete ) %]<a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
683                 [% ELSIF ( all_messages_del ) %]
684                     <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
685                 [% END %]</li>
686                         [% END %]
687
688                 </ul>
689         </div>  
690         
691      <!-- /If flagged -->[% END %]
692
693         
694
695 </div>
696 </div>
697
698 <div class="yui-g"><div id="patronlists" class="toptabs">
699
700 <ul>
701     <li>
702         [% IF ( issuecount ) %]
703             <a href="#checkouts">[% issuecount %] Checkout(s)</a>
704         [% ELSE %]
705             <a href="#checkouts">0 Checkouts</a>
706         [% END %]
707     </li>
708
709     [% IF relatives_issues_count %]
710         <li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
711     [% END %]
712
713     <li>
714         [% IF ( holds_count ) %]
715             <a href="#reserves" id="holds-tab">[% holds_count %] Hold(s)</a>
716         [% ELSE %]
717             <a href="#reserves" id="holds-tab">0 Holds</a>
718         [% END %]
719     </li>
720
721     <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
722 </ul>
723
724 <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
725 <div id="checkouts">
726     [% IF ( issuecount ) %]
727         <div id="issues-table-loading-message">
728             <p>
729                 <a id="issues-table-load-now-button" href="#" class="btn"><i class="icon-book"></i> Show checkouts</a>
730             </p>
731         </div>
732
733         <table id="issues-table">
734             <thead>
735                 <tr>
736                     <th scope="col">&nbsp;</th>
737                     <th scope="col">&nbsp;</th>
738                     <th scope="col">Due date</th>
739                     <th scope="col">Due date</th>
740                     <th scope="col">Title</th>
741                     <th scope="col">Item type</th>
742                     <th scope="col">Checked out on</th>
743                     <th scope="col">Checked out from</th>
744                     <th scope="col">Call no</th>
745                     <th scope="col">Charge</th>
746                     <th scope="col">Price</th>
747                     <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th>
748                     <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th>
749                     <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllExports">select all</a> | <a href="#" id="UncheckAllExports">none</a></p></th>
750                 </tr>
751             </thead>
752             [% INCLUDE 'checkouts-table-footer.inc' %]
753         </table>
754
755         <label for="issues-table-load-immediately">Always show checkouts immediately</label>
756         <input id="issues-table-load-immediately" type="checkbox" />
757
758         <fieldset id="issues-table-actions" class="action">
759             [% IF ( CAN_user_circulate_override_renewals ) %]
760                 [% IF ( AllowRenewalLimitOverride ) %]
761                     <label for="override_limit">Override renewal limit:</label>
762                     <input type="checkbox" name="override_limit" id="override_limit" value="1" />
763                 [% END %]
764             [% END %]
765             <button class="btn" id="RenewCheckinChecked"><i class="icon-check"></i> Renew or return checked items</button>
766             <button class="btn" id="RenewAll"><i class="icon-book"></i> Renew all</button>
767         </fieldset>
768     [% ELSE %]
769         <p>Patron has nothing checked out.</p>
770     [% END %]
771 </div>
772
773 [% IF ( relatives_issues_count ) %]
774     <div id="relatives-issues">
775         <table id="relatives-issues-table">
776             <thead>
777                 <tr>
778                     <th scope="col">Due date (unformatted, hidden)</th>
779                     <th scope="col">Due date</th>
780                     <th scope="col">Title</th>
781                     <th scope="col">Item type</th>
782                     <th scope="col">Checked out on</th>
783                     <th scope="col">Checked out from</th>
784                     <th scope="col">Call no</th>
785                     <th scope="col">Charge</th>
786                     <th scope="col">Price</th>
787                     <th scope="col">Patron</th>
788                 </tr>
789             </thead>
790         </table>
791     </div>
792 [% END %]
793
794 [% INCLUDE borrower_debarments.inc %]
795
796 <div id="reserves">
797 [% IF ( holds_count ) %]
798     <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
799         <input type="hidden" name="from" value="circ" />
800         <table id="holds-table" style="width: 100% !Important;">
801             <thead>
802                 <tr>
803                     <th>Hold date</th>
804                     <th>Title</th>
805                     <th>Call number</th>
806                     <th>Barcode</th>
807                     <th>Expiration</th>
808                     <th>Priority</th>
809                     <th>Delete?</th>
810                 </tr>
811             </thead>
812         </table>
813
814         <fieldset class="action">
815             <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
816         </fieldset>
817     </form>
818
819     [% IF SuspendHoldsIntranet %]
820     <fieldset class="action">
821         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
822             <input type="hidden" name="from" value="circ" />
823             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
824             <input type="submit" value="Suspend all holds" />
825
826             [% IF AutoResumeSuspendedHolds %]
827             <label for="suspend_until">until</label>
828             <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker" />
829             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
830              [% END %]
831         </form>
832     </fieldset>
833
834     <fieldset class="action">
835         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
836             <input type="hidden" name="from" value="circ" />
837             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
838             <input type="hidden" name="suspend" value="0" />
839             <input type="submit" value="Resume all suspended holds" />
840         </form>
841     </fieldset>
842     [% END # IF SuspendHoldsIntranet %]
843
844 [% ELSE %]
845         <p>Patron has nothing on hold.</p>
846 [% END %]
847 </div> <!-- reservesloop -->
848
849 [% END %] <!-- borrowernumber -->
850 </div></div>
851 [% END %]
852
853
854
855 </div>
856 </div>
857 [% UNLESS ( selectborrower ) %][% IF ( borrowernumber ) %]<div class="yui-b">
858 [% INCLUDE 'circ-menu.inc' %]
859 </div>[% END %][% END %]
860 </div>
861 [% INCLUDE 'intranet-bottom.inc' %]