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