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