Bug 11577: Code and intranet template changes
[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     <div class="date-select">
493         [% IF NEEDSCONFIRMATION %]
494             <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
495         [% ELSE %]
496             <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" />
497         [% END %]
498         <label for="auto_renew">Automatic renewal</label>
499     </div>
500
501     [% IF ( SpecifyDueDate ) %]<div class="date-select">
502         <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
503         [% 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" />
504 [% END %]
505           <label for="stickyduedate"> Remember for session:</label>
506 [% IF ( stickyduedate ) %]
507 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
508 [% ELSE %]
509 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
510 [% END %]
511           <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>
512 </div>[% END %]
513           <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
514           <input type="hidden" name="branch" value="[% branch %]" />
515           <input type="hidden" name="printer" value="[% printer %]" />
516           <input type="hidden" name="print" value="maybe" />
517           <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
518                 [% IF ( CHARGES ) %]
519                         <input type="hidden" name="charges" value="yes" />
520                         <input type="hidden" name="oldamount" value="[% amountold %]" />
521                 [% END %]
522 </fieldset>
523 </form></div>[% END %]<!-- /unless noissues -->
524
525 [% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
526
527     [% IF ( flagged ) %]
528                 [% IF ( noissues ) %]
529                 <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
530         <div id="circmessages" class="circmessage warning">
531                 [% ELSE %]
532         <div id="circmessages" class="circmessage attention">
533                 [% END %]
534
535                 <h3>[% IF ( noissues ) %]
536                         Cannot check out!
537                 [% ELSE %]Attention:[% END %]</h3>
538                 <ul>
539
540                         [% IF ( warndeparture ) %]
541                         <li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
542                         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>
543
544                         </li>
545                         [% END %]
546
547                         [% IF ( returnbeforeexpiry ) %]
548                          <li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
549                          expiry date is before the date due, the date due will be set to the expiry date
550                          </li>
551                         [% END %]
552
553                         [% IF ( expired ) %]
554                         <li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
555                         [% 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>
556
557                         </li>
558                         [% END %]
559
560             [% IF ( gna ) %]
561                         <li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
562                         [% END %]
563
564             [% IF ( lost ) %]
565                         <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
566                         [% END %]
567
568             [% IF ( userdebarred ) %]
569                <li class="blocker">
570                    <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
571
572                    [% IF ( userdebarreddate ) %]
573                        until [% userdebarreddate %]
574                    [% END %]
575
576                    [% IF ( debarredcomment ) %]
577                        with the explanation: <br/><i>[% debarredcomment | html_line_break %]</i>
578                    [% END %]
579
580                    <br/>
581                    <a class="btn btn-small" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="icon-ban-circle"></i> View restrictions</a>
582                </li>
583             [% END %]
584
585                 [% 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>
586             [% END %]
587
588                 [% IF ( charges ) %]
589                             <li>
590             <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>.
591                 [% IF ( charges_is_blocker ) %]
592                     Checkouts are <span class="circ-hlt">BLOCKED</span> because fine balance is <span class="circ-hlt">OVER THE LIMIT</span>.
593                 [% END %]
594             <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">Make payment</a></li>
595                         [% END %]
596
597                 [% IF ( credits ) %]
598                         <li>
599                 <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount %][% END %]
600             </li>
601                         [% END %]
602
603
604
605                         </ul>
606         </div>
607
608                         [% IF ( WaitingReserveLoop ) %]
609                         <div id="holdswaiting" class="circmessage">
610                     <h4>Holds waiting:</h4>
611                                 [% FOREACH WaitingReserveLoo IN WaitingReserveLoop %]
612                                     <ul>
613                                         <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 %].
614                                     [% IF ( WaitingReserveLoo.waitingat ) %]
615                                         <br />[% IF ( WaitingReserveLoo.waitinghere ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]Waiting at [% WaitingReserveLoo.waitingat %]</strong>
616                                     [% END %]
617                                         </li>
618                                     </ul>
619                             [% END %]
620                         </div>
621                         <!-- /If WaitingReserveLoop -->[% END %]
622         [% IF ( notes ) %]
623                         <div id="circnotes" class="circmessage">
624                         <h4>Notes:</h4>
625             <p><span class="circ-hlt">[% notesmsg %]</span></p>
626                         </div>
627
628
629     <!-- /If notes -->[% END %]
630
631         <div id="messages" class="circmessage">
632                 <h4>Messages:</h4>
633                 <ul>
634                         [% FOREACH lib_messages_loo IN lib_messages_loop %]
635                                 <li>
636                                         <span class="circ-hlt">
637                                                 [% lib_messages_loo.message_date_formatted %]
638                                                 [% lib_messages_loo.branchcode %]
639                                                 <i>"[% lib_messages_loo.message %]"</i>
640                                         </span>
641                                         [% IF ( lib_messages_loo.can_delete ) %]
642                                                 <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
643                                         [% ELSE %]
644                                                 [% IF ( all_messages_del ) %]
645                                                         <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
646                                                 [% END %]
647                                         [% END %]
648                                 </li>
649                         [% END %]
650                         [% FOREACH bor_messages_loo IN bor_messages_loop %]
651                                 <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>
652                 [% ELSIF ( all_messages_del ) %]
653                     <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
654                 [% END %]</li>
655                         [% END %]
656
657                 </ul>
658         </div>  
659         
660      <!-- /If flagged -->[% END %]
661
662         
663
664 </div>
665 </div>
666
667 <div class="yui-g"><div id="patronlists" class="toptabs">
668
669 <ul>
670     <li>
671         [% IF ( issuecount ) %]
672             <a href="#checkouts">[% issuecount %] Checkout(s)</a>
673         [% ELSE %]
674             <a href="#checkouts">0 Checkouts</a>
675         [% END %]
676     </li>
677
678     [% IF relatives_issues_count %]
679         <li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
680     [% END %]
681
682     <li>
683         [% IF ( holds_count ) %]
684             <a href="#reserves" id="holds-tab">[% holds_count %] Hold(s)</a>
685         [% ELSE %]
686             <a href="#reserves" id="holds-tab">0 Holds</a>
687         [% END %]
688     </li>
689
690     <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
691 </ul>
692
693 <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
694 <div id="checkouts">
695     [% IF ( issuecount ) %]
696         <table id="issues-table">
697             <thead>
698                 <tr>
699                     <th scope="col">&nbsp;</th>
700                     <th scope="col">&nbsp;</th>
701                     <th scope="col">Due date</th>
702                     <th scope="col">Due date</th>
703                     <th scope="col">Title</th>
704                     <th scope="col">Item type</th>
705                     <th scope="col">Checked out on</th>
706                     <th scope="col">Checked out from</th>
707                     <th scope="col">Call no</th>
708                     <th scope="col">Charge</th>
709                     <th scope="col">Price</th>
710                     <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th>
711                     <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th>
712                     <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllExports">select all</a> | <a href="#" id="UncheckAllExports">none</a></p></th>
713                 </tr>
714             </thead>
715             [% INCLUDE 'checkouts-table-footer.inc' %]
716         </table>
717
718         <fieldset class="action">
719             [% IF ( CAN_user_circulate_override_renewals ) %]
720                 [% IF ( AllowRenewalLimitOverride ) %]
721                     <label for="override_limit">Override renewal limit:</label>
722                     <input type="checkbox" name="override_limit" id="override_limit" value="1" />
723                 [% END %]
724             [% END %]
725             <button class="btn" id="RenewCheckinChecked"><i class="icon-check"></i> Renew or return checked items</button>
726             <button class="btn" id="RenewAll"><i class="icon-book"></i> Renew all</button>
727         </fieldset>
728     [% ELSE %]
729         <p>Patron has nothing checked out.</p>
730     [% END %]
731 </div>
732
733 [% IF ( relatives_issues_count ) %]
734     <div id="relatives-issues">
735         <table id="relatives-issues-table">
736             <thead>
737                 <tr>
738                     <th scope="col">Due date (unformatted, hidden)</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">Patron</th>
748                 </tr>
749             </thead>
750         </table>
751     </div>
752 [% END %]
753
754 [% INCLUDE borrower_debarments.inc %]
755
756 <div id="reserves">
757 [% IF ( holds_count ) %]
758     <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
759         <input type="hidden" name="from" value="circ" />
760         <table id="holds-table" style="width: 100% !Important;">
761             <thead>
762                 <tr>
763                     <th>Hold date</th>
764                     <th>Title</th>
765                     <th>Call number</th>
766                     <th>Barcode</th>
767                     <th>Expiration</th>
768                     <th>Priority</th>
769                     <th>Delete?</th>
770                 </tr>
771             </thead>
772         </table>
773
774         <fieldset class="action">
775             <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
776         </fieldset>
777     </form>
778
779     [% IF SuspendHoldsIntranet %]
780     <fieldset class="action">
781         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
782             <input type="hidden" name="from" value="circ" />
783             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
784             <input type="submit" value="Suspend all holds" />
785
786             [% IF AutoResumeSuspendedHolds %]
787             <label for="suspend_until">until</label>
788             <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker" />
789             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
790              [% END %]
791         </form>
792     </fieldset>
793
794     <fieldset class="action">
795         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
796             <input type="hidden" name="from" value="circ" />
797             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
798             <input type="hidden" name="suspend" value="0" />
799             <input type="submit" value="Resume all suspended holds" />
800         </form>
801     </fieldset>
802     [% END # IF SuspendHoldsIntranet %]
803
804 [% ELSE %]
805         <p>Patron has nothing on hold.</p>
806 [% END %]
807 </div> <!-- reservesloop -->
808
809 [% END %] <!-- borrowernumber -->
810 </div></div>
811 [% END %]
812
813
814
815 </div>
816 </div>
817 [% UNLESS ( selectborrower ) %][% IF ( borrowernumber ) %]<div class="yui-b">
818 [% INCLUDE 'circ-menu.inc' %]
819 </div>[% END %][% END %]
820 </div>
821 [% INCLUDE 'intranet-bottom.inc' %]