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