Merge remote-tracking branch 'origin/new/bug_8382'
[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 checkouts"),
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 define a csv profile for export (in tools>CSV export profiles) and fill 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
368 [% IF  HIGHHOLDS %]
369         <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
370 [% END %]
371 </ul>
372
373 [% IF HIGHHOLDS %]
374         <script language="JavaScript" type="text/javascript">
375         $(document).ready(function() {
376                 $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]');
377         });
378         </script>
379 [% END %]
380 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
381
382 [% IF ( RESERVED ) %]
383     <p>
384     <input type="checkbox" id="cancelreserve" name="cancelreserve" value="1" />
385     <label for="cancelreserve">Cancel hold</label>
386     </p>
387 [% END %]
388
389 [% IF ( RESERVE_WAITING ) %]
390     <p>
391     <input type="checkbox" id="cancelreserve" name="cancelreserve" value="1" />
392     <label for="cancelreserve">Cancel hold</label>
393     </p>
394 [% END %]
395
396     <input type="hidden" name="barcode" value="[% barcode %]" />
397     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
398     <input type="hidden" name="issueconfirmed" value="1" />
399     [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
400     [% IF ( INVALID_DATE ) %]
401     <p>
402     <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
403     <label for="duedatespec">Due date</label>
404     </p>
405     [% ELSE %]
406     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
407     [% END %]
408     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
409     <input type="hidden" name="branch" value="[% branch %]" />
410     [% IF ( RENEW_ISSUE ) %]
411     <input type="submit" class="approve" value="Yes, Renew (Y)" accesskey="y" />
412     [% ELSE %]
413     <input type="submit" class="approve" value="Yes, Check Out (Y)" accesskey="y" />
414     [% END %]
415 </form>
416
417 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
418     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
419     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
420     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
421     [% IF ( RENEW_ISSUE ) %]
422     <input type="submit" class="deny" value="No, Don't Renew (N)" accesskey="n" />
423     [% ELSE %]
424     <input type="submit" class="deny" value="No, Don't Check Out (N)" accesskey="n" />
425     [% END %]
426 </form>
427
428 </div></div>
429 [% END %] <!-- NEEDSCONFIRMATION -->
430
431         [% IF ( IMPOSSIBLE ) %]
432
433 [% IF ( soundon ) %]
434 <audio src="/intranet-tmpl/prog/sound/critical.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
435 [% END %]        
436
437 <div class="yui-g">
438 <div id="circ_impossible" class="dialog alert">
439 <!-- RESULT OF ISSUING REQUEST -->
440         <ul>
441         [% IF ( STATS ) %]
442             <li>Local use recorded</li>
443         [% END %]
444
445         [% IF ( INVALID_DATE ) %]
446             <li>The due date &quot;[% INVALID_DATE %]&quot; is invalid</li>
447         [% END %]
448
449         [% IF ( UNKNOWN_BARCODE ) %]
450             <li>The barcode was not found [% barcode %]</li>
451             [% IF ( fast_cataloging ) %]
452                 [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
453                     <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>
454                 [% END %]
455             [% END %]
456         [% END %]
457
458         [% IF ( NOT_FOR_LOAN ) %]
459             <li>Item not for loan</li>
460         [% END %]
461
462         [% IF ( WTHDRAWN ) %]
463             <li>Item has been withdrawn</li>
464         [% END %]
465
466         [% IF ( RESTRICTED ) %]
467             <li>Item is restricted</li>
468         [% END %]
469
470         [% IF ( GNA ) %]
471             <li>Patron's address is in doubt</li>
472         [% END %]
473
474         [% IF ( CARD_LOST ) %]
475             <li>Patron's card is lost</li>
476         [% END %]
477
478         [% IF ( DEBARRED ) %]
479             <li>Patron is restricted</li>
480         [% END %]
481
482         [% IF ( NO_MORE_RENEWALS ) %]
483             <li>No more renewals possible</li>
484         [% END %]
485
486         [%IF ( AGE_RESTRICTION ) %]
487             <li>Age restriction [% AGE_RESTRICTION %].</li>
488         [% END %]
489
490         [% IF ( EXPIRED ) %]
491             <li>Patron's card is expired</li>
492         [% END %]
493
494         [% IF ( ITEMNOTSAMEBRANCH ) %]
495             <li>This item belongs to [% itemhomebranch %] and cannot be issued from this location.</li>
496         [% END %]
497
498         [% IF ( USERBLOCKEDREMAINING ) %]
499             <li>Patron has had overdue items and is blocked for [% USERBLOCKEDREMAINING %] day(s).</li>
500         [% END %]
501         
502             [% IF ( USERBLOCKEDOVERDUE ) %]
503             <li>Checkouts are BLOCKED because patron has overdue items</li>
504         [% END %]
505         </ul>
506
507 </div></div>
508 [% ELSE %]
509 [% IF ( soundon ) %]
510 <audio src="/intranet-tmpl/prog/sound/beep.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
511 [% END %]
512     [% END %] <!-- /impossible -->
513
514 [% IF ( issued ) %]
515 <p>Item checked out</p>
516 [% END %]
517
518 [% IF ( message ) %]
519 [% INCLUDE 'patron-toolbar.inc' %]
520 <h4>
521 No patron matched <span class="ex">[% message %]</span>
522 </h4>
523 [% END %]
524
525
526 [% IF ( CGIselectborrower ) %]
527 [% INCLUDE 'patron-toolbar.inc' %]
528
529 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
530 <fieldset id="circ_circulation_selectborrower" class="brief">
531     <legend>Patron selection</legend>
532
533     <input type="hidden" name="branch" value="[% branch %]" />
534     <input type="hidden" name="printer" value="[% printer %]" />
535     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
536     <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
537
538 <ol>    <li>
539     <label for="borrowernumber">Select a patron: </label>
540     [% CGIselectborrower %]
541     </li>
542 </ol>
543 <p><input type="submit" value="Select" /></p>
544 </fieldset>
545 </form>
546 [% ELSE %] <!-- CGIselectborrower -->
547
548 <!-- BARCODE ENTRY -->
549
550 [% IF ( borrowernumber ) %]
551 <div class="yui-g">
552 [% UNLESS ( noissues ) %]
553 [% IF ( flagged ) %]
554 <div class="yui-u first">
555 [% ELSE %]
556 <div>
557
558 [% END %]
559
560
561 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
562 <fieldset id="circ_circulation_issue">
563     [% IF ( DisplayClearScreenButton ) %]
564         <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
565     [% END %]
566
567     <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
568
569         <div class="hint">Enter item barcode:</div>
570
571     [% IF ( NEEDSCONFIRMATION ) %]
572             <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
573     [% ELSE %]
574             <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
575     [% END %]
576     <input type="submit" value="Check Out" />
577
578     [% IF ( SpecifyDueDate ) %]<div class="date-select">
579         <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
580         [% IF ( duedatespec ) %]<input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />[% ELSE %]<input type="text" size="13" id="duedatespec" name="duedatespec" value="" />
581 [% END %]
582           <label for="stickyduedate"> Remember for session:</label>
583 [% IF ( stickyduedate ) %]
584 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
585 [% ELSE %]
586 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
587 [% END %]
588           <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;" />
589 </div>[% END %]
590           <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
591           <input type="hidden" name="branch" value="[% branch %]" />
592           <input type="hidden" name="printer" value="[% printer %]" />
593           <input type="hidden" name="print" value="maybe" />
594           <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
595                 [% IF ( CHARGES ) %]
596                         <input type="hidden" name="charges" value="yes" />
597                         <input type="hidden" name="oldamount" value="[% amountold %]" />
598                 [% END %]
599 </fieldset>
600 </form></div>[% END %]<!-- /unless noissues -->
601
602 [% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
603
604     [% IF ( flagged ) %]
605                 [% IF ( noissues ) %]
606                 <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
607         <div id="circmessages" class="circmessage warning">
608                 [% ELSE %]
609         <div id="circmessages" class="circmessage attention">
610                 [% END %]
611
612                 <h3>[% IF ( noissues ) %]
613                         Cannot check out!
614                 [% ELSE %]Attention:[% END %]</h3>
615                 <ul>
616
617                         [% IF ( warndeparture ) %]
618                         <li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
619                         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>
620
621                         </li>
622                         [% END %]
623
624                         [% IF ( returnbeforeexpiry ) %]
625                          <li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
626                          expiry date is before the date due, the date due will be set to the expiry date
627                          </li>
628                         [% END %]
629
630                         [% IF ( expired ) %]
631                         <li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
632                         [% 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>
633
634                         </li>
635                         [% END %]
636
637             [% IF ( gna ) %]
638                         <li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
639                         [% END %]
640
641             [% IF ( lost ) %]
642                         <li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
643                         [% END %]
644
645             [% IF ( userdebarred ) %]
646                <li class="blocker">
647                <span class="circ-hlt"> Restricted:</span> Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %] with the comment "[% debarredcomment %]"[% END %]
648                <form class="inline compact" action="/cgi-bin/koha/members/setstatus.pl" method="post">
649                         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
650                         <input type="hidden" name="destination" value="circ" />
651                         <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
652                         <input type="submit" value="Lift restriction" />
653                </form>
654                         </li>[% END %]
655
656                 [% 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>
657             [% END %]
658
659                 [% IF ( charges ) %]
660                             <li>
661             <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>.
662                 [% IF ( charges_is_blocker ) %]
663                     Checkouts are <span class="circ-hlt">BLOCKED</span> because fine balance is <span class="circ-hlt">OVER THE LIMIT</span>.
664                 [% END %]
665             Make <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">Payment</a></li>
666                         [% END %]
667
668                 [% IF ( credits ) %]
669                         <li>
670                 <span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount %][% END %]
671             </li>
672                         [% END %]
673
674
675
676                         </ul>
677         </div>
678
679                         [% IF ( WaitingReserveLoop ) %]
680                         <div id="holdswaiting" class="circmessage">
681                     <h4>Holds waiting:</h4>
682                                 [% FOREACH WaitingReserveLoo IN WaitingReserveLoop %]
683                                     <ul>
684                                         <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 %].
685                                     [% IF ( WaitingReserveLoo.waitingat ) %]
686                                         <br />[% IF ( WaitingReserveLoo.waitinghere ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]Waiting at [% WaitingReserveLoo.waitingat %]</strong>
687                                     [% END %]
688                                         </li>
689                                     </ul>
690                             [% END %]
691                         </div>
692                         <!-- /If WaitingReserveLoop -->[% END %]
693         [% IF ( notes ) %]
694                         <div id="circnotes" class="circmessage">
695                         <h4>Notes:</h4>
696             <p><span class="circ-hlt">[% notesmsg %]</span></p>
697                         </div>
698
699
700     <!-- /If notes -->[% END %]
701
702         <div id="messages" class="circmessage">
703                 <h4>Messages:</h4>
704                 <ul>
705                         [% FOREACH lib_messages_loo IN lib_messages_loop %]
706                                 <li>
707                                         <span class="circ-hlt">
708                                                 [% lib_messages_loo.message_date_formatted %]
709                                                 [% lib_messages_loo.branchcode %]
710                                                 <i>"[% lib_messages_loo.message %]"</i>
711                                         </span>
712                                         [% IF ( lib_messages_loo.can_delete ) %]
713                                                 <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
714                                         [% ELSE %]
715                                                 [% IF ( all_messages_del ) %]
716                                                         <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
717                                                 [% END %]
718                                         [% END %]
719                                 </li>
720                         [% END %]
721                         [% FOREACH bor_messages_loo IN bor_messages_loop %]
722                                 <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>
723                 [% ELSIF ( all_messages_del ) %]
724                     <a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
725                 [% END %]</li>
726                         [% END %]
727
728                 </ul>
729         </div>  
730         
731      <!-- /If flagged -->[% END %]
732
733         
734
735 </div>
736 </div>
737
738 <div class="yui-g"><div id="patronlists" class="toptabs">
739
740 <ul>
741 <li>    [% IF ( issuecount ) %]
742             <a href="#checkouts">[% issuecount %] Checkout(s)</a>
743     [% ELSE %]
744             <a href="#checkouts">0 Checkouts</a>
745     [% END %]</li>
746 [% IF ( displayrelissues ) %]
747 <li><a href="#relissues">Relatives' checkouts</a></li>
748 [% END %]
749 <li>[% IF ( countreserv ) %]
750             <a href="#reserves">[% countreserv %] Hold(s)</a>
751     [% ELSE %]
752             <a href="#reserves">0 Holds</a>
753     [% END %]</li>
754
755 </ul>
756
757 <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
758 <div id="checkouts">
759 [% IF ( issuecount ) %]
760     <form name="issues" action="/cgi-bin/koha/reserve/renewscript.pl" method="post" class="checkboxed">
761     <input type="hidden" value="circ" name="destination" />
762     <input type="hidden" name="cardnumber" value="[% cardnumber %]" />
763     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
764     <input type="hidden" name="branch" value="[% branch %]" />
765         <table id="issuest">
766     <thead><tr>
767         <th scope="col">Due date</th>
768         <th scope="col">Title</th>
769         <th scope="col">Item type</th>
770         <th scope="col">Checked out on</th>
771         <th scope="col">Checked out from</th>
772         <th scope="col">Call no</th>
773         <th scope="col">Charge</th>
774         <th scope="col">Price</th>
775         <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllitems">select all</a> | <a href="#" id="CheckNoitems">none</a></p></th>
776         <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllreturns">select all</a> | <a href="#" id="CheckNoreturns">none</a></p></th>
777         [% IF export_remove_fields OR export_with_csv_profile %]
778           <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllexports">select all</a> | <a href="#" id="CheckNoexports">none</a></p></th>
779         [% END %]
780     </tr>
781 [% IF ( todayissues ) %]</thead>
782 [% INCLUDE 'checkouts-table-footer.inc' %]
783         <tbody>
784
785     [% FOREACH todayissue IN todayissues %]
786     [% IF ( loop.odd ) %]
787     <tr>
788     [% ELSE %]
789     <tr class="highlight">
790     [% END %]
791         [% IF ( todayissue.od ) %]<td class="od">[% ELSE %]<td>[% END %]
792         [% todayissue.dd %]
793         </td>
794         <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>
795         <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %]<img src="[% todayissue.itemtype_image %]" alt="" />[% END %][% END %][% todayissue.itemtype %]</td>
796         <td>[% todayissue.checkoutdate %]</td>
797         [% IF ( todayissue.multiple_borrowers ) %]<td>[% todayissue.firstname %] [% todayissue.surname %]</td>[% END %]
798         <td>[% todayissue.issuingbranchname %]</td>
799         <td>[% todayissue.itemcallnumber %]</td>
800             <td>[% todayissue.charge %]</td>
801             <td>[% todayissue.replacementprice %]</td>
802       [% IF ( todayissue.renew_failed ) %]
803             <td class="problem">Renewal failed</td>
804       [% ELSE %]
805         <td><span style="padding: 0 1em;">[% IF ( todayissue.renewals ) %][% todayissue.renewals %][% ELSE %]0[% END %]</span>
806         [% IF ( todayissue.can_renew ) %]
807         <input type="checkbox" name="all_items[]" value="[% todayissue.itemnumber %]" checked="checked" style="display: none;" />
808         [% IF ( todayissue.od ) %]
809             <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" checked="checked" />
810         [% ELSE %]
811             <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" />
812         [% END %]
813         [% ELSE %]
814             [% IF ( todayissue.can_confirm ) %]<span class="renewals-allowed" style="display: none">
815                 <input type="checkbox" name="all_items[]" value="[% todayissue.itemnumber %]" checked="checked" style="display: none;" />
816                 [% IF ( todayissue.od ) %]
817                     <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" checked="checked" />
818                 [% ELSE %]
819                     <input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" />
820                 [% END %]
821                 </span>
822                 <span class="renewals-disabled">
823             [% END %]
824                 [% IF ( todayissue.renew_error_on_reserve ) %]
825             <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On hold</a>
826                 [% END %]
827                 [% IF ( todayissue.renew_error_too_many ) %]
828             Not renewable
829                 [% END %]
830             [% IF ( todayissue.can_confirm ) %]
831                 </span>
832             [% END %]
833         [% END %]
834         </td>
835         [% END %]
836         [% IF ( todayissue.return_failed ) %]
837             <td class="problem">Checkin failed</td>
838         [% ELSE %]
839             [% IF ( todayissue.renew_error_on_reserve ) %]
840                <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On hold</a>
841                 <input type="checkbox" name="all_barcodes[]" value="[% todayissue.barcode %]" checked="checked" style="display: none;" />
842                 </td>
843             [% ELSE %]
844             <td><input type="checkbox" class="radio" name="barcodes[]"  value="[% todayissue.barcode %]" />
845                 <input type="checkbox" name="all_barcodes[]" value="[% todayissue.barcode %]" checked="checked" style="display: none;" />
846             </td>
847             [% END %]
848         [% END %]
849         [% IF export_remove_fields OR export_with_csv_profile %]
850           <td style="text-align:center;">
851             <input type="checkbox" id="export_[% todayissue.biblionumber %]" name="biblionumbers" value="[% todayissue.biblionumber %]" />
852             <input type="checkbox" name="itemnumbers" value="[% todayissue.itemnumber %]" style="visibility:hidden;" />
853           </td>
854         [% END %]
855     </tr>
856     [% END %] <!-- /loop todayissues -->
857     <!-- /if todayissues -->[% END %]
858 [% IF ( previssues ) %]
859 [% IF ( todayissues ) %]<tr><th colspan="11"><a name="previous" id="previous"></a>Previous checkouts</th></tr>[% ELSE %]
860 <tr><th class="{sorter: false}" colspan="11"><a name="previous" id="previous"></a>Previous checkouts</th></tr></thead>
861 [% INCLUDE 'checkouts-table-footer.inc' %]
862         <tbody>
863 [% END %]
864     [% FOREACH previssue IN previssues %]
865     [% IF ( loop.odd ) %]
866         <tr>
867     [% ELSE %]
868         <tr class="highlight">
869     [% END %]
870         [% IF ( previssue.od ) %]<td class="od">[% ELSE %]<td>[% END %]
871         [% previssue.dd %]
872         </td>
873         <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>
874         <td>
875             [% previssue.itemtype %]
876         </td>
877         <td>[% previssue.displaydate %]</td>
878         [% IF ( previssue.multiple_borrowers ) %]<td>[% previssue.firstname %] [% previssue.surname %]</td>[% END %]
879         <td>[% previssue.issuingbranchname %]</td>
880         <td>[% previssue.itemcallnumber %]</td>
881         <td>[% previssue.charge %]</td>
882         <td>[% previssue.replacementprice %]</td>
883       [% IF ( previssue.renew_failed ) %]
884             <td class="problem">Renewal failed</td>
885       [% ELSE %]
886         <td><span style="padding: 0 1em;">[% IF ( previssue.renewals ) %][% previssue.renewals %][% ELSE %]0[% END %]</span>
887         [% IF ( previssue.can_renew ) %]
888         <input type="checkbox" name="all_items[]" value="[% previssue.itemnumber %]" checked="checked" style="display: none;" />
889         [% IF ( previssue.od ) %]
890             <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" checked="checked" />
891         [% ELSE %]
892             <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" />
893         [% END %]
894         [% ELSE %]
895             [% IF ( previssue.can_confirm ) %]<span class="renewals-allowed" style="display: none">
896                 <input type="checkbox" name="all_items[]" value="[% previssue.itemnumber %]" checked="checked" style="display: none;" />
897                 [% IF ( previssue.od ) %]
898                     <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" checked="checked" />
899                 [% ELSE %]
900                     <input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" />
901                 [% END %]
902                 </span>
903                 <span class="renewals-disabled">
904             [% END %]
905                 [% IF ( previssue.renew_error_on_reserve ) %]
906             <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On hold</a>
907                 [% END %]
908                 [% IF ( previssue.renew_error_too_many ) %]
909             Not renewable
910                 [% END %]
911             [% IF ( previssue.can_confirm ) %]
912                 </span>
913             [% END %]
914         [% END %]
915         </td>
916         [% END %]
917                   [% IF ( previssue.return_failed ) %]
918             <td class="problem">Check-in failed</td>
919         [% ELSE %]
920             [% IF ( previssue.renew_error_on_reserve ) %]
921                <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On hold</a>
922                 <input type="checkbox" name="all_barcodes[]" value="[% previssue.barcode %]" checked="checked" style="display: none;" />
923                 </td>
924             [% ELSE %]
925             <td><input type="checkbox" class="radio" name="barcodes[]"  value="[% previssue.barcode %]" />
926                 <input type="checkbox" name="all_barcodes[]" value="[% previssue.barcode %]" checked="checked" style="display: none;" />
927             </td>
928             [% END %]
929         [% END %]
930         [% IF export_remove_fields OR export_with_csv_profile %]
931           <td style="text-align:center;">
932             <input type="checkbox" id="export_[% previssue.biblionumber %]" name="biblionumbers" value="[% previssue.biblionumber %]" />
933             <input type="checkbox" name="itemnumbers" value="[% previssue.itemnumber %]" style="visibility:hidden;" />
934           </td>
935         [% END %]
936     </tr>
937     <!-- /loop previssues -->[% END %]
938 <!--/if previssues -->[% END %]
939       </tbody>
940     </table>
941     [% IF ( issuecount ) %]
942     <fieldset class="action">
943         [% IF ( CAN_user_circulate_override_renewals ) %]
944         [% IF ( AllowRenewalLimitOverride ) %]
945         <label for="override_limit">Override renewal limit:</label>
946         <input type="checkbox" name="override_limit" id="override_limit" value="1" />
947         [% END %]
948         [% END %]
949         <input type="submit" name="renew_checked" value="Renew or Return checked items" />
950         <input type="submit" id="renew_all" name="renew_all" value="Renew all" />
951         [% IF export_remove_fields OR export_with_csv_profile %]
952             <br/><br/>
953             Don't export fields : <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% export_remove_fields %]" title="Use for iso2709 exports" />
954             <span id="exportmenuc">Export</span>
955             <input type="hidden" name="op" value="export" />
956             <input type="hidden" id="export_format" name="format" value="iso2709" />
957             <input type="hidden" id="dont_export_item" name="dont_export_item" value="0" />
958             <input type="hidden" id="record_type" name="record_type" value="bibs" />
959         [% END %]
960     </fieldset>
961     [% END %]
962     </form>
963 [% ELSE %]
964 <p>Patron has nothing checked out.</p>
965 [% END %]
966
967 </div>
968
969
970 [% IF ( displayrelissues ) %]
971 <div id="relissues">
972     <table id="relissuest">
973     <thead>
974     <tr>
975         <th scope="col">Due date</th>
976         <th scope="col">Title</th>
977         <th scope="col">Item type</th>
978         <th scope="col">Checked out on</th>
979         <th scope="col">Checked out from</th>
980         <th scope="col">Call no</th>
981         <th scope="col">Charge</th>
982         <th scope="col">Price</th>
983         <th scope="col">Patron</th>
984     </tr>
985     </thead>
986 [% IF ( relissues ) %]  <tbody>
987
988     [% FOREACH relissue IN relissues %]
989     [% IF ( loop.odd ) %]
990     <tr>
991     [% ELSE %]
992     <tr class="highlight">
993     [% END %]
994         [% IF ( relissue.overdue ) %]<td class="od">[% ELSE %]<td>[% END %]
995             [% relissue.dd %]</td>
996         <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>
997         <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %]<img src="[% relissue.itemtype_image %]" alt="" />[% END %][% END %][% relissue.itemtype %]</td>
998         <td>[% relissue.displaydate %]</td>
999         <td>[% relissue.issuingbranchname %]</td>
1000         <td>[% relissue.itemcallnumber %]</td>
1001         <td>[% relissue.charge %]</td>
1002         <td>[% relissue.replacementprice %]</td><td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relissue.borrowernumber %]">[% relissue.firstname %] [% relissue.surname %] ([% relissue.cardnumber %])</a></td>
1003      </tr>
1004     [% END %] <!-- /loop relissues -->
1005     <!-- /if relissues -->[% END %]
1006 [% IF ( relprevissues ) %]
1007 <tr><th class="{sorter: false}" colspan="11"><a name="relprevious" id="relprevious"></a>Previous checkouts</th></tr>
1008     [% FOREACH relprevissue IN relprevissues %]
1009     [% IF ( loop.odd ) %]
1010         <tr>
1011     [% ELSE %]
1012         <tr class="highlight">
1013     [% END %]
1014         [% IF ( relprevissue.overdue ) %]<td class="od">[% ELSE %]<td>[% END %]
1015         [% relprevissue.dd %]
1016         </td>
1017         <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>
1018         <td>[% UNLESS noItemTypeImages %][% IF relprevissue.itemtype_image %]<img src="[% relprevissue.itemtype_image %]" alt="" />[% END %][% END %][% relprevissue.itemtype %]</td>
1019         <td>[% relprevissue.displaydate %]</td>
1020         <td>[% relprevissue.issuingbranchname %]</td>
1021         <td>[% relprevissue.itemcallnumber %]</td>
1022         [% IF ( relprevissue.multiple_borrowers ) %]<td>[% relprevissue.firstname %] [% relprevissue.surname %]</td>[% END %]
1023         <td>[% relprevissue.charge %]</td>
1024         <td>[% relprevissue.replacementprice %]</td>
1025         <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relprevissue.borrowernumber %]">[% relprevissue.firstname %] [% relprevissue.surname %] ([% relprevissue.cardnumber %])</a></td>
1026
1027     </tr>
1028     <!-- /loop relprevissue -->[% END %]
1029 <!--/if relprevissues -->[% END %]
1030       </tbody>
1031     </table>
1032
1033 </div>
1034 [% END %]<!-- end displayrelissues -->
1035
1036
1037 <div id="reserves">
1038 [% IF ( reservloop ) %]
1039     <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
1040         <input type="hidden" name="from" value="circ" />
1041     <table id="holdst">
1042         <thead><tr>
1043             <th>Hold date</th>
1044             <th>Title</th>
1045             <th>Call number</th>
1046             <th>Barcode</th>
1047             <th>Priority</th>
1048             <th>Delete?</th>
1049             <th>&nbsp;</th>
1050         </tr></thead>
1051                 <tbody>
1052         [% FOREACH reservloo IN reservloop %]
1053         <tr class="[% reservloo.color %]">
1054                     <td>[% reservloo.reservedate %]</td>
1055                     <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>
1056                     <td>[% reservloo.itemcallnumber %]</td>
1057                                         <td><em>[% IF ( reservloo.barcodereserv ) %]Item [% reservloo.barcodereserv %]
1058                         [% END %][% IF ( reservloo.waiting ) %] <strong>waiting at [% reservloo.waitingat %]</strong>
1059                         [% END %]
1060                         [% IF ( reservloo.transfered ) %] <strong>in transit</strong> from
1061                         [% reservloo.frombranch %] since [% reservloo.datesent %]
1062                         [% END %]
1063                         [% IF ( reservloo.nottransfered ) %] hasn't been transferred yet from [% reservloo.nottransferedby %]</i>
1064                         [% END %]</em></td>
1065                     <td>
1066                         [% IF ( reservloo.waitingposition ) %]<b> [% reservloo.waitingposition %] </b>[% END %]
1067                     </td>
1068                                 <td><select name="rank-request">
1069                     <option value="n">No</option>
1070                     <option value="del">Yes</option>
1071                 </select>
1072                 <input type="hidden" name="biblionumber" value="[% reservloo.biblionumber %]" />
1073                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
1074                 <input type="hidden" name="reservenumber" value="[% reservloo.reservenumber %]" />
1075             </td>
1076             <td>[% IF ( reservloo.suspend ) %]Suspended [% IF ( reservloo.suspend_until ) %] until [% reservloo.suspend_until | $KohaDates %][% END %][% END %]</td>
1077             </tr>
1078         [% END %]</tbody>
1079     </table>
1080             <fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel marked holds" /></fieldset>
1081     </form>
1082
1083     [% IF SuspendHoldsIntranet %]
1084     <fieldset class="action">
1085         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
1086             <input type="hidden" name="from" value="circ" />
1087             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
1088             <input type="submit" value="Suspend all holds" />
1089
1090             [% IF AutoResumeSuspendedHolds %]
1091             <label for="suspend_until">until</label>
1092             <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker" />
1093             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
1094              [% END %]
1095         </form>
1096     </fieldset>
1097
1098     <fieldset class="action">
1099         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
1100             <input type="hidden" name="from" value="circ" />
1101             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
1102             <input type="hidden" name="suspend" value="0" />
1103             <input type="submit" value="Resume all suspended holds" />
1104         </form>
1105     </fieldset>
1106     [% END # IF SuspendHoldsIntranet %]
1107
1108 [% ELSE %]
1109         <p>Patron has nothing on hold.</p>
1110 [% END %]
1111 </div> <!-- reservesloop -->
1112
1113 [% END %] <!-- borrowernumber -->
1114 </div></div>
1115 [% END %]
1116
1117
1118
1119 </div>
1120 </div>
1121 [% UNLESS ( CGIselectborrower ) %][% IF ( borrowernumber ) %]<div class="yui-b">
1122 [% INCLUDE 'circ-menu.inc' %]
1123 </div>[% END %][% END %]
1124 </div>
1125 [% INCLUDE 'intranet-bottom.inc' %]