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