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