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