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