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