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