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