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