Bug 12337 - Multi-clicking the renewal buttons on circulation.pl can trigger "renewal...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / circulation.tt
1 [% USE Branches %]
2 [% USE KohaDates %]
3 [% IF ( export_remove_fields OR export_with_csv_profile ) %]
4    [% SET exports_enabled = 1 %]
5 [% END %]
6 [% USE AuthorisedValues %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 [% SET destination = "circ" %]
9 <title>Koha &rsaquo; Circulation
10 [% IF borrowernumber %]
11   &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
12 [% END %]
13 </title>
14 [% INCLUDE 'doc-head-close.inc' %]
15 [% INCLUDE 'calendar.inc' %]
16 [% IF ( UseTablesortForCirc ) %]<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
17 [% INCLUDE 'datatables.inc' %][% END %]
18 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
19 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
20 [% INCLUDE 'timepicker.inc' %]
21 <script type="text/javascript" src="[% themelang %]/js/pages/circulation.js"></script>
22 <script type="text/javascript">
23 //<![CDATA[
24 var MSG_ADD_MESSAGE = _("Add a new message");
25 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
26 [% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
27 [% UNLESS ( borrowernumber ) %][% UNLESS ( CGIselectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
28          $(document).ready(function() {
29         $('#issues-form').preventDoubleFormSubmit();
30         $('#patronlists').tabs([% IF ( UseTablesortForCirc ) %]{
31             // Correct table sizing for tables hidden in tabs
32             // http://www.datatables.net/examples/api/tabs_and_scrolling.html
33             "show": function(event, ui) {
34                 var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable();
35                 if ( oTable.length > 0 ) {
36                     oTable.fnAdjustColumnSizing();
37                 }
38             }
39         }[% END %]);
40         [% IF ( UseTablesortForCirc ) %]
41         $("#issuest").dataTable($.extend(true, {}, dataTablesDefaults, {
42             "sDom": 't',
43             "aaSorting": [],
44             "aoColumnDefs": [
45                 { "aTargets": [ -1, -2[% IF ( exports_enabled ) %], -3[% END %] ], "bSortable": false, "bSearchable": false },
46                 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
47                 { "sType": "title-string", "aTargets" : [ "title-string" ] }
48             ],
49             "bPaginate": false
50         }));
51
52         $("#relissuest").dataTable($.extend(true, {}, dataTablesDefaults, {
53             "sDom": 't',
54             "aaSorting": [],
55             "aoColumnDefs": [
56                 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
57                 { "sType": "title-string", "aTargets" : [ "title-string" ] },
58                 { "sType": "html", "aTargets" : [ "html-content" ] }
59             ],
60             "bPaginate": false
61         }));
62
63         $("#issuest").on("sort",function() {
64             $("#previous").hide();  // Don't want to see "previous checkouts" header sorted with other rows
65         });
66         $("#relissuest").on("sort",function() {
67             $("#relprevious").hide();  // Don't want to see "previous checkouts" header sorted with other rows
68         });
69         [% END %]
70         [% IF ( AllowRenewalLimitOverride ) %]
71         $( '#override_limit' ).click( function () {
72             if ( this.checked ) {
73                 $( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
74             } else {
75                 $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
76             }
77         } ).attr( 'checked', false );
78         [% END %][% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
79         // listen submit to trigger qslip on empty checkout
80         $('#mainform').bind('submit',function() {
81           if ($('#barcode').val() == '') {
82             return printx_window( '[% CircAutoPrintQuickSlip %]' ); }
83         });[% END %]
84
85     [% IF ( CAN_user_circulate_override_renewals ) %]
86     [% IF ( AllowRenewalLimitOverride ) %]
87     $( '#override_limit' ).click( function () {
88         if ( this.checked ) {
89            $( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
90         } else {
91            $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
92         }
93     } ).attr( 'checked', false );
94     [% END %]
95     [% END %]
96     [% IF AutoResumeSuspendedHolds %]
97         $("#suspend_until").datepicker("option", "minDate", 1); // require that hold suspended until date is after today
98     [% END %]
99  });
100 //]]>
101 </script>
102 </head>
103 <body id="circ_circulation" class="circ">
104
105 [% INCLUDE 'header.inc' %]
106 [% INCLUDE 'circ-search.inc' %]
107
108 <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;
109 [% IF ( borrowernumber ) %]
110     <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> &rsaquo; [% INCLUDE 'patron-title.inc' %]
111 [% ELSE %]
112     <strong>Checkouts</strong>
113 [% END %]
114 </div>
115 [% IF ( CGIselectborrower ) %]
116 <div id="doc" class="yui-t7">
117
118    <div id="bd">
119         <div id="yui-main">
120         <div class="yui-g">
121 [% ELSE %]
122 <div id="doc3" class="yui-t2">
123
124    <div id="bd">
125         <div id="yui-main">
126         <div class="yui-b">
127 [% END %]
128
129 [% IF ( borrowernumber ) %]
130 [% INCLUDE 'members-toolbar.inc' %]
131 [% END %]
132
133 <!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
134 <div style="display: none;" id="add_message_form">
135 <form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
136 <fieldset id="borrower_messages" class="brief">
137 <legend>Leave a message</legend>
138         <ol>
139     <li>
140             <label for="message_type">Add a message for:</label>
141           <select name="message_type" id="message_type">
142             <option value="L">Other librarians</option>
143             <option value="B">[% firstname %]</option>
144         </select>
145     </li>
146     [% IF ( canned_bor_notes_loop ) %]
147         <li>
148                 <label for="type">Predefined notes: </label>
149                 <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
150                     <option value="">Select note</option>
151                     [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %]
152                     <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option>
153                     [% END %]
154                 </select>
155         </li>
156     [% END %]
157     <li>
158         <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
159     </li>
160         </ol>
161     <fieldset class="action">
162         <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a>
163     </fieldset>
164
165         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
166         <input type="hidden" name="branchcode" value="[% branch %]" />
167 </fieldset>
168 </form>
169 </div>
170
171 [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry %]</div>[% END %]
172
173 [% IF additional_materials %]
174     <div id="materials" class="dialog message">Note about the accompanying materials: <br />
175     [% additional_materials %]
176     </div>
177 [% END %]
178
179 [% IF ( alert.ITEM_LOST ) %]
180     <div class="dialog message">This item has been lost with a status of "[% alert.ITEM_LOST %]".</div>
181 [% END %]
182
183 [% IF ( alert.OTHER_CHARGES ) %]
184     <div class="dialog message">The patron has unpaid charges for reserves, rentals etc of [% alert.OTHER_CHARGES %]</div>
185 [% END %]
186
187 [% IF ( NEEDSCONFIRMATION ) %]
188 <div class="yui-g">
189
190 <div id="circ_needsconfirmation" class="dialog alert">
191 [% IF CAN_user_circulate_force_checkout %]
192   <h3>Please confirm checkout</h3>
193 [% ELSE %]
194   <h3>Cannot check out</h3>
195 [% END %]
196
197 <ul>
198 [%IF ( AGE_RESTRICTION ) %]
199     <li>Age restriction [% AGE_RESTRICTION %].
200       [% IF CAN_user_circulate_force_checkout %]
201         Check out anyway?
202       [% END %]
203     </li>
204 [% END %]
205
206 [% IF ( DEBT ) %]
207     <li>The patron has a debt of [% DEBT %]</li>
208 [% END %]
209
210 [% IF ( RENEW_ISSUE ) %]
211     <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is currently checked out to this patron.  Renew?</li>
212 [% END %]
213
214 [% IF ( RESERVE_WAITING ) %]
215     <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>
216 [% END %]
217
218 [% IF ( RESERVED ) %]
219     <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>
220 [% END %]
221
222 [% IF ( ISSUED_TO_ANOTHER ) %]
223     <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 %]).
224       [% IF CAN_user_circulate_force_checkout %]
225         Check in and check out?
226       [% END %]
227     </li>
228 [% END %]
229
230 [% IF ( TOO_MANY ) %]
231     <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
232 [% END %]
233
234 [% IF ( BORRNOTSAMEBRANCH ) %]
235     <li>This patrons is from a different library ([% BORRNOTSAMEBRANCH %])</li>
236 [% END %]
237
238 [% IF ( PATRON_CANT ) %]
239     <li>This patron can't check out this item per library circulation policy</li>
240 [% END %]
241
242 [% IF ( NOT_FOR_LOAN_FORCING ) %]
243     <li>
244     [% IF ( itemtype_notforloan ) %]
245         Item type is normally not for loan.
246     [% ELSIF ( item_notforloan ) %]
247         [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
248         Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
249     [% END %]
250       [% IF CAN_user_circulate_force_checkout %]
251         Check out anyway?
252       [% END %]
253     </li>
254 [% END %]
255
256 [% IF ( USERBLOCKEDOVERDUE ) %]
257     <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).
258       [% IF CAN_user_circulate_force_checkout %]
259        Check out anyway?
260       [% END %]
261     </li>
262 [% END %]
263
264 [% IF ( ITEM_LOST ) %]
265     <li>This item has been lost with a status of "[% ITEM_LOST %]".
266       [% IF CAN_user_circulate_force_checkout %]
267         Check out anyway?
268       [% END %]
269     </li>
270 [% END %]
271
272 [% IF  HIGHHOLDS %]
273     <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
274 [% END %]
275
276 [% IF BIBLIO_ALREADY_ISSUED %]
277   <li>
278     Patron has already checked out another item from this record.
279     [% IF CAN_user_circulate_force_checkout %]
280       Check out anyway?
281     [% END %]
282   </li>
283 [% END %]
284 </ul>
285
286 [% IF HIGHHOLDS %]
287         <script language="JavaScript" type="text/javascript">
288         $(document).ready(function() {
289                 $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]');
290         });
291         </script>
292 [% END %]
293
294 [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
295 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
296
297 [% IF ( RESERVED ) %]
298     <p>
299     <input type="checkbox" id="cancelreserve" name="cancelreserve" value="cancel" />
300     <label for="cancelreserve">Cancel hold</label>
301     </p>
302 [% END %]
303
304 [% IF ( RESERVE_WAITING ) %]
305 <p>
306     <label for="cancelreserve">Cancel hold</label>
307     <input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
308     <label for="revertreserve">Revert waiting status</label>
309     <input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
310 </p>
311 [% END %]
312
313     <input type="hidden" name="barcode" value="[% barcode |html %]" />
314     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
315     <input type="hidden" name="issueconfirmed" value="1" />
316     [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
317     [% IF ( INVALID_DATE ) %]
318     <p>
319     <input type="text" size="13" id="duedatespec" name="duedatespec" readonly="readonly" value="[% duedatespec %]" />
320     <label for="duedatespec">Due date</label>
321     </p>
322     [% ELSE %]
323     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
324     [% END %]
325     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
326     <input type="hidden" name="branch" value="[% branch %]" />
327     [% IF ( RENEW_ISSUE ) %]
328     <input type="submit" class="approve" value="Yes, Renew (Y)" accesskey="y" />
329     [% ELSE %]
330     <input type="submit" class="approve" value="Yes, Check Out (Y)" accesskey="y" />
331     [% END %]
332 </form>
333 [% END %]
334
335 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
336     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
337     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
338     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
339     [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
340         [% IF ( RENEW_ISSUE ) %]
341         <input type="submit" class="deny" value="No, Don't Renew (N)" accesskey="n" />
342         [% ELSE %]
343         <input type="submit" class="deny" value="No, Don't Check Out (N)" accesskey="n" />
344         [% END %]
345     [% ELSE %]
346         <input type="submit" class="deny" value="Continue" />
347     [% END %]
348 </form>
349
350 </div></div>
351 [% END %] <!-- NEEDSCONFIRMATION -->
352
353         [% IF ( IMPOSSIBLE ) %]
354
355 [% IF ( soundon ) %]
356 <audio src="[% interface %]/[% theme %]/sound/critical.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
357 [% END %]        
358
359 <div class="yui-g">
360 <div id="circ_impossible" class="dialog alert">
361 <!-- RESULT OF ISSUING REQUEST -->
362         <ul>
363         [% IF ( STATS ) %]
364             <li>Local use recorded</li>
365         [% END %]
366
367         [% IF ( INVALID_DATE ) %]
368             <li>The due date &quot;[% INVALID_DATE %]&quot; is invalid</li>
369         [% END %]
370
371         [% IF ( UNKNOWN_BARCODE ) %]
372             <li>The barcode was not found [% barcode |html %]
373             [% IF ( fast_cataloging ) %]
374                 [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
375             <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>
376                 [% END %]
377             [% END %]
378
379         [% IF ( FALLBACK ) %]
380             [% IF options %]
381                 <br />The following items were found by searching:
382                 [% FOREACH book IN options %]
383                     <br />
384                     <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
385                         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
386                         <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
387                         <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
388                         <input type="hidden" name="branch" value="[% branch %]" />
389                         <input type="hidden" name="barcode" value="[% book.barcode %]" />
390                         <input type="submit" name="x" value="Check out [% book.barcode %]: [% book.title %]" />
391                     </form>
392                 [% END %]
393             [% ELSE %]
394                 <br />No items were found by searching.
395             [% END %]
396         [% END %]
397
398      </li>
399         [% END %]
400
401         [% IF ( NOT_FOR_LOAN ) %]
402             <li>
403             [% IF ( itemtype_notforloan ) %]
404                 Item type not for loan.
405             [% ELSIF ( item_notforloan ) %]
406                 [% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
407                 Item not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
408             [% END %]
409             </li>
410         [% END %]
411
412         [% IF ( WTHDRAWN ) %]
413             <li>Item has been withdrawn</li>
414         [% END %]
415
416         [% IF ( RESTRICTED ) %]
417             <li>Item is restricted</li>
418         [% END %]
419
420         [% IF ( GNA ) %]
421             <li>Patron's address is in doubt</li>
422         [% END %]
423
424         [% IF ( CARD_LOST ) %]
425             <li>Patron's card is lost</li>
426         [% END %]
427
428         [% IF ( DEBARRED ) %]
429             <li>Patron is restricted</li>
430         [% END %]
431
432         [% IF ( NO_MORE_RENEWALS ) %]
433             <li>No more renewals possible</li>
434         [% END %]
435
436         [%IF ( AGE_RESTRICTION ) %]
437             <li>Age restriction [% AGE_RESTRICTION %].</li>
438         [% END %]
439
440         [% IF ( EXPIRED ) %]
441             <li>Patron's card is expired</li>
442         [% END %]
443
444         [% IF ( TOO_MANY ) %]
445             <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
446         [% END %]
447
448         [% IF ( ITEMNOTSAMEBRANCH ) %]
449             <li>This item belongs to [% Branches.GetName( itemhomebranch ) %] and cannot be checked out from this location.</li>
450         [% END %]
451
452         [% IF ( USERBLOCKEDREMAINING ) %]
453             <li>Patron has had overdue items and is blocked for [% USERBLOCKEDREMAINING %] day(s).</li>
454         [% END %]
455         
456             [% IF ( USERBLOCKEDOVERDUE ) %]
457             <li>Checkouts are BLOCKED because patron has overdue items</li>
458         [% END %]
459         </ul>
460
461 </div></div>
462 [% ELSE %]
463 [% IF ( soundon ) %]
464 <audio src="[% interface %]/[% theme %]/sound/beep.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
465 [% END %]
466     [% END %] <!-- /impossible -->
467
468 [% IF ( issued ) %]
469 <p>Item checked out</p>
470 [% END %]
471
472 [% IF ( message ) %]
473 [% INCLUDE 'patron-toolbar.inc' %]
474 <h4>
475 No patron matched <span class="ex">[% message %]</span>
476 </h4>
477 [% END %]
478
479
480 [% IF ( CGIselectborrower ) %]
481 [% INCLUDE 'patron-toolbar.inc' %]
482
483 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
484 <fieldset id="circ_circulation_selectborrower" class="brief">
485     <legend>Patron selection</legend>
486
487     <input type="hidden" name="branch" value="[% branch %]" />
488     <input type="hidden" name="printer" value="[% printer %]" />
489     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
490     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
491
492 <ol>    <li>
493     <label for="borrowernumber">Select a patron: </label>
494     [% CGIselectborrower %]
495     </li>
496 </ol>
497 <p><input type="submit" value="Select" /></p>
498 </fieldset>
499 </form>
500 [% ELSE %] <!-- CGIselectborrower -->
501
502 <!-- BARCODE ENTRY -->
503
504 [% IF ( borrowernumber ) %]
505 <div class="yui-g">
506 [% UNLESS ( noissues ) %]
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     <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
522
523         <div class="hint">Enter item barcode:</div>
524
525     [% IF NEEDSCONFIRMATION %]
526             <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
527     [% ELSE %]
528             <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
529     [% END %]
530     <input type="submit" value="Check Out" />
531
532     [% IF ( SpecifyDueDate ) %]<div class="date-select">
533         <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
534         [% 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" />
535 [% END %]
536           <label for="stickyduedate"> Remember for session:</label>
537 [% IF ( stickyduedate ) %]
538 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
539 [% ELSE %]
540 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
541 [% END %]
542           <input type="button" class="action" id="cleardate" value="Clear" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" />
543 </div>[% END %]
544           <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
545           <input type="hidden" name="branch" value="[% branch %]" />
546           <input type="hidden" name="printer" value="[% printer %]" />
547           <input type="hidden" name="print" value="maybe" />
548           <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
549                 [% IF ( CHARGES ) %]
550                         <input type="hidden" name="charges" value="yes" />
551                         <input type="hidden" name="oldamount" value="[% amountold %]" />
552                 [% END %]
553 </fieldset>
554 </form></div>[% END %]<!-- /unless noissues -->
555
556 [% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
557
558     [% IF ( flagged ) %]
559                 [% IF ( noissues ) %]
560                 <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
561         <div id="circmessages" class="circmessage warning">
562                 [% ELSE %]
563         <div id="circmessages" class="circmessage attention">
564                 [% END %]
565
566                 <h3>[% IF ( noissues ) %]
567                         Cannot check out!
568                 [% ELSE %]Attention:[% END %]</h3>
569                 <ul>
570
571                         [% IF ( warndeparture ) %]
572                         <li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
573                         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>
574
575                         </li>
576                         [% END %]
577
578                         [% IF ( returnbeforeexpiry ) %]
579                          <li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
580                          expiry date is before the date due, the date due will be set to the expiry date
581                          </li>
582                         [% END %]
583
584                         [% IF ( expired ) %]
585                         <li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
586                         [% 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>
587
588                         </li>
589                         [% END %]
590
591             [% IF ( gna ) %]
592                         <li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
593                         [% END %]
594
595             [% IF ( lost ) %]
596                         <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
597                         [% END %]
598
599             [% IF ( userdebarred ) %]
600                <li class="blocker">
601                    <span class="circ-hlt"> Restricted:</span> Patron's account is restricted
602
603                    [% IF ( userdebarreddate ) %]
604                        until [% userdebarreddate %]
605                    [% END %]
606
607                    [% IF ( debarredcomment ) %]
608                        with the explanation: <br/><i>[% debarredcomment | html_line_break %]</i>
609                    [% END %]
610
611                    <br/>
612                    <a class="btn btn-small" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="icon-ban-circle"></i> View restrictions</a>
613                </li>
614             [% END %]
615
616                 [% 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>
617             [% END %]
618
619                 [% IF ( charges ) %]
620                             <li>
621             <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>.
622                 [% IF ( charges_is_blocker ) %]
623                     Checkouts are <span class="circ-hlt">BLOCKED</span> because fine balance is <span class="circ-hlt">OVER THE LIMIT</span>.
624                 [% END %]
625             <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">Make payment</a></li>
626                         [% END %]
627
628                 [% IF ( credits ) %]
629                         <li>
630                 <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount %][% END %]
631             </li>
632                         [% END %]
633
634
635
636                         </ul>
637         </div>
638
639                         [% IF ( WaitingReserveLoop ) %]
640                         <div id="holdswaiting" class="circmessage">
641                     <h4>Holds waiting:</h4>
642                                 [% FOREACH WaitingReserveLoo IN WaitingReserveLoop %]
643                                     <ul>
644                                         <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 %].
645                                     [% IF ( WaitingReserveLoo.waitingat ) %]
646                                         <br />[% IF ( WaitingReserveLoo.waitinghere ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]Waiting at [% WaitingReserveLoo.waitingat %]</strong>
647                                     [% END %]
648                                         </li>
649                                     </ul>
650                             [% END %]
651                         </div>
652                         <!-- /If WaitingReserveLoop -->[% END %]
653         [% IF ( notes ) %]
654                         <div id="circnotes" class="circmessage">
655                         <h4>Notes:</h4>
656             <p><span class="circ-hlt">[% notesmsg %]</span></p>
657                         </div>
658
659
660     <!-- /If notes -->[% END %]
661
662         <div id="messages" class="circmessage">
663                 <h4>Messages:</h4>
664                 <ul>
665                         [% FOREACH lib_messages_loo IN lib_messages_loop %]
666                                 <li>
667                                         <span class="circ-hlt">
668                                                 [% lib_messages_loo.message_date_formatted %]
669                                                 [% lib_messages_loo.branchcode %]
670                                                 <i>"[% lib_messages_loo.message %]"</i>
671                                         </span>
672                                         [% IF ( lib_messages_loo.can_delete ) %]
673                                                 <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
674                                         [% ELSE %]
675                                                 [% IF ( all_messages_del ) %]
676                                                         <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
677                                                 [% END %]
678                                         [% END %]
679                                 </li>
680                         [% END %]
681                         [% FOREACH bor_messages_loo IN bor_messages_loop %]
682                                 <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>
683                 [% ELSIF ( all_messages_del ) %]
684                     <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
685                 [% END %]</li>
686                         [% END %]
687
688                 </ul>
689         </div>  
690         
691      <!-- /If flagged -->[% END %]
692
693         
694
695 </div>
696 </div>
697
698 <div class="yui-g"><div id="patronlists" class="toptabs">
699
700 <ul>
701 <li>    [% IF ( issuecount ) %]
702             <a href="#checkouts">[% issuecount %] Checkout(s)</a>
703     [% ELSE %]
704             <a href="#checkouts">0 Checkouts</a>
705     [% END %]</li>
706 [% IF ( displayrelissues ) %]
707 <li><a href="#relissues">Relatives' checkouts</a></li>
708 [% END %]
709 <li>[% IF ( countreserv ) %]
710             <a href="#reserves">[% countreserv %] Hold(s)</a>
711     [% ELSE %]
712             <a href="#reserves">0 Holds</a>
713     [% END %]</li>
714     <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
715
716 </ul>
717
718 <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
719 <div id="checkouts">
720 [% IF ( issuecount ) %]
721     <form id="issues-form" name="issues" action="/cgi-bin/koha/reserve/renewscript.pl" method="post" class="checkboxed">
722     <input type="hidden" value="circ" name="destination" />
723     <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
724     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
725     <input type="hidden" name="branch" value="[% branch %]" />
726         <table id="issuest">
727     <thead><tr>
728         <th scope="col" class="title-string">Due date</th>
729         <th scope="col" class="anti-the">Title</th>
730         <th scope="col">Item type</th>
731         <th scope="col" class="title-string">Checked out on</th>
732         <th scope="col">Checked out from</th>
733         <th scope="col">Call no</th>
734         <th scope="col">Charge</th>
735         <th scope="col">Price</th>
736         <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllitems">select all</a> | <a href="#" id="CheckNoitems">none</a></p></th>
737         <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllreturns">select all</a> | <a href="#" id="CheckNoreturns">none</a></p></th>
738         [% IF ( exports_enabled ) %]
739           <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllexports">select all</a> | <a href="#" id="CheckNoexports">none</a></p></th>
740         [% END %]
741     </tr></thead>
742 [% IF ( todayissues ) %]
743 [% INCLUDE 'checkouts-table-footer.inc' %]
744         <tbody>
745
746     [% FOREACH todayissue IN todayissues %]
747     [% IF ( loop.odd ) %]
748     <tr>
749     [% ELSE %]
750     <tr class="highlight">
751     [% END %]
752         [% IF ( todayissue.od ) %]<td class="od">[% ELSE %]<td>[% END %]
753         <span title="[% todayissue.dd_sort %]">[% todayissue.dd %]</span>
754
755             [% IF ( todayissue.itemlost ) %]
756                 <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', todayissue.itemlost ) %]</span>
757             [% END %]
758             [% IF ( todayissue.damaged ) %]
759                 <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', todayissue.damaged ) %]</span>
760             [% END %]
761         </td>
762         <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% todayissue.biblionumber %]&amp;type=intra"><strong>[% todayissue.title |html %][% FOREACH subtitl IN todayissue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- <span class="circ-hlt">[% todayissue.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% todayissue.biblionumber %]&amp;itemnumber=[% todayissue.itemnumber %]#item[% todayissue.itemnumber %]">[% todayissue.barcode %]</a></td>
763         <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %]<img src="[% todayissue.itemtype_image %]" alt="" />[% END %][% END %][% todayissue.itemtype %]</td>
764         <td><span title="[% todayissue.displaydate_sort %]">[% todayissue.checkoutdate %]</span></td>
765         [% IF ( todayissue.multiple_borrowers ) %]<td>[% todayissue.firstname %] [% todayissue.surname %]</td>[% END %]
766         <td>[% todayissue.issuingbranchname %]</td>
767         <td>[% todayissue.itemcallnumber %]</td>
768             <td>[% todayissue.charge %]</td>
769             <td>[% todayissue.replacementprice %]</td>
770       [% IF ( todayissue.renew_failed ) %]
771             <td class="problem">Renewal failed</td>
772       [% ELSE %]
773         <td><span style="padding: 0 1em;">[% IF ( todayissue.renewals ) %][% todayissue.renewals %][% ELSE %]0[% END %]</span>
774         [% IF ( todayissue.can_renew ) %]
775         <input type="checkbox" name="all_items[]" value="[% todayissue.itemnumber %]" checked="checked" style="display: none;" />
776         [% IF ( todayissue.od ) %]
777             <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" checked="checked" />
778         [% ELSE %]
779             <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" />
780         [% END %]
781             [% IF todayissue.renewsallowed && todayissue.renewsleft %]
782                 <span class="renewals">([% todayissue.renewsleft %] of [% todayissue.renewsallowed %] renewals remaining)</span>
783             [% END %]
784         [% ELSE %]
785             [% IF ( todayissue.can_confirm ) %]<span class="renewals-allowed" style="display: none">
786                 <input type="checkbox" name="all_items[]" value="[% todayissue.itemnumber %]" checked="checked" style="display: none;" />
787                 [% IF ( todayissue.od ) %]
788                     <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" checked="checked" />
789                 [% ELSE %]
790                     <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" />
791                 [% END %]
792                 </span>
793                 [% IF todayissue.renewsallowed && todayissue.renewsleft && !todayissue.renew_error_too_soon %]
794                     <span class="renewals">([% todayissue.renewsleft %] of [% todayissue.renewsallowed %] renewals remaining)</span>
795                 [% END %]
796                 <span class="renewals-disabled">
797             [% END %]
798             [% IF ( todayissue.renew_error_on_reserve ) %]
799                 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On hold</a>
800             [% ELSIF ( todayissue.renew_error_too_many ) %]
801                 Not renewable
802             [% ELSIF ( todayissue.renew_error_too_soon ) %]
803                 No renewal before [% todayissue.soonestrenewdate %]
804                 <span class="renewals">([% todayissue.renewsleft %] of [% todayissue.renewsallowed %] renewals remaining)</span>
805             [% END %]
806             [% IF ( todayissue.can_confirm ) %]
807                 </span>
808             [% END %]
809         [% END %]
810         </td>
811         [% END %]
812         [% IF ( todayissue.return_failed ) %]
813             <td class="problem">Checkin failed</td>
814         [% ELSE %]
815             [% IF ( todayissue.renew_error_on_reserve ) %]
816                <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On hold</a>
817                 <input type="checkbox" name="all_barcodes[]" value="[% todayissue.barcode %]" checked="checked" style="display: none;" />
818                 </td>
819             [% ELSE %]
820             <td><input type="checkbox" class="radio" name="barcodes[]"  value="[% todayissue.barcode %]" />
821                 <input type="checkbox" name="all_barcodes[]" value="[% todayissue.barcode %]" checked="checked" style="display: none;" />
822             </td>
823             [% END %]
824         [% END %]
825         [% IF ( exports_enabled ) %]
826           <td style="text-align:center;">
827             <input type="checkbox" id="export_[% todayissue.biblionumber %]" name="biblionumbers" value="[% todayissue.biblionumber %]" />
828             <input type="checkbox" name="itemnumbers" value="[% todayissue.itemnumber %]" style="visibility:hidden;" />
829           </td>
830         [% END %]
831     </tr>
832     [% END %] <!-- /loop todayissues -->
833     <!-- /if todayissues -->[% END %]
834
835 [% IF ( previssues ) %]
836     [% UNLESS ( todayissues ) %]
837     [% INCLUDE 'checkouts-table-footer.inc' %]
838         <tbody>
839     [% END %]
840     [% IF ( UseTablesortForCirc ) %]<tr id="previous"><th><span title="">Previous checkouts</span></th><th></th><th></th><th><span title=""></span></th><th></th><th></th><th></th><th></th><th></th><th></th>[% IF ( exports_enabled ) %]<th></th>[% END %]</tr>[% ELSE %]<tr id="previous">[% IF ( exports_enabled ) %]<th colspan="11">[% ELSE %]<th colspan="10">[% END %]Previous checkouts</th></tr>[% END %]
841     [% FOREACH previssue IN previssues %]
842     [% IF ( loop.odd ) %]
843         <tr>
844     [% ELSE %]
845         <tr class="highlight">
846     [% END %]
847         [% IF ( previssue.od ) %]<td class="od">[% ELSE %]<td>[% END %]
848         <span title="[% previssue.dd_sort %]">[% previssue.dd %]</span>
849
850             [% IF ( previssue.itemlost ) %]
851                 <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', previssue.itemlost ) %]</span>
852             [% END %]
853             [% IF ( previssue.damaged ) %]
854                 <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', previssue.damaged ) %]</span>
855             [% END %]
856         </td>
857         <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% previssue.biblionumber %]&amp;type=intra"><strong>[% previssue.title |html %][% FOREACH subtitl IN previssue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% previssue.biblionumber %]&amp;itemnumber=[% previssue.itemnumber %]#item[% previssue.itemnumber %]">[% previssue.barcode %]</a></td>
858         <td>
859             [% previssue.itemtype %]
860         </td>
861         <td><span title="[% previssue.displaydate_sort %]">[% previssue.displaydate %]</span></td>
862         [% IF ( previssue.multiple_borrowers ) %]<td>[% previssue.firstname %] [% previssue.surname %]</td>[% END %]
863         <td>[% previssue.issuingbranchname %]</td>
864         <td>[% previssue.itemcallnumber %]</td>
865         <td>[% previssue.charge %]</td>
866         <td>[% previssue.replacementprice %]</td>
867       [% IF ( previssue.renew_failed ) %]
868             <td class="problem">Renewal failed</td>
869       [% ELSE %]
870         <td><span style="padding: 0 1em;">[% IF ( previssue.renewals ) %][% previssue.renewals %][% ELSE %]0[% END %]</span>
871         [% IF ( previssue.can_renew ) %]
872         <input type="checkbox" name="all_items[]" value="[% previssue.itemnumber %]" checked="checked" style="display: none;" />
873         [% IF ( previssue.od ) %]
874             <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" checked="checked" />
875         [% ELSE %]
876             <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" />
877         [% END %]
878             [% IF previssue.renewsallowed && previssue.renewsleft %]
879                 <span class="renewals">([% previssue.renewsleft %] of [% previssue.renewsallowed %] renewals remaining)</span>
880             [% END %]
881         [% ELSE %]
882             [% IF ( previssue.can_confirm ) %]<span class="renewals-allowed" style="display: none">
883                 <input type="checkbox" name="all_items[]" value="[% previssue.itemnumber %]" checked="checked" style="display: none;" />
884                 [% IF ( previssue.od ) %]
885                     <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" checked="checked" />
886                 [% ELSE %]
887                     <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" />
888                 [% END %]
889                 </span>
890                 [% IF previssue.renewsallowed && previssue.renewsleft && !previssue.renew_error_too_soon %]
891                     <span class="renewals">([% previssue.renewsleft %] of [% previssue.renewsallowed %] renewals remaining)</span>
892                 [% END %]
893                 <span class="renewals-disabled">
894             [% END %]
895             [% IF ( previssue.renew_error_on_reserve ) %]
896                 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On Hold</a>
897             [% ELSIF ( previssue.renew_error_too_many ) %]
898                 Not renewable
899             [% ELSIF ( previssue.renew_error_too_soon ) %]
900                 No renewal before [% previssue.soonestrenewdate %]
901                 <span class="renewals">([% previssue.renewsleft %] of [% previssue.renewsallowed %] renewals remaining)</span>
902             [% END %]
903             [% IF ( previssue.can_confirm ) %]
904                 </span>
905             [% END %]
906         [% END %]
907         </td>
908         [% END %]
909                   [% IF ( previssue.return_failed ) %]
910             <td class="problem">Check-in failed</td>
911         [% ELSE %]
912             [% IF ( previssue.renew_error_on_reserve ) %]
913                <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On hold</a>
914                 <input type="checkbox" name="all_barcodes[]" value="[% previssue.barcode %]" checked="checked" style="display: none;" />
915                 </td>
916             [% ELSE %]
917             <td><input type="checkbox" class="radio" name="barcodes[]"  value="[% previssue.barcode %]" />
918                 <input type="checkbox" name="all_barcodes[]" value="[% previssue.barcode %]" checked="checked" style="display: none;" />
919             </td>
920             [% END %]
921         [% END %]
922         [% IF ( exports_enabled ) %]
923           <td style="text-align:center;">
924             <input type="checkbox" id="export_[% previssue.biblionumber %]" name="biblionumbers" value="[% previssue.biblionumber %]" />
925             <input type="checkbox" name="itemnumbers" value="[% previssue.itemnumber %]" style="visibility:hidden;" />
926           </td>
927         [% END %]
928     </tr>
929     <!-- /loop previssues -->[% END %]
930 <!--/if previssues -->[% END %]
931       </tbody>
932     </table>
933     [% IF ( issuecount ) %]
934     <fieldset class="action">
935         [% IF ( CAN_user_circulate_override_renewals ) %]
936         [% IF ( AllowRenewalLimitOverride ) %]
937         <label for="override_limit">Override renewal limit:</label>
938         <input type="checkbox" name="override_limit" id="override_limit" value="1" />
939         [% END %]
940         [% END %]
941         <input type="submit" name="renew_checked" value="Renew or Return checked items" />
942         <input type="submit" id="renew_all" name="renew_all" value="Renew all" />
943     </fieldset>
944         [% IF ( exports_enabled ) %]
945             <fieldset>
946             <label for="export_formats"><b>Export checkouts using format:</b></label>
947             <select name="export_formats" id="export_formats">
948                 <option value="iso2709_995">ISO2709 with items</option>
949                 <option value="iso2709">ISO2709 without items</option>
950                 [% IF ( export_with_csv_profile ) %]
951                     <option value="csv">CSV</option>
952                 [% END %]
953
954             </select>
955            <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" />
956             <input type="hidden" name="op" value="export" />
957             <input type="hidden" id="export_format" name="format" value="iso2709" />
958             <input type="hidden" id="dont_export_item" name="dont_export_item" value="0" />
959             <input type="hidden" id="record_type" name="record_type" value="bibs" />
960             <input type="button" id="export_submit" value="Export" />
961             </fieldset>
962         [% END %]
963     [% END %]
964     </form>
965 [% ELSE %]
966 <p>Patron has nothing checked out.</p>
967 [% END %]
968
969 </div>
970
971
972 [% IF ( displayrelissues ) %]
973 <div id="relissues">
974     <table id="relissuest">
975     <thead>
976     <tr>
977         <th scope="col" class="title-string">Due date</th>
978         <th scope="col" class="anti-the">Title</th>
979         <th scope="col">Item type</th>
980         <th scope="col" class="title-string">Checked out on</th>
981         <th scope="col">Checked out from</th>
982         <th scope="col">Call no</th>
983         <th scope="col">Charge</th>
984         <th scope="col">Price</th>
985         <th scope="col" class="html-content">Patron</th>
986     </tr>
987     </thead>
988 [% IF ( relissues ) %]  <tbody>
989
990     [% FOREACH relissue IN relissues %]
991     [% IF ( loop.odd ) %]
992     <tr>
993     [% ELSE %]
994     <tr class="highlight">
995     [% END %]
996         [% IF ( relissue.overdue ) %]<td class="od">[% ELSE %]<td>[% END %]
997             <span title="[% relissue.dd_sort %]">[% relissue.dd %]</span></td>
998
999             [% IF ( relissue.itemlost ) %]
1000                 <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', relissue.itemlost ) %]</span>
1001             [% END %]
1002             [% IF ( relissue.damaged ) %]
1003                 <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', relissue.damaged ) %]</span>
1004             [% END %]
1005         </td>
1006         <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relissue.biblionumber %]&amp;type=intra"><strong>[% relissue.title |html %][% FOREACH subtitl IN relissue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- <span class="circ-hlt">[% relissue.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% relissue.biblionumber %]&amp;itemnumber=[% relissue.itemnumber %]#item[% relissue.itemnumber %]">[% relissue.barcode %]</a></td>
1007         <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %]<img src="[% relissue.itemtype_image %]" alt="" />[% END %][% END %][% relissue.itemtype %]</td>
1008         <td><span title="[% relissue.displaydate_sort %]">[% relissue.displaydate %]</span></td>
1009         <td>[% relissue.issuingbranchname %]</td>
1010         <td>[% relissue.itemcallnumber %]</td>
1011         <td>[% relissue.charge %]</td>
1012         <td>[% relissue.replacementprice %]</td><td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relissue.borrowernumber %]">[% relissue.firstname %] [% relissue.surname %] ([% relissue.cardnumber %])</a></td>
1013      </tr>
1014     [% END %] <!-- /loop relissues -->
1015     <!-- /if relissues -->[% END %]
1016 [% IF ( relprevissues ) %]
1017     [% IF ( UseTablesortForCirc ) %]<tr id="relprevious"><th><span title="">Previous checkouts</span></th><th></th><th></th><th><span title=""></span></th><th></th><th></th><th></th><th></th><th></th></tr>[% ELSE %]<tr id="relprevious"><th colspan="9">Previous checkouts</th></tr>[% END %]
1018     [% FOREACH relprevissue IN relprevissues %]
1019     [% IF ( loop.odd ) %]
1020         <tr>
1021     [% ELSE %]
1022         <tr class="highlight">
1023     [% END %]
1024         [% IF ( relprevissue.overdue ) %]<td class="od">[% ELSE %]<td>[% END %]
1025         <span title="[% relprevissue.dd_sort %]">[% relprevissue.dd %]</span>
1026         </td>
1027         <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relprevissue.biblionumber %]&amp;type=intra"><strong>[% relprevissue.title |html %][% FOREACH subtitl IN relprevissue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% relprevissue.biblionumber %]&amp;itemnumber=[% relprevissue.itemnumber %]#item[% relprevissue.itemnumber %]">[% relprevissue.barcode %]</a></td>
1028         <td>[% UNLESS noItemTypeImages %][% IF relprevissue.itemtype_image %]<img src="[% relprevissue.itemtype_image %]" alt="" />[% END %][% END %][% relprevissue.itemtype %]</td>
1029         <td><span title="[% relprevissue.displaydate_sort %]">[% relprevissue.displaydate %]</span></td>
1030         <td>[% relprevissue.issuingbranchname %]</td>
1031         <td>[% relprevissue.itemcallnumber %]</td>
1032         [% IF ( relprevissue.multiple_borrowers ) %]<td>[% relprevissue.firstname %] [% relprevissue.surname %]</td>[% END %]
1033         <td>[% relprevissue.charge %]</td>
1034         <td>[% relprevissue.replacementprice %]</td>
1035         <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relprevissue.borrowernumber %]">[% relprevissue.firstname %] [% relprevissue.surname %] ([% relprevissue.cardnumber %])</a></td>
1036
1037     </tr>
1038     <!-- /loop relprevissue -->[% END %]
1039 <!--/if relprevissues -->[% END %]
1040       </tbody>
1041     </table>
1042
1043 </div>
1044 [% END %]<!-- end displayrelissues -->
1045
1046 [% INCLUDE borrower_debarments.inc %]
1047
1048 <div id="reserves">
1049 [% IF ( reservloop ) %]
1050     <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
1051         <input type="hidden" name="from" value="circ" />
1052     <table id="holdst">
1053         <thead><tr>
1054             <th>Hold date</th>
1055             <th>Title</th>
1056             <th>Call number</th>
1057             <th>Barcode</th>
1058             <th>Expiration</th>
1059             <th>Priority</th>
1060             <th>Delete?</th>
1061             <th>&nbsp;</th>
1062         </tr></thead>
1063                 <tbody>
1064         [% FOREACH reservloo IN reservloop %]
1065         <tr class="[% reservloo.color %]">
1066                     <td>[% reservloo.reservedate %]</td>
1067                     <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% reservloo.biblionumber %]"><strong>[% reservloo.title |html %][% FOREACH subtitl IN reservloo.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( reservloo.author ) %], by [% reservloo.author %][% END %]</td>
1068                     <td>[% reservloo.itemcallnumber %]</td>
1069                                         <td><em>[% IF ( reservloo.barcodereserv ) %]Item [% reservloo.barcodereserv %]
1070                         [% END %][% IF ( reservloo.waiting ) %] <strong>waiting at [% reservloo.waitingat %]</strong>
1071                         [% END %]
1072                         [% IF ( reservloo.transfered ) %] <strong>in transit</strong> from
1073                         [% reservloo.frombranch %] since [% reservloo.datesent %]
1074                         [% END %]
1075                         [% IF ( reservloo.nottransfered ) %] hasn't been transferred yet from [% reservloo.nottransferedby %]</i>
1076                         [% END %]</em></td>
1077                     <td>[% reservloo.expirationdate | $KohaDates %]</td>
1078                     <td>
1079                         [% IF ( reservloo.waitingposition ) %]<b> [% reservloo.waitingposition %] </b>[% END %]
1080                     </td>
1081                                 <td><select name="rank-request">
1082                     <option value="n">No</option>
1083                     <option value="del">Yes</option>
1084                 </select>
1085                 <input type="hidden" name="biblionumber" value="[% reservloo.biblionumber %]" />
1086                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
1087                 <input type="hidden" name="reserve_id" value="[% reservloo.reserve_id %]" />
1088             </td>
1089             <td>[% IF ( reservloo.suspend ) %]Suspended [% IF ( reservloo.suspend_until ) %] until [% reservloo.suspend_until | $KohaDates %][% END %][% END %]</td>
1090             </tr>
1091         [% END %]</tbody>
1092     </table>
1093             <fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel marked holds" /></fieldset>
1094     </form>
1095
1096     [% IF SuspendHoldsIntranet %]
1097     <fieldset class="action">
1098         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
1099             <input type="hidden" name="from" value="circ" />
1100             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
1101             <input type="submit" value="Suspend all holds" />
1102
1103             [% IF AutoResumeSuspendedHolds %]
1104             <label for="suspend_until">until</label>
1105             <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker" />
1106             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
1107              [% END %]
1108         </form>
1109     </fieldset>
1110
1111     <fieldset class="action">
1112         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
1113             <input type="hidden" name="from" value="circ" />
1114             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
1115             <input type="hidden" name="suspend" value="0" />
1116             <input type="submit" value="Resume all suspended holds" />
1117         </form>
1118     </fieldset>
1119     [% END # IF SuspendHoldsIntranet %]
1120
1121 [% ELSE %]
1122         <p>Patron has nothing on hold.</p>
1123 [% END %]
1124 </div> <!-- reservesloop -->
1125
1126 [% END %] <!-- borrowernumber -->
1127 </div></div>
1128 [% END %]
1129
1130
1131
1132 </div>
1133 </div>
1134 [% UNLESS ( CGIselectborrower ) %][% IF ( borrowernumber ) %]<div class="yui-b">
1135 [% INCLUDE 'circ-menu.inc' %]
1136 </div>[% END %][% END %]
1137 </div>
1138 [% INCLUDE 'intranet-bottom.inc' %]