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