Bug 13190: Reintroduce the checkouts export feature
[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     [% IF ( SpecifyDueDate ) %]<div class="date-select">
544         <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
545         [% 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" />
546 [% END %]
547           <label for="stickyduedate"> Remember for session:</label>
548 [% IF ( stickyduedate ) %]
549 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
550 [% ELSE %]
551 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
552 [% END %]
553           <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>
554 </div>[% END %]
555
556       [% IF Koha.Preference('OnSiteCheckouts') %]
557         <div class="onsite_checkout-select">
558           [% IF noissues %]
559             <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkout</label>
560             <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
561           [% ELSE %]
562             <input type="checkbox" id="onsite_checkout" name="onsite_checkout" /> <label for="onsite_checkout">On-site checkout</label>
563           [% END %]
564         </div>
565       [% END %]
566
567           <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
568           <input type="hidden" name="branch" value="[% branch %]" />
569           <input type="hidden" name="printer" value="[% printer %]" />
570           <input type="hidden" name="print" value="maybe" />
571           <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
572                 [% IF ( CHARGES ) %]
573                         <input type="hidden" name="charges" value="yes" />
574                         <input type="hidden" name="oldamount" value="[% amountold %]" />
575                 [% END %]
576 </fieldset>
577 </form></div>[% END %]<!-- /unless noissues -->
578
579 [% IF ( noissues ) %]
580     [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
581         <div class="yui-u">
582     [% ELSE %]
583         <div>
584     [% END %]
585 [% ELSE %]
586     <div class="yui-u">
587 [% END %]
588
589     [% IF flagged %]
590         [% IF ( noissues ) %]
591             [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
592                 <div id="circmessages" class="circmessage attention">
593             [% ELSE %]
594                 <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
595                 <div id="circmessages" class="circmessage warning">
596             [% END %]
597             <h3>
598                 Cannot check out!
599                 [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
600                     <span class="circ-hlt">Only on-site checkouts are allowed</span>
601                 [% END %]
602             </h3>
603         [% ELSE %]
604             <div id="circmessages" class="circmessage attention">
605                 <h3>Attention:</h3>
606         [% END %]
607
608                 <ul>
609
610                         [% IF ( warndeparture ) %]
611                         <li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
612                         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>
613
614                         </li>
615                         [% END %]
616
617                         [% IF ( returnbeforeexpiry ) %]
618                          <li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
619                          expiry date is before the date due, the date due will be set to the expiry date
620                          </li>
621                         [% END %]
622
623                         [% IF ( expired ) %]
624                         <li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
625                         [% 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>
626
627                         </li>
628                         [% END %]
629
630             [% IF ( gna ) %]
631                         <li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
632                         [% END %]
633
634             [% IF ( lost ) %]
635                         <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
636                         [% END %]
637
638             [% IF ( userdebarred ) %]
639                <li class="blocker">
640                    <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
641
642                    [% IF ( userdebarreddate ) %]
643                        until [% userdebarreddate %]
644                    [% END %]
645
646                    [% IF ( debarredcomment ) %]
647                        with the explanation: <br/><i>[% debarredcomment | html_line_break %]</i>
648                    [% END %]
649
650                    <br/>
651                    <a class="btn btn-small" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="icon-ban-circle"></i> View restrictions</a>
652                     [% IF (noissues && borrowernumber && CAN_user_circulate_force_checkout) %]
653                         <span class="override_debarment">
654                             <a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% borrowernumber %]" class="btn btn-small">Override restriction temporarily</a>
655                         </span>
656                     [% END %]
657                </li>
658             [% END %]
659
660                 [% 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>
661             [% END %]
662
663                 [% IF ( charges ) %]
664                             <li>
665             <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>.
666                 [% IF ( charges_is_blocker ) %]
667                     Checkouts are <span class="circ-hlt">BLOCKED</span> because fine balance is <span class="circ-hlt">OVER THE LIMIT</span>.
668                 [% END %]
669             <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">Make payment</a></li>
670                         [% END %]
671
672                 [% IF ( credits ) %]
673                         <li>
674                 <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount %][% END %]
675             </li>
676                         [% END %]
677
678
679
680                         </ul>
681         </div>
682
683                         [% IF ( WaitingReserveLoop ) %]
684                         <div id="holdswaiting" class="circmessage">
685                     <h4>Holds waiting:</h4>
686                                 [% FOREACH WaitingReserveLoo IN WaitingReserveLoop %]
687                                     <ul>
688                                         <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 %].
689                                     [% IF ( WaitingReserveLoo.waitingat ) %]
690                                         <br />[% IF ( WaitingReserveLoo.waitinghere ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]Waiting at [% WaitingReserveLoo.waitingat %]</strong>
691                                     [% END %]
692                                         </li>
693                                     </ul>
694                             [% END %]
695                         </div>
696                         <!-- /If WaitingReserveLoop -->[% END %]
697         [% IF ( notes ) %]
698                         <div id="circnotes" class="circmessage">
699                         <h4>Notes:</h4>
700             <p><span class="circ-hlt">[% notesmsg %]</span></p>
701                         </div>
702
703
704     <!-- /If notes -->[% END %]
705
706         <div id="messages" class="circmessage">
707                 <h4>Messages:</h4>
708                 <ul>
709                         [% FOREACH lib_messages_loo IN lib_messages_loop %]
710                                 <li>
711                                         <span class="circ-hlt">
712                                                 [% lib_messages_loo.message_date_formatted %]
713                                                 [% lib_messages_loo.branchcode %]
714                                                 <i>"[% lib_messages_loo.message %]"</i>
715                                         </span>
716                                         [% IF ( lib_messages_loo.can_delete ) %]
717                                                 <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
718                                         [% ELSE %]
719                                                 [% IF ( all_messages_del ) %]
720                                                         <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
721                                                 [% END %]
722                                         [% END %]
723                                 </li>
724                         [% END %]
725                         [% FOREACH bor_messages_loo IN bor_messages_loop %]
726                                 <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>
727                 [% ELSIF ( all_messages_del ) %]
728                     <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
729                 [% END %]</li>
730                         [% END %]
731
732                 </ul>
733         </div>  
734         
735      <!-- /If flagged -->[% END %]
736
737         
738
739 </div>
740 </div>
741
742 <div class="yui-g"><div id="patronlists" class="toptabs">
743
744 <ul>
745     <li>
746         [% IF ( issuecount ) %]
747             <a href="#checkouts">[% issuecount %] Checkout(s)</a>
748         [% ELSE %]
749             <a href="#checkouts">0 Checkouts</a>
750         [% END %]
751     </li>
752
753     [% IF relatives_issues_count %]
754         <li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
755     [% END %]
756
757     <li>
758         [% IF ( holds_count ) %]
759             <a href="#reserves" id="holds-tab">[% holds_count %] Hold(s)</a>
760         [% ELSE %]
761             <a href="#reserves" id="holds-tab">0 Holds</a>
762         [% END %]
763     </li>
764
765     <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
766 </ul>
767
768 <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
769 <div id="checkouts">
770     [% IF ( issuecount ) %]
771         <div id="issues-table-loading-message">
772             <p>
773                 <a id="issues-table-load-now-button" href="#" class="btn"><i class="icon-book"></i> Show checkouts</a>
774             </p>
775         </div>
776
777         <form name="issues" action="/cgi-bin/koha/tools/export.pl" method="post" class="checkboxed">
778             <table id="issues-table">
779                 <thead>
780                     <tr>
781                         <th scope="col">&nbsp;</th>
782                         <th scope="col">&nbsp;</th>
783                         <th scope="col">Due date</th>
784                         <th scope="col">Due date</th>
785                         <th scope="col">Title</th>
786                         <th scope="col">Item type</th>
787                         <th scope="col">Checked out on</th>
788                         <th scope="col">Checked out from</th>
789                         <th scope="col">Call no</th>
790                         <th scope="col">Charge</th>
791                         <th scope="col">Price</th>
792                         <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th>
793                         <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th>
794                         <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllExports">select all</a> | <a href="#" id="UncheckAllExports">none</a></p></th>
795                     </tr>
796                 </thead>
797                 [% INCLUDE 'checkouts-table-footer.inc' %]
798             </table>
799
800             <label for="issues-table-load-immediately">Always show checkouts immediately</label>
801             <input id="issues-table-load-immediately" type="checkbox" />
802
803             <fieldset id="issues-table-actions" class="action">
804                 [% IF ( CAN_user_circulate_override_renewals ) %]
805                     [% IF ( AllowRenewalLimitOverride ) %]
806                         <label for="override_limit">Override renewal limit:</label>
807                         <input type="checkbox" name="override_limit" id="override_limit" value="1" />
808                     [% END %]
809                 [% END %]
810                 <button class="btn" id="RenewCheckinChecked"><i class="icon-check"></i> Renew or return checked items</button>
811                 <button class="btn" id="RenewAll"><i class="icon-book"></i> Renew all</button>
812             </fieldset>
813
814             [% IF issuecount %]
815                 [% IF ( exports_enabled ) %]
816                     <fieldset>
817                         <label for="output_format"><b>Export checkouts using format:</b></label>
818                         <select name="output_format" id="output_format">
819                             <option value="iso2709_995">ISO2709 with items</option>
820                             <option value="iso2709">ISO2709 without items</option>
821                             [% IF Koha.Preference('ExportWithCsvProfile') %]
822                                 <option value="csv">CSV</option>
823                             [% END %]
824                         </select>
825
826                        <label for="export_remove_fields">Don't export fields:</label> <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% export_remove_fields %]" title="Use for iso2709 exports" />
827                         <input type="hidden" name="op" value="export" />
828                         <input type="hidden" id="output_format" name="output_format" value="iso2709" />
829                         <input type="hidden" id="dont_export_item" name="dont_export_item" value="0" />
830                         <input type="hidden" id="record_type" name="record_type" value="bibs" />
831                         <button class="btn btn-small" id="export_submit"><i class="icon-download-alt"></i> Export</button>
832                     </fieldset>
833                 [% END %]
834             [% END %]
835         </form>
836
837     [% ELSE %]
838         <p>Patron has nothing checked out.</p>
839     [% END %]
840 </div>
841
842 [% IF ( relatives_issues_count ) %]
843     <div id="relatives-issues">
844         <table id="relatives-issues-table">
845             <thead>
846                 <tr>
847                     <th scope="col">Due date (unformatted, hidden)</th>
848                     <th scope="col">Due date</th>
849                     <th scope="col">Title</th>
850                     <th scope="col">Item type</th>
851                     <th scope="col">Checked out on</th>
852                     <th scope="col">Checked out from</th>
853                     <th scope="col">Call no</th>
854                     <th scope="col">Charge</th>
855                     <th scope="col">Price</th>
856                     <th scope="col">Patron</th>
857                 </tr>
858             </thead>
859         </table>
860     </div>
861 [% END %]
862
863 [% INCLUDE borrower_debarments.inc %]
864
865 <div id="reserves">
866 [% IF ( holds_count ) %]
867     <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
868         <input type="hidden" name="from" value="circ" />
869         <table id="holds-table" style="width: 100% !Important;">
870             <thead>
871                 <tr>
872                     <th>Hold date</th>
873                     <th>Title</th>
874                     <th>Call number</th>
875                     <th>Barcode</th>
876                     <th>Expiration</th>
877                     <th>Priority</th>
878                     <th>Delete?</th>
879                 </tr>
880             </thead>
881         </table>
882
883         <fieldset class="action">
884             <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
885         </fieldset>
886     </form>
887
888     [% IF SuspendHoldsIntranet %]
889     <fieldset class="action">
890         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
891             <input type="hidden" name="from" value="circ" />
892             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
893             <input type="submit" value="Suspend all holds" />
894
895             [% IF AutoResumeSuspendedHolds %]
896             <label for="suspend_until">until</label>
897             <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker" />
898             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
899              [% END %]
900         </form>
901     </fieldset>
902
903     <fieldset class="action">
904         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
905             <input type="hidden" name="from" value="circ" />
906             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
907             <input type="hidden" name="suspend" value="0" />
908             <input type="submit" value="Resume all suspended holds" />
909         </form>
910     </fieldset>
911     [% END # IF SuspendHoldsIntranet %]
912
913 [% ELSE %]
914         <p>Patron has nothing on hold.</p>
915 [% END %]
916 </div> <!-- reservesloop -->
917
918 [% END %] <!-- borrowernumber -->
919 </div></div>
920 [% END %]
921
922
923
924 </div>
925 </div>
926 [% UNLESS ( selectborrower ) %][% IF ( borrowernumber ) %]<div class="yui-b">
927 [% INCLUDE 'circ-menu.inc' %]
928 </div>[% END %][% END %]
929 </div>
930 [% INCLUDE 'intranet-bottom.inc' %]