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