Bug 12914 - Wrong message 'Patron(..) is blocked for 2014-09-30 day(s).
[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 ( RESERVED ) %]
256     <p>
257     <input type="checkbox" id="cancelreserve" name="cancelreserve" value="cancel" />
258     <label for="cancelreserve">Cancel hold</label>
259     </p>
260 [% END %]
261
262 [% IF ( RESERVE_WAITING ) %]
263 <p>
264     <label for="cancelreserve">Cancel hold</label>
265     <input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
266     <label for="revertreserve">Revert waiting status</label>
267     <input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
268 </p>
269 [% END %]
270
271     <input type="hidden" name="barcode" value="[% barcode |html %]" />
272     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
273     <input type="hidden" name="issueconfirmed" value="1" />
274     [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
275     [% IF ( INVALID_DATE ) %]
276     <p>
277     <input type="text" size="13" id="duedatespec" name="duedatespec" readonly="readonly" value="[% duedatespec %]" />
278     <label for="duedatespec">Due date</label>
279     </p>
280     [% ELSE %]
281     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
282     [% END %]
283     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
284     <input type="hidden" name="branch" value="[% branch %]" />
285     [% IF ( RENEW_ISSUE ) %]
286     <input type="submit" class="approve" value="Yes, renew (Y)" accesskey="y" />
287     [% ELSE %]
288     <input type="submit" class="approve" value="Yes, check out (Y)" accesskey="y" />
289     [% END %]
290 </form>
291 [% END %]
292
293 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
294     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
295     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
296     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
297     [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
298         [% IF ( RENEW_ISSUE ) %]
299         <input type="submit" class="deny" value="No, don't renew (N)" accesskey="n" />
300         [% ELSE %]
301         <input type="submit" class="deny" value="No, don't check out (N)" accesskey="n" />
302         [% END %]
303     [% ELSE %]
304         <input type="submit" class="deny" value="Continue" />
305     [% END %]
306 </form>
307
308 </div></div>
309 [% END %] <!-- NEEDSCONFIRMATION -->
310
311         [% IF ( IMPOSSIBLE ) %]
312
313 [% IF ( soundon ) %]
314 <audio src="[% interface %]/[% theme %]/sound/critical.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
315 [% END %]        
316
317 <div class="yui-g">
318 <div id="circ_impossible" class="dialog alert">
319 <!-- RESULT OF ISSUING REQUEST -->
320         <ul>
321         [% IF ( STATS ) %]
322             <li>Local use recorded</li>
323         [% END %]
324
325         [% IF ( INVALID_DATE ) %]
326             <li>The due date &quot;[% INVALID_DATE %]&quot; is invalid</li>
327         [% END %]
328
329         [% IF ( UNKNOWN_BARCODE ) %]
330             <li>The barcode was not found [% barcode |html %]
331             [% IF ( fast_cataloging ) %]
332                 [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
333             <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>
334                 [% END %]
335             [% END %]
336
337         [% IF ( FALLBACK ) %]
338             [% IF options %]
339                 <br />The following items were found by searching:
340                 [% FOREACH book IN options %]
341                     <br />
342                     <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
343                         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
344                         <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
345                         <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
346                         <input type="hidden" name="branch" value="[% branch %]" />
347                         <input type="hidden" name="barcode" value="[% book.barcode %]" />
348                         <input type="submit" name="x" value="Check out [% book.barcode %]: [% book.title %]" />
349                     </form>
350                 [% END %]
351             [% ELSE %]
352                 <br />No items were found by searching.
353             [% END %]
354         [% END %]
355
356      </li>
357         [% END %]
358
359         [% IF ( NOT_FOR_LOAN ) %]
360             <li>
361             [% IF ( itemtype_notforloan ) %]
362                 Item type not for loan.
363             [% ELSIF ( item_notforloan ) %]
364                 [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
365                 Item not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
366             [% END %]
367             </li>
368         [% END %]
369
370         [% IF ( WTHDRAWN ) %]
371             <li>Item has been withdrawn</li>
372         [% END %]
373
374         [% IF ( RESTRICTED ) %]
375             <li>Item is restricted</li>
376         [% END %]
377
378         [% IF ( GNA ) %]
379             <li>Patron's address is in doubt</li>
380         [% END %]
381
382         [% IF ( CARD_LOST ) %]
383             <li>Patron's card is lost</li>
384         [% END %]
385
386         [% IF ( DEBARRED ) %]
387             <li>Patron is restricted</li>
388         [% END %]
389
390         [% IF ( NO_MORE_RENEWALS ) %]
391             <li>No more renewals possible</li>
392         [% END %]
393
394         [%IF ( AGE_RESTRICTION ) %]
395             <li>Age restriction [% AGE_RESTRICTION %].</li>
396         [% END %]
397
398         [% IF ( EXPIRED ) %]
399             <li>Patron's card is expired</li>
400         [% END %]
401
402         [% IF ( TOO_MANY ) %]
403             <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
404         [% END %]
405
406         [% IF ( ITEMNOTSAMEBRANCH ) %]
407             <li>This item belongs to [% Branches.GetName( itemhomebranch ) %] and cannot be checked out from this location.</li>
408         [% END %]
409
410         [% IF ( USERBLOCKEDWITHENDDATE ) %]
411             <li>Patron has a restriction until [% USERBLOCKEDWITHENDDATE | $KohaDates %].</li>
412         [% END %]
413
414         [% IF ( USERBLOCKEDNOENDDATE ) %]
415             <li>Patron has a restriction (no expiry date).</li>
416         [% END %]
417
418         [% IF ( USERBLOCKEDOVERDUE ) %]
419             <li>Checkouts are BLOCKED because patron has overdue items.</li>
420         [% END %]
421         </ul>
422
423 </div></div>
424 [% ELSE %]
425 [% IF ( soundon ) %]
426 <audio src="[% interface %]/[% theme %]/sound/beep.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
427 [% END %]
428     [% END %] <!-- /impossible -->
429
430 [% IF ( issued ) %]
431 <p>Item checked out</p>
432 [% END %]
433
434 [% IF ( message ) %]
435 [% INCLUDE 'patron-toolbar.inc' %]
436 <h4>
437 No patron matched <span class="ex">[% message %]</span>
438 </h4>
439 [% END %]
440
441
442 [% IF ( selectborrower ) %]
443 [% INCLUDE 'patron-toolbar.inc' %]
444
445 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
446 <fieldset id="circ_circulation_selectborrower" class="brief">
447     <legend>Patron selection</legend>
448
449     <input type="hidden" name="branch" value="[% branch %]" />
450     <input type="hidden" name="printer" value="[% printer %]" />
451     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
452     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
453
454 <ol>    <li>
455     <label for="borrowernumber">Select a patron: </label>
456     <select name="borrowernumber" id="borrowernumber" size="7" class="focus" ondblclick="document.forms['mainform'].submit()">
457         [% FOREACH borrower IN selectborrower.values %]
458         <option value="[% borrower %]">[% selectborrower.labels.$borrower %]</option>
459         [% END %]
460     </select>
461     </li>
462 </ol>
463 <p><input type="submit" value="Select" /></p>
464 </fieldset>
465 </form>
466 [% ELSE %] <!-- selectborrower -->
467
468 <!-- BARCODE ENTRY -->
469
470 [% IF ( borrowernumber ) %]
471 <div class="yui-g">
472 [% UNLESS ( noissues ) %]
473 [% IF ( flagged ) %]
474 <div class="yui-u first">
475 [% ELSE %]
476 <div>
477
478 [% END %]
479
480
481 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
482 <fieldset id="circ_circulation_issue">
483     [% IF ( DisplayClearScreenButton ) %]
484         <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
485     [% END %]
486
487     <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
488
489         <div class="hint">Enter item barcode:</div>
490
491     [% IF NEEDSCONFIRMATION %]
492             <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
493     [% ELSE %]
494             <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
495     [% END %]
496     <button type="submit" class="btn">Check out</button>
497
498     <div class="date-select">
499         [% IF NEEDSCONFIRMATION %]
500             <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
501         [% ELSE %]
502             <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" />
503         [% END %]
504         <label for="auto_renew">Automatic renewal</label>
505     </div>
506
507     [% IF ( SpecifyDueDate ) %]<div class="date-select">
508         <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
509         [% 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" />
510 [% END %]
511           <label for="stickyduedate"> Remember for session:</label>
512 [% IF ( stickyduedate ) %]
513 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
514 [% ELSE %]
515 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
516 [% END %]
517           <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>
518 </div>[% END %]
519           <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
520           <input type="hidden" name="branch" value="[% branch %]" />
521           <input type="hidden" name="printer" value="[% printer %]" />
522           <input type="hidden" name="print" value="maybe" />
523           <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
524                 [% IF ( CHARGES ) %]
525                         <input type="hidden" name="charges" value="yes" />
526                         <input type="hidden" name="oldamount" value="[% amountold %]" />
527                 [% END %]
528 </fieldset>
529 </form></div>[% END %]<!-- /unless noissues -->
530
531 [% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
532
533     [% IF ( flagged ) %]
534                 [% IF ( noissues ) %]
535                 <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
536         <div id="circmessages" class="circmessage warning">
537                 [% ELSE %]
538         <div id="circmessages" class="circmessage attention">
539                 [% END %]
540
541                 <h3>[% IF ( noissues ) %]
542                         Cannot check out!
543                 [% ELSE %]Attention:[% END %]</h3>
544                 <ul>
545
546                         [% IF ( warndeparture ) %]
547                         <li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
548                         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>
549
550                         </li>
551                         [% END %]
552
553                         [% IF ( returnbeforeexpiry ) %]
554                          <li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
555                          expiry date is before the date due, the date due will be set to the expiry date
556                          </li>
557                         [% END %]
558
559                         [% IF ( expired ) %]
560                         <li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
561                         [% 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>
562
563                         </li>
564                         [% END %]
565
566             [% IF ( gna ) %]
567                         <li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
568                         [% END %]
569
570             [% IF ( lost ) %]
571                         <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
572                         [% END %]
573
574             [% IF ( userdebarred ) %]
575                <li class="blocker">
576                    <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
577
578                    [% IF ( userdebarreddate ) %]
579                        until [% userdebarreddate %]
580                    [% END %]
581
582                    [% IF ( debarredcomment ) %]
583                        with the explanation: <br/><i>[% debarredcomment | html_line_break %]</i>
584                    [% END %]
585
586                    <br/>
587                    <a class="btn btn-small" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="icon-ban-circle"></i> View restrictions</a>
588                </li>
589             [% END %]
590
591                 [% 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>
592             [% END %]
593
594                 [% IF ( charges ) %]
595                             <li>
596             <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>.
597                 [% IF ( charges_is_blocker ) %]
598                     Checkouts are <span class="circ-hlt">BLOCKED</span> because fine balance is <span class="circ-hlt">OVER THE LIMIT</span>.
599                 [% END %]
600             <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">Make payment</a></li>
601                         [% END %]
602
603                 [% IF ( credits ) %]
604                         <li>
605                 <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount %][% END %]
606             </li>
607                         [% END %]
608
609
610
611                         </ul>
612         </div>
613
614                         [% IF ( WaitingReserveLoop ) %]
615                         <div id="holdswaiting" class="circmessage">
616                     <h4>Holds waiting:</h4>
617                                 [% FOREACH WaitingReserveLoo IN WaitingReserveLoop %]
618                                     <ul>
619                                         <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 %].
620                                     [% IF ( WaitingReserveLoo.waitingat ) %]
621                                         <br />[% IF ( WaitingReserveLoo.waitinghere ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]Waiting at [% WaitingReserveLoo.waitingat %]</strong>
622                                     [% END %]
623                                         </li>
624                                     </ul>
625                             [% END %]
626                         </div>
627                         <!-- /If WaitingReserveLoop -->[% END %]
628         [% IF ( notes ) %]
629                         <div id="circnotes" class="circmessage">
630                         <h4>Notes:</h4>
631             <p><span class="circ-hlt">[% notesmsg %]</span></p>
632                         </div>
633
634
635     <!-- /If notes -->[% END %]
636
637         <div id="messages" class="circmessage">
638                 <h4>Messages:</h4>
639                 <ul>
640                         [% FOREACH lib_messages_loo IN lib_messages_loop %]
641                                 <li>
642                                         <span class="circ-hlt">
643                                                 [% lib_messages_loo.message_date_formatted %]
644                                                 [% lib_messages_loo.branchcode %]
645                                                 <i>"[% lib_messages_loo.message %]"</i>
646                                         </span>
647                                         [% IF ( lib_messages_loo.can_delete ) %]
648                                                 <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
649                                         [% ELSE %]
650                                                 [% IF ( all_messages_del ) %]
651                                                         <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
652                                                 [% END %]
653                                         [% END %]
654                                 </li>
655                         [% END %]
656                         [% FOREACH bor_messages_loo IN bor_messages_loop %]
657                                 <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>
658                 [% ELSIF ( all_messages_del ) %]
659                     <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
660                 [% END %]</li>
661                         [% END %]
662
663                 </ul>
664         </div>  
665         
666      <!-- /If flagged -->[% END %]
667
668         
669
670 </div>
671 </div>
672
673 <div class="yui-g"><div id="patronlists" class="toptabs">
674
675 <ul>
676     <li>
677         [% IF ( issuecount ) %]
678             <a href="#checkouts">[% issuecount %] Checkout(s)</a>
679         [% ELSE %]
680             <a href="#checkouts">0 Checkouts</a>
681         [% END %]
682     </li>
683
684     [% IF relatives_issues_count %]
685         <li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
686     [% END %]
687
688     <li>
689         [% IF ( holds_count ) %]
690             <a href="#reserves" id="holds-tab">[% holds_count %] Hold(s)</a>
691         [% ELSE %]
692             <a href="#reserves" id="holds-tab">0 Holds</a>
693         [% END %]
694     </li>
695
696     <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
697 </ul>
698
699 <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
700 <div id="checkouts">
701     [% IF ( issuecount ) %]
702         <div id="issues-table-loading-message">
703             <p>
704                 <a id="issues-table-load-now-button" href="#" class="btn"><i class="icon-book"></i> Show checkouts</a>
705             </p>
706         </div>
707
708         <table id="issues-table">
709             <thead>
710                 <tr>
711                     <th scope="col">&nbsp;</th>
712                     <th scope="col">&nbsp;</th>
713                     <th scope="col">Due date</th>
714                     <th scope="col">Due date</th>
715                     <th scope="col">Title</th>
716                     <th scope="col">Item type</th>
717                     <th scope="col">Checked out on</th>
718                     <th scope="col">Checked out from</th>
719                     <th scope="col">Call no</th>
720                     <th scope="col">Charge</th>
721                     <th scope="col">Price</th>
722                     <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th>
723                     <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th>
724                     <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllExports">select all</a> | <a href="#" id="UncheckAllExports">none</a></p></th>
725                 </tr>
726             </thead>
727             [% INCLUDE 'checkouts-table-footer.inc' %]
728         </table>
729
730         <label for="issues-table-load-immediately">Always show checkouts immediately</label>
731         <input id="issues-table-load-immediately" type="checkbox" />
732
733         <fieldset id="issues-table-actions" class="action">
734             [% IF ( CAN_user_circulate_override_renewals ) %]
735                 [% IF ( AllowRenewalLimitOverride ) %]
736                     <label for="override_limit">Override renewal limit:</label>
737                     <input type="checkbox" name="override_limit" id="override_limit" value="1" />
738                 [% END %]
739             [% END %]
740             <button class="btn" id="RenewCheckinChecked"><i class="icon-check"></i> Renew or return checked items</button>
741             <button class="btn" id="RenewAll"><i class="icon-book"></i> Renew all</button>
742         </fieldset>
743     [% ELSE %]
744         <p>Patron has nothing checked out.</p>
745     [% END %]
746 </div>
747
748 [% IF ( relatives_issues_count ) %]
749     <div id="relatives-issues">
750         <table id="relatives-issues-table">
751             <thead>
752                 <tr>
753                     <th scope="col">Due date (unformatted, hidden)</th>
754                     <th scope="col">Due date</th>
755                     <th scope="col">Title</th>
756                     <th scope="col">Item type</th>
757                     <th scope="col">Checked out on</th>
758                     <th scope="col">Checked out from</th>
759                     <th scope="col">Call no</th>
760                     <th scope="col">Charge</th>
761                     <th scope="col">Price</th>
762                     <th scope="col">Patron</th>
763                 </tr>
764             </thead>
765         </table>
766     </div>
767 [% END %]
768
769 [% INCLUDE borrower_debarments.inc %]
770
771 <div id="reserves">
772 [% IF ( holds_count ) %]
773     <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
774         <input type="hidden" name="from" value="circ" />
775         <table id="holds-table" style="width: 100% !Important;">
776             <thead>
777                 <tr>
778                     <th>Hold date</th>
779                     <th>Title</th>
780                     <th>Call number</th>
781                     <th>Barcode</th>
782                     <th>Expiration</th>
783                     <th>Priority</th>
784                     <th>Delete?</th>
785                 </tr>
786             </thead>
787         </table>
788
789         <fieldset class="action">
790             <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
791         </fieldset>
792     </form>
793
794     [% IF SuspendHoldsIntranet %]
795     <fieldset class="action">
796         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
797             <input type="hidden" name="from" value="circ" />
798             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
799             <input type="submit" value="Suspend all holds" />
800
801             [% IF AutoResumeSuspendedHolds %]
802             <label for="suspend_until">until</label>
803             <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker" />
804             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
805              [% END %]
806         </form>
807     </fieldset>
808
809     <fieldset class="action">
810         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
811             <input type="hidden" name="from" value="circ" />
812             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
813             <input type="hidden" name="suspend" value="0" />
814             <input type="submit" value="Resume all suspended holds" />
815         </form>
816     </fieldset>
817     [% END # IF SuspendHoldsIntranet %]
818
819 [% ELSE %]
820         <p>Patron has nothing on hold.</p>
821 [% END %]
822 </div> <!-- reservesloop -->
823
824 [% END %] <!-- borrowernumber -->
825 </div></div>
826 [% END %]
827
828
829
830 </div>
831 </div>
832 [% UNLESS ( selectborrower ) %][% IF ( borrowernumber ) %]<div class="yui-b">
833 [% INCLUDE 'circ-menu.inc' %]
834 </div>[% END %][% END %]
835 </div>
836 [% INCLUDE 'intranet-bottom.inc' %]