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