Bug 11486: Don't display the number of remaining renewals if == 0
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / moremember.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Patrons &rsaquo;
4 [% IF ( unknowuser ) %]
5     Patron does not exist
6 [% ELSE %]
7     Patron details for [% INCLUDE 'patron-title.inc' %]
8 [% END %]
9 </title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 [% INCLUDE 'calendar.inc' %]
12 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/en/css/datatables.css" />
13 <script type="text/javascript" src="[% interface %]/[% theme %]/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
14 [% INCLUDE 'datatables-strings.inc' %]
15 <script type="text/javascript" src="[% interface %]/[% theme %]/en/js/datatables.js"></script>
16 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
17 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script>
18 <script type="text/JavaScript">
19 //<![CDATA[
20 $(document).ready(function() {
21     $('#finesholdsissues').tabs({
22         // Correct table sizing for tables hidden in tabs
23         // http://www.datatables.net/examples/api/tabs_and_scrolling.html
24         "show": function(event, ui) {
25             var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable();
26             if ( oTable.length > 0 ) {
27                 oTable.fnAdjustColumnSizing();
28             }
29         }
30     } );
31     $("#issuest").dataTable($.extend(true, {}, dataTablesDefaults, {
32         "sDom": 't',
33         "aoColumnDefs": [
34             { "aTargets": [ -1,-2 ], "bSortable": false, "bSearchable": false }
35         ],
36         "aoColumns": [
37             { "sType": "title-string" },null,null,{ "sType": "title-string" },null,null,null,null,null,null
38         ],
39         "bPaginate": false
40     }));
41     $("#relissuest").dataTable($.extend(true, {}, dataTablesDefaults, {
42         "sDom": 't',
43         "aoColumns": [
44             { "sType": "title-string" },null,null,{ "sType": "title-string" },null,null,null,null,null
45         ],
46         "bPaginate": false
47     }));
48     $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
49         "sDom": 't',
50         "aoColumnDefs": [
51             { "aTargets": [ -1,-2 ], "bSortable": false, "bSearchable": false }
52         ],
53         "aoColumns": [
54             { "sType": "title-string" },null,null,null,null,null,null,null
55         ],
56         "bPaginate": false
57     }));
58     [% IF ( picture ) %]
59     // new YAHOO.widget.Button("delpicture");   // FIXME: formatting mismatch between YUI and normal button
60         $('#delpicture').click(function(){
61                  return confirm(_("Are you sure you want to delete this patron image? This cannot be undone."));
62         });
63         $('#manage-patron-image').find("input[value*=Upload]").click(function(){
64         if($("#uploadfile").val() == ""){
65             alert(_("Please choose a file to upload"));
66             return false;
67         }
68         return confirm(_("Are you sure you want to replace the current patron image? This cannot be undone."));
69         });[% END %]
70         $("#renew_all"      ).click(function(){ $(".checkboxed").checkCheckboxes(":input[name*=items]"   ); $(".checkboxed").unCheckCheckboxes(":input[name*=barcodes]"); });
71         $("#CheckAllitems"  ).click(function(){ $(".checkboxed").checkCheckboxes(":input[name*=items]"   ); $(".checkboxed").unCheckCheckboxes(":input[name*=barcodes]"); return false; });
72     $("#CheckNoitems"   ).click(function(){ $(".checkboxed").unCheckCheckboxes(":input[name*=items]"); return false; });
73         $("#CheckAllreturns").click(function(){ $(".checkboxed").checkCheckboxes(":input[name*=barcodes]"); $(".checkboxed").unCheckCheckboxes(":input[name*=items]"); return false; });
74     $("#CheckNoreturns" ).click(function(){ $(".checkboxed").unCheckCheckboxes(":input[name*=barcodes]"); return false; });
75
76     $("#relrenew_all"      ).click(function(){ $(".checkboxed").checkCheckboxes(":input[name*=items]"   ); $(".checkboxed").unCheckCheckboxes(":input[name*=barcodes]"); });
77     $("#relCheckAllitems"  ).click(function(){ $(".checkboxed").checkCheckboxes(":input[name*=items]"   ); $(".checkboxed").unCheckCheckboxes(":input[name*=barcodes]"); return false; });
78     $("#relCheckNoitems"   ).click(function(){ $(".checkboxed").unCheckCheckboxes(":input[name*=items]"); return false; });
79     $("#relCheckAllreturns").click(function(){ $(".checkboxed").checkCheckboxes(":input[name*=barcodes]"); $(".checkboxed").unCheckCheckboxes(":input[name*=items]"); return false; });
80     $("#relCheckNoreturns" ).click(function(){ $(".checkboxed").unCheckCheckboxes(":input[name*=barcodes]"); return false; });
81
82
83     [% IF ( CAN_user_circulate_override_renewals ) %]
84     [% IF ( AllowRenewalLimitOverride ) %]
85     $( '#override_limit' ).click( function () {
86         if ( this.checked ) {
87            $( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
88         } else {
89            $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
90         }
91     } ).attr( 'checked', false );
92     [% END %]
93     [% END %]
94         $("td").click(function(e){
95                 if(e.target.tagName.toLowerCase() == 'td'){
96            $(this).find("input:checkbox").each( function() {
97                $(this).attr('checked', !$(this).attr('checked'));
98                            if($(this).attr('checked')){
99                     $(this).parent().siblings().find("input:checkbox").each(function(){
100                        if($(this).attr('checked')){ $(this).removeAttr('checked'); }
101                    });
102                            }
103            });
104                 }
105         });
106     $("#suspend_until").datepicker({ minDate: 1 }); // require that hold suspended until date is after today
107     $("#newduedate").datetimepicker({
108         minDate: 1, // require that renewal date is after today
109         hour: 23,
110         minute: 59
111     });
112  });
113 function uncheck_sibling(me){
114 nodename=me.getAttribute("name");
115 if (nodename =="barcodes[]"){
116     var Node=me.parentNode.previousSibling;
117     while (Node.nodeName!="TD"){Node=Node.previousSibling}
118     var Nodes=Node.childNodes;
119     for (var i=0;i < Nodes.length;i++){
120       if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
121         Nodes[i].checked=false;
122       }     
123    }   
124
125 }else {
126     var Node=me.parentNode.nextSibling;
127     while (Node.nodeName!="TD"){Node=Node.nextSibling}
128     var Nodes=Node.childNodes;
129     for (var i=0;i<Nodes.length;i++){
130       if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
131         Nodes[i].checked=false;
132       }     
133    }   
134 }
135 }
136 function validate1(date) {
137     var today = new Date();
138     if ( date < today ) {
139         return true;
140      } else {
141         return false;
142      }
143 };
144 //]]>
145 </script>
146
147 </head>
148 <body id="pat_moremember" class="pat">
149 [% INCLUDE 'header.inc' %]
150 [% INCLUDE 'patron-search.inc' %]
151
152 <div id="breadcrumbs">
153          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
154 &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
155 &rsaquo; [% IF ( unknowuser ) %]Patron does not exist[% ELSE %]Patron details for [% INCLUDE 'patron-title.inc' %][% END %]
156 </div>
157
158 <div id="doc3" class="yui-t1">
159    
160    <div id="bd">
161         <div id="yui-main">
162         <div class="yui-b">
163 [% INCLUDE 'members-toolbar.inc' %]
164 [% IF ( error ) %]
165 <div class="dialog alert">
166     [% IF ( AUTH_UPDATE_FAILED ) %]
167         <h3>Userid / Password update failed</h3>
168         <strong>Insufficient privileges.</strong>
169         <p>Other fields updated.</p>
170     [% END %]
171     [% IF ( CANT_DELETE_STAFF ) %]
172         <h3>Unable to delete staff user</h3>
173         <p>Insufficient privileges.</p>
174     [% END %]
175     [% IF ( CANT_DELETE_OTHERLIBRARY ) %]
176         <h3>Unable to delete patrons from other libraries with current settings</h3>
177         <p>Insufficient privileges.</p>
178     [% END %]
179     [% IF ( CANT_DELETE ) %]
180         <h3>Unable to delete patron</h3>
181         <p>Insufficient privileges.</p>
182     [% END %]
183 </div>
184 [% END %]
185 <div class="yui-g">
186
187 [% IF ( unknowuser ) %]
188    <div class="dialog message">This patron does not exist.</div>
189 [% ELSE %]
190     [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %]
191
192     [% IF ( flagged ) %]
193     <div id="circmessages" class="circmessage attention">
194         <ul>
195         [% IF ( userdebarred ) %]
196             <li class="blocker">Patron is restricted[% IF ( userdebarreddate ) %] until [% userdebarreddate%] [% IF (debarredcomment ) %]([% debarredcomment %])[% END %][% END %]
197             <a href="#reldebarments" onclick="$('#debarments-tab-link').click()">View restrictions</a>
198             </li>
199         [% END %]
200         [% IF ( gonenoaddress ) %]<li class="blocker">Patron's address is in doubt.</li>[% END %]
201         [% IF ( lost ) %]<li class="blocker">Patron's card has been reported lost.</li>[% END %]
202         </ul>
203     </div>
204     [% END %]
205
206 <h3>[% UNLESS ( I ) %]
207    [% title %] [% firstname %] [% END %] [% surname %] ([% cardnumber %])</h3>
208  <div class="yui-u first">
209 <div id="patron-information" style="padding : .5em;">
210
211      [% UNLESS ( I ) %][% IF ( othernames ) %]&ldquo;[% othernames %]&rdquo;[% END %]
212
213 <p class="address">[% streetnumber %]
214         [% IF ( roaddetails ) %]
215          [% roaddetails %]
216         [% END %]
217         [% address %]<br />
218         [% IF ( address2 ) %][% address2 %]<br />[% END %]
219         [% IF ( city ) %][% city %][% END %] 
220         [% IF ( state ) %][% state %][% END %]
221         [% IF ( zipcode ) %][% zipcode %]<br />[% END %]
222         [% IF ( country ) %][% country %][% END %]</p>
223                     
224         <div class="rows">
225                 <ol>
226         [% IF ( I ) %]
227             [% IF ( phonepro ) %]<li><span class="label">Organization phone: </span>[% phonepro %]</li>[% END %]
228             [% IF ( emailpro ) %]<li><span class="label">Organization email: </span>[% emailpro %]</li>[% END %]
229         [% ELSE %]
230             [% IF ( phone ) %]<li><span class="label">Primary phone: </span>[% phone %]</li>[% END %]
231             [% IF ( mobile ) %]<li><span class="label">Secondary phone: </span>[% mobile %]</li>[% END %]
232             [% IF ( phonepro ) %]<li><span class="label">Other phone: </span>[% phonepro %]</li>[% END %]
233         [% END %]
234
235     [% IF ( P ) %]
236         [% IF ( phone ) %]<li><span class="label">Primary phone: </span>[% phone %]</li>[% END %]
237         [% IF ( mobile ) %]<li><span class="label">Secondary phone: </span>[% mobile %]</li>[% END %]
238     [% END %]           
239         [% IF ( fax ) %]<li><span class="label">Fax: </span>[% fax %]</li>[% END %]
240     [% UNLESS ( I ) %]
241         [% IF ( email ) %]<li><span class="label">Primary email:</span><a href="mailto:[% email %]">[% email %]</a></li>[% END %]
242         [% IF ( emailpro ) %]<li><span class="label">Secondary email: </span><a href="mailto:[% emailpro %]">[% emailpro %]</a></li>[% END %]
243     [% END %]
244     [% IF ( initials ) %]<li><span class="label">Initials: </span>[% initials %]</li>[% END %]
245     [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth %]</li>[% END %]
246     [% IF ( sex ) %]<li><span class="label">Gender:</span>
247     [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %]
248     </li>[% END %][% END %]
249     [% IF ( printethnicityline ) %]
250     <li><span class="label">Ethnicity:</span>[% ethnicity %]</li>
251     <li><span class="label">Ethnicity notes: </span>[% ethnotes %]</li>
252     [% END %]
253     [% IF ( isguarantee ) %]
254         [% IF ( guaranteeloop ) %]
255             <li><span class="label">Guarantees:</span><ul>[% FOREACH guaranteeloo IN guaranteeloop %]<li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guaranteeloo.borrowernumber %]">[% guaranteeloo.name %]  </a></li>[% END %]</ul></li>
256         [% END %]
257     [% ELSE %]
258         [% IF ( guarantorborrowernumber ) %]
259             <li><span class="label">Guarantor:</span><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorborrowernumber %]">[% guarantorsurname %], [% guarantorfirstname %]</a></li>
260         [% END %]
261     [% END %]
262 </ol>
263 </div>
264       <div class="action">
265         [% IF ( guarantorborrowernumber ) %]
266         <a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=1&amp;guarantorid=[% guarantorborrowernumber %]">Edit</a>
267         [% ELSE %]
268         <a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=1">Edit</a>
269         [% END %]</div>
270
271 </div>
272
273 <!-- Begin Upload Patron Image Section -->
274
275 <div id="manage-patron-image">
276 [% IF ( patronimages ) %]
277     [% IF ( CAN_user_tools_batch_upload_patron_images ) %]
278         <form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data">
279             <fieldset class="brief">
280             [% IF ( picture ) %]
281                 <legend>Manage Patron Image</legend>
282                 <div class="hint">To update the image for [% title %] [% surname %], select a new image file and click 'Upload.' <br />Click the 'Delete' button to remove the current image.
283             [% ELSE %]
284                 <legend>Upload Patron Image</legend>
285                 <div class="hint">[% title %] [% firstname %] [% surname %] does not currently have an image available. To import an image for [% title %] [% surname %], enter the name of an image file to upload.
286             [% END %]
287                     <br />Only PNG, GIF, JPEG, XPM formats are supported.
288                 </div>
289                 <input type="hidden" id="image" name="filetype" value="image" />
290                 <input type="hidden" id="cardnumber" name="cardnumber" value="[% cardnumber %]" />
291                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
292                 <ol>
293                     <li>
294                        <label for="uploadfile">Select the file to upload: </label><input type="file" id="uploadfile" name="uploadfile" />
295                     </li>
296                 </ol>
297                 <fieldset class="action">
298                     <input type="submit" value="Upload" class="submit" />
299                     <input name="op" type="hidden" value="Upload" />
300                     [% IF ( picture ) %]<a id="delpicture" href="/cgi-bin/koha/tools/picture-upload.pl?op=Delete&amp;cardnumber=[% cardnumber %]&amp;borrowernumber=[% borrowernumber %]" class="delete">Delete</a>[% END %]
301                 </fieldset>
302             </fieldset>
303         </form>
304     [% END %]
305 [% END %]
306 </div>
307
308 <!-- End Upload Patron Image Section -->
309
310 [% IF ( ExtendedPatronAttributes ) %]
311 [% UNLESS ( no_patron_attribute_types ) %]
312 <div id="patron-extended-attributes" style="padding-top: 1em;">
313 <h3>Additional attributes and identifiers</h3>
314 [% FOREACH attribute IN attributes_loop %]
315     [% IF attribute.class %]
316         <div id="aai_[% attribute.class %]" class="rows">
317     [% ELSE %]
318         <div id="aai" class="rows">
319     [% END %]
320         <h4>[% attribute.lib %]</h4>
321         <ol>
322         [% FOREACH item IN attribute.items %]
323             <li>
324                 <span class="label">[% item.description %]: </span>
325                 [% IF ( item.value_description ) %]
326                     [% item.value_description %]
327                 [% ELSE %]
328                     [% item.value| html_line_break %]
329                 [% END %]
330             </li>
331         [% END %]
332         </ol>
333     </div>
334 [% END %]
335 </div>
336 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=4">Edit</a></div>
337 [% END %]
338 [% END %]
339
340 [% IF ( EnhancedMessagingPreferences ) %]
341 <div id="patron-messaging-prefs" style="padding-top: 1em;">
342 <h3>Patron messaging preferences</h3>
343 [% INCLUDE 'messaging-preference-form.inc' %]
344  [% IF ( SMSSendDriver ) %]
345       <div class="rows"> <ol><li><span class="label">SMS number:</span>[% SMSnumber %]
346      </li></ol></div>
347  [% END %]
348 </div>
349 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=5">Edit</a></div>
350 [% END %]
351
352 </div>
353  <div class="yui-u"> 
354  <div id="patron-library-details">
355  <h3>Library use</h3>
356 <div class="rows"> 
357 <ol>
358     <li><span class="label">Card number: </span>[% cardnumber %]</li>
359         <li><span class="label">Borrowernumber: </span> [% borrowernumber %]</li>
360     <li><span class="label">Category: </span>[% description %] ([% categorycode %])</li>
361     <li><span class="label">Registration date: </span>[% dateenrolled %]</li>
362     
363     <li><span class="label">Expiration date: </span>
364     [% IF ( was_renewed ) %]
365             <strong class="reregistrinfo">[% dateexpiry %]</strong>
366     [% ELSE %]
367             [% dateexpiry %]
368     [% END %]
369     </li>
370     
371     <li><span class="label">Library: </span>[% branchname %]</li>
372
373     [% IF ( OPACPrivacy ) %]<li><span class="label">Privacy Pref:</span>
374          [% IF ( privacy0 ) %]Forever[% END %]
375          [% IF ( privacy1 ) %]Default[% END %]
376          [% IF ( privacy2 ) %]Never[% END %]
377     </li>[% END %]
378     [% IF ( sort1 ) %]<li><span class="label">Sort field 1:</span>[% lib1 %]</li>[% END %]
379     [% IF ( sort2 ) %]<li><span class="label">Sort field 2:</span>[% lib2 %]</li>[% END %]
380     <li><span class="label">Username: </span>[% userid %]</li>
381     <li><span class="label">Password: </span>
382     [% IF ( password ) %]
383         *******
384     [% ELSE %]
385         <span class="problem"><a href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Undefined</a></span>
386     [% END %] 
387     </li>
388     [% IF ( borrowernotes ) %]<li><span class="label">Circulation note: </span>[% borrowernotes %]</li>[% END %]
389     [% IF ( opacnote ) %]<li><span class="label">OPAC note:</span>[% opacnote %]</li>[% END %]
390         </ol>
391         </div>
392  </div>
393     <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=3">Edit</a></div>
394  
395     [% UNLESS ( I ) %]
396  <div id="patron-alternate-address" style="padding-top: 1em;">
397     <h3>Alternate address</h3>
398     <div class="rows">  <ol><li><span class="label">Address: </span>[% B_address %]</li>
399       <li><span class="label">Address 2: </span>[% B_address2 %]</li>
400       <li><span class="label">City: </span>[% B_city %]</li>
401       [% IF ( B_state ) %]<li><span class="label">State: </span>[% B_state %]</li>[% END %]
402       <li><span class="label">Zip/Postal code: </span>[% B_zipcode %]</li>
403       [% IF ( B_country ) %]<li><span class="label">Country: </span>[% B_country %]</li>[% END %]
404       [% IF ( B_phone ) %]<li><span class="label">Phone: </span>[% B_phone %]</li>[% END %]
405       [% IF ( B_email ) %]<li><span class="label">Email: </span><a href="mailto:[% B_email %]">[% email %]</a></li>[% END %]</ol></div>
406 </div>
407 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=6">Edit</a></div>
408     [% END %]
409
410  <div id="patron-alternative-contact" style="padding-top: 1em;">
411  <h3>Alternative contact</h3>
412    <div class="rows"> <ol><li><span class="label">Surname: </span>[% altcontactsurname %]</li>
413     <li><span class="label">First name: </span>[% altcontactfirstname %]</li>    
414     <li><span class="label">Address: </span>[% altcontactaddress1 %]</li>
415     <li><span class="label">Address 2: </span>[% altcontactaddress2 %]</li>
416         <li><span class="label">City: </span>[% altcontactaddress3 %]</li>
417     [% IF ( altcontactstate ) %]<li><span class="label">State: </span>[% altcontactstate %]</li>[% END %]
418     <li><span class="label">Zip/Postal code: </span>[% altcontactzipcode %]</li>
419         [% IF ( altcontactcountry ) %]<li><span class="label">Country: </span>[% altcontactcountry %]</li>[% END %]
420     [% IF ( altcontactphone ) %]<li><span class="label">Phone: </span>[% altcontactphone %]</li>[% END %]
421     </ol></div>
422 </div>
423 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=2">Edit</a></div>
424
425 </div>
426 </div>
427
428 <div id="finesholdsissues" class="toptabs">
429     <ul>
430         <li><a href="#checkedout">[% issueloop.size %] Checkout(s)</a></li>
431     [% IF relissueloop.size %]
432         <li><a href="#relissues">Relatives' Checkouts</a></li>
433     [% END %]
434         <li><a href="#finesandcharges">Fines &amp; Charges</a></li>
435         <li>[% IF ( countreserv ) %]
436             <a href="#onhold">[% countreserv %] Hold(s)</a>    [% ELSE %]
437             <a href="#onhold">0 Holds</a>
438     [% END %]</li>
439         <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
440     </ul>
441
442     <form action="/cgi-bin/koha/reserve/renewscript.pl" method="post" class="checkboxed">
443     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
444     <input type="hidden" name="branch" value="[% branch %]" />
445 <div id="checkedout">
446     [% IF ( issueloop ) %]
447     <table id="issuest">
448     <thead>
449         <tr>
450             <th scope="col">Due date</th>
451             <th scope="col">Title</th>
452             <th scope="col">Item type</th>
453             <th scope="col">Checked out on</th> 
454             <th scope="col">Checked out from</th> 
455             <th scope="col">Call no.</th>
456             <th scope="col">Charge</th>
457             <th scope="col">Price</th>
458             <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllitems">select all</a> | <a href="#" id="CheckNoitems">none</a></p></th>
459             <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllreturns">select all</a> | <a href="#" id="CheckNoreturns">none</a></p></th>
460         </tr></thead>
461         [% INCLUDE 'checkouts-table-footer.inc' %]
462        <tbody>
463        [% FOREACH issueloo IN issueloop %]
464
465           [% IF ( issueloo.overdue ) %]
466           <tr class="problem">
467           [% ELSE %]
468           <tr>
469           [% END %]
470           [% IF ( issueloo.red ) %]
471               <td class="od">
472           [% ELSE %]
473             <td>
474           [% END %]
475                 <span title="[% issueloo.date_due %]">[% issueloo.date_due | $KohaDates %]</span>
476                 [% IF ( issueloo.itemlost ) %]
477                                         <span class="lost">[% issueloo.itemlost %]</span>
478                     [% END %]
479                 [% IF ( issueloo.damaged ) %]
480                                         <span class="dmg">[% issueloo.itemdamaged %]</span>
481                 [% END %]
482 </td>
483             <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issueloo.biblionumber %]"><strong>[% issueloo.title |html %][% FOREACH subtitl IN issueloo.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( issueloo.author ) %], by [% issueloo.author %][% END %] [% IF ( issueloo.publishercode ) %]; [% issueloo.publishercode %] [% END %] [% IF ( issueloo.publicationyear ) %], [% issueloo.publicationyear %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% issueloo.biblionumber %]&amp;itemnumber=[% issueloo.itemnumber %]#item[% issueloo.itemnumber %]">[% issueloo.barcode %]</a></td>
484 <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( issueloo.itemtype_image ) %]<img src="[% issueloo.itemtype_image %]" alt="" />[% END %][% END %][% issueloo.itemtype_description %]</td>
485             <td><span title="[% issueloo.issuedate %]">[% issueloo.issuedate | $KohaDates%]</span></td>
486             <td>[% issueloo.issuingbranchname %]</td>
487             <td>[% issueloo.itemcallnumber %]</td>
488             <td>[% issueloo.charge %]</td>
489             <td>[% issueloo.replacementprice %]</td>
490       [% IF ( issueloo.renew_failed ) %]
491             <td class="problem">Renewal Failed</td>
492       [% ELSE %]
493             <td><span style="padding: 0 1em;">[% IF ( issueloo.renewals ) %][% issueloo.renewals %][% ELSE %]0[% END %]</span>
494             [% IF ( issueloo.norenew ) %]
495                 [% IF ( issueloo.can_confirm ) %]<span class="renewals-allowed" style="display: none">
496                     <input type="checkbox" name="all_items[]" value="[% issueloo.itemnumber %]" checked="checked" style="display: none;" />
497                     [% IF ( issueloo.od ) %]
498                         <input type="checkbox" name="items[]" value="[% issueloo.itemnumber %]" checked="checked" />
499                     [% ELSE %]
500                         <input type="checkbox" name="items[]" value="[% issueloo.itemnumber %]" />
501                     [% END %]
502                     </span>
503                     [% IF issueloo.renewsallowed && issueloo.renewsleft %]
504                         <span class="renewals">([% issueloo.renewsleft %] of [% issueloo.renewsallowed %] renewals remaining)</span>
505                     [% END %]
506                     <span class="renewals-disabled">
507                 [% END %]
508                 [% IF ( issueloo.norenew_reason_on_reserve ) %]
509                 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% issueloo.biblionumber %]">On Hold</a>
510                 [% END %]
511                     [% IF ( issueloo.norenew_reason_too_many ) %]
512                         Not renewable
513                     [% END %]
514                 [% IF ( issueloo.can_confirm ) %]
515                     </span>
516                 [% END %]
517             [% ELSE %]
518             <input type="checkbox" name="all_items[]" value="[% issueloo.itemnumber %]" checked="checked" style="display: none;" />
519             [% IF ( issueloo.red ) %]
520             <input type="checkbox" name="items[]" value="[% issueloo.itemnumber %]" checked="checked" onclick="uncheck_sibling(this);" />
521             [% ELSE %]
522             <input type="checkbox" name="items[]" value="[% issueloo.itemnumber %]" onclick="uncheck_sibling(this);" />
523             [% END %]
524                 [% IF issueloo.renewsallowed && issueloo.renewsleft %]
525                     <span class="renewals">([% issueloo.renewsleft %] of [% issueloo.renewsallowed %] renewals remaining)</span>
526                 [% END %]
527             [% END %]
528             </td>
529       [% END %]
530       [% IF ( issueloo.return_failed ) %]
531             <td class="problem">Check-in failed</td>
532       [% ELSE %]
533         [% IF ( issueloo.norenew_reason_on_reserve ) %]
534             <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% issueloo.biblionumber %]">On hold</a></td>
535         [% ELSE %]
536             <td><input type="checkbox" name="barcodes[]"  value="[% issueloo.barcode %]" onclick="uncheck_sibling(this);" />
537                 <input type="checkbox" name="all_barcodes[]" value="[% issueloo.barcode %]" checked="checked" style="display: none;" />
538             </td>
539         [% END %]
540       [% END %]
541         </tr>
542   [% END %]
543         </tbody>
544         </table>
545         <fieldset class="action">
546         [% IF ( CAN_user_circulate_override_renewals ) %]
547         [% IF ( AllowRenewalLimitOverride ) %]
548         <label for="override_limit">Override renewal limit:</label>
549         <input type="checkbox" name="override_limit" id="override_limit" value="1" />
550         [% END %]
551         [% END %]
552         <input type="submit" name="renew_checked" value="Renew or return checked items" />
553         <input type="submit" id="renew_all" name="renew_all" value="Renew all" />
554         </fieldset>
555     [% ELSE %]<p>Patron has nothing checked out.</p>
556 [% END %]
557 </div>
558
559
560 [% IF relissueloop %]
561 <div id="relissues">
562  <table id="relissuest">
563     <thead>
564     <tr>
565             <th scope="col">Due date</th>
566             <th scope="col">Title</th>
567             <th scope="col">Item type</th>
568             <th scope="col">Checked out on</th> 
569             <th scope="col">Checked out from</th>
570             <th scope="col">Call no.</th>
571             <th scope="col">Charge</th>
572             <th scope="col">Price</th>
573             <th scope="col">Patron</th>
574         </tr>
575     </thead>
576        <tbody>
577        [% FOREACH relissueloo IN relissueloop %]
578
579           [% IF ( relissueloo.overdue ) %]
580           <tr class="problem">
581           [% ELSE %]
582           <tr>
583           [% END %]
584           [% IF ( relissueloo.red ) %]
585             <td class="od">
586           [% ELSE %]
587             <td>
588           [% END %]
589                 <span title="[% relissueloo.date_due %]">[% relissueloo.date_due | $KohaDates %]</span>
590                 [% IF ( relissueloo.itemlost ) %]
591                                         <span class="lost">[% relissueloo.itemlost %]</span>
592                     [% END %]
593                 [% IF ( relissueloo.damaged ) %]
594                                         <span class="dmg">[% relissueloo.itemdamaged %]</span>
595                 [% END %]
596 </td>
597             <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relissueloo.biblionumber %]"><strong>[% relissueloo.title |html %][% FOREACH subtitl IN relissueloo.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF relissueloo.author %], by [% relissueloo.author %][% END %] [% IF relissueloo.publishercode %]; [% relissueloo.publishercode %] [% END %] [% IF relissueloo.publicationyear %], [% relissueloo.publicationyear %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% relissueloo.biblionumber %]&amp;itemnumber=[% relissueloo.itemnumber %]#item[% relissueloo.itemnumber %]">[% relissueloo.barcode %]</a></td>
598 <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissueloo.itemtype_image ) %]<img src="[% relissueloo.itemtype_image %]" alt="" />[% END %][% END %][% relissueloo.itemtype_description %]</td>
599             <td><span title="[% relissueloo.issuedate %]">[% relissueloo.issuedate | $KohaDates %]</span></td>
600             <td>[% relissueloo.issuingbranchname %]</td>
601         <td>[% relissueloo.itemcallnumber %]</td>
602         <td>[% relissueloo.charge %]</td>
603         <td>[% relissueloo.replacementprice %]</td>
604         <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relissueloo.borrowernumber %]">[% relissueloo.firstname %] [% relissueloo.surname %] ([% relissueloo.cardnumber %])</a></td>
605         </tr>
606   [% END %]
607         </tbody>
608        </table>
609     </div>
610 [% END %]
611     </form>
612
613 <div id="finesandcharges">
614     [% IF ( totaldue_raw ) %]
615         <p>Total due: [% totaldue %]</p>
616     [% ELSE %]
617         <p>No outstanding charges</p>
618     [% END %]
619 </div>
620
621 [% INCLUDE borrower_debarments.inc %]
622
623 <div id="onhold">
624 [% IF ( reservloop ) %]
625 <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
626         <input type="hidden" name="from" value="borrower" />
627         <table id="holdst">
628                 <thead><tr>
629                         <th>Hold date</th>
630                         <th>Title</th>
631             <th>Call number</th>
632                         <th>Barcode</th>
633             <th>Expiration</th>
634                         <th>Priority</th>
635                         <th>Delete?</th>
636                         <th>&nbsp;</th>
637                 </tr></thead>
638                 <tbody>[% FOREACH reservloo IN reservloop %]
639                 <tr class="[% reservloo.color %]">
640             <td><span title="[% reservloo.reservedate %]">[% reservloo.reservedate | $KohaDates %]</span></td>
641             <td>
642                 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% reservloo.biblionumber %]">[% reservloo.title |html %][% FOREACH subtitl IN reservloo.subtitle %] [% subtitl.subfield %][% END %]</a>[% IF ( reservloo.author ) %], by [% reservloo.author %][% END %]
643             </td>
644             <td>[% reservloo.itemcallnumber %]</td>
645             <td>[% IF ( reservloo.waiting ) %]
646                 <em>Item is <strong>waiting</strong></em>
647                 [% END %]
648                 [% IF ( reservloo.transfered ) %]
649                 <em>Item <strong>in transit</strong> from
650                 [% reservloo.frombranch %] since [% reservloo.datesent %] </em>
651                 [% END %]
652
653                 [% IF ( reservloo.nottransfered ) %]
654                 <em>Item hasn't been transferred yet from [% reservloo.nottransferedby %]</em>
655                 [% END %]
656                 [% IF ( reservloo.barcodereserv ) %]
657                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reservloo.biblionumber %]">[% reservloo.barcodereserv %]</a>
658                 [% END %]
659             </td>
660             <td>[% reservloo.expirationdate | $KohaDates %]</td>
661             <td>[% IF ( reservloo.waitingposition ) %]<strong>[% reservloo.waitingposition %]</strong>[% END %]</td>
662             <td><select name="rank-request">
663                     <option value="n">No</option>
664                     <option value="del">Yes</option>
665                 </select>
666                 <input type="hidden" name="biblionumber" value="[% reservloo.biblionumber %]" />
667                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
668                 <input type="hidden" name="reserve_id" value="[% reservloo.reserve_id %]" />
669             </td>
670             <td>[% IF ( reservloo.suspend ) %]Suspended [% IF ( reservloo.suspend_until ) %] until [% reservloo.suspend_until | $KohaDates %][% END %][% END %]</td>
671         </tr>
672                 [% END %]</tbody>
673     </table>
674
675         <fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel marked holds" /></fieldset>
676     </form>
677
678     [% IF SuspendHoldsIntranet %]
679     <fieldset class="action">
680         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
681             <input type="hidden" name="from" value="borrower" />
682             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
683             <input type="submit" value="Suspend all holds" />
684
685             [% IF AutoResumeSuspendedHolds %]
686             <label for="suspend_until">until</label>
687             <input type="text" size="10" id="suspend_until" name="suspend_until"/>
688             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
689             [% END %]
690         </form>
691     </fieldset>
692
693     <fieldset class="action">
694         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
695             <input type="hidden" name="from" value="borrower" />
696             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
697             <input type="hidden" name="suspend" value="0" />
698             <input type="submit" value="Resume all suspended holds" />
699         </form>
700     </fieldset>
701     [% END # IF SuspendHoldsIntranet %]
702
703     [% ELSE %]<p>Patron has nothing on hold.</p>[% END %]
704         </div>
705
706 </div>
707 [% END %] <!-- unknowuser -->
708
709
710 </div>
711 </div>
712 <div class="yui-b">
713 [% INCLUDE 'circ-menu.inc' %]
714 </div>
715 </div>
716 [% INCLUDE 'intranet-bottom.inc' %]