Merge remote-tracking branch 'origin/new/bug_6634'
[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').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="#checkedout">[% issueloop.size %] Checkout(s)</a></li>
414     [% IF relissueloop.size %]
415         <li><a href="#relissues">Relatives' Checkouts</a></li>
416     [% END %]
417         <li><a href="#finesandcharges">Fines &amp; Charges</a></li>
418         <li>[% IF ( countreserv ) %]
419             <a href="#onhold">[% countreserv %] Hold(s)</a>    [% ELSE %]
420             <a href="#onhold">0 Holds</a>
421     [% END %]</li>
422     </ul>
423
424     <form action="/cgi-bin/koha/reserve/renewscript.pl" method="post" class="checkboxed">
425     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
426     <input type="hidden" name="branch" value="[% branch %]" />
427 <div id="checkedout">
428     [% IF ( issueloop ) %]
429     <table id="issuest">
430     <thead>
431         <tr>
432             <th scope="col">Due date</th>
433             <th scope="col">Title</th>
434             <th scope="col">Item type</th>
435             <th scope="col">Checked out on</th> 
436             <th scope="col">Checked out from</th> 
437             <th scope="col">Call no.</th>
438             <th scope="col">Charge</th>
439             <th scope="col">Price</th>
440             <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllitems">select all</a> | <a href="#" id="CheckNoitems">none</a></p></th>
441             <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllreturns">select all</a> | <a href="#" id="CheckNoreturns">none</a></p></th>
442         </tr></thead>
443         [% INCLUDE 'checkouts-table-footer.inc' %]
444        <tbody>
445        [% FOREACH issueloo IN issueloop %]
446
447           [% IF ( issueloo.overdue ) %]
448           <tr class="problem">
449           [% ELSE %]
450           <tr>
451           [% END %]
452           [% IF ( issueloo.red ) %]
453               <td class="od">
454           [% ELSE %]
455             <td>
456           [% END %]
457                 [% issueloo.date_due %]
458                 [% IF ( issueloo.itemlost ) %]
459                                         <span class="lost">[% issueloo.itemlost %]</span>
460                     [% END %]
461                 [% IF ( issueloo.damaged ) %]
462                                         <span class="dmg">[% issueloo.itemdamaged %]</span>
463                 [% END %]
464 </td>
465             <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>
466 <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( issueloo.itemtype_image ) %]<img src="[% issueloo.itemtype_image %]" alt="" />[% END %][% END %][% issueloo.itemtype_description %]</td>
467             <td>[% issueloo.issuedate %]</td>
468             <td>[% issueloo.issuingbranchname %]</td>
469             <td>[% issueloo.itemcallnumber %]</td>
470             <td>[% issueloo.charge %]</td>
471             <td>[% issueloo.replacementprice %]</td>
472       [% IF ( issueloo.renew_failed ) %]
473             <td class="problem">Renewal Failed</td>
474       [% ELSE %]
475             <td><span style="padding: 0 1em;">[% IF ( issueloo.renewals ) %][% issueloo.renewals %][% ELSE %]0[% END %]</span>
476             [% IF ( issueloo.norenew ) %]
477                 [% IF ( issueloo.can_confirm ) %]<span class="renewals-allowed" style="display: none">
478                     <input type="checkbox" name="all_items[]" value="[% issueloo.itemnumber %]" checked="checked" style="display: none;" />
479                     [% IF ( issueloo.od ) %]
480                         <input type="checkbox" name="items[]" value="[% issueloo.itemnumber %]" checked="checked" />
481                     [% ELSE %]
482                         <input type="checkbox" name="items[]" value="[% issueloo.itemnumber %]" />
483                     [% END %]
484                     </span>
485                     <span class="renewals-disabled">
486                 [% END %]
487                 [% IF ( issueloo.norenew_reason_on_reserve ) %]
488                 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% issueloo.biblionumber %]">On Hold</a>
489                 [% END %]
490                     [% IF ( issueloo.norenew_reason_too_many ) %]
491                         Not renewable
492                     [% END %]
493                 [% IF ( issueloo.can_confirm ) %]
494                     </span>
495                 [% END %]
496             [% ELSE %]
497             <input type="checkbox" name="all_items[]" value="[% issueloo.itemnumber %]" checked="checked" style="display: none;" />
498             [% IF ( issueloo.red ) %]
499             <input type="checkbox" name="items[]" value="[% issueloo.itemnumber %]" checked="checked" onclick="uncheck_sibling(this);" />
500             [% ELSE %]
501             <input type="checkbox" name="items[]" value="[% issueloo.itemnumber %]" onclick="uncheck_sibling(this);" />
502             [% END %]
503             [% END %]
504             </td>
505       [% END %]
506       [% IF ( issueloo.return_failed ) %]
507             <td class="problem">Checkin failed</td>
508       [% ELSE %]
509         [% IF ( issueloo.norenew_reason_on_reserve ) %]
510             <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% issueloo.biblionumber %]">On hold</a></td>
511         [% ELSE %]
512             <td><input type="checkbox" name="barcodes[]"  value="[% issueloo.barcode %]" onclick="uncheck_sibling(this);" />
513                 <input type="checkbox" name="all_barcodes[]" value="[% issueloo.barcode %]" checked="checked" style="display: none;" />
514             </td>
515         [% END %]
516       [% END %]
517         </tr>
518   [% END %]
519         </tbody>
520         </table>
521         <fieldset class="action">
522         [% IF ( CAN_user_circulate_override_renewals ) %]
523         [% IF ( AllowRenewalLimitOverride ) %]
524         <label for="override_limit">Override renewal limit:</label>
525         <input type="checkbox" name="override_limit" id="override_limit" value="1" />
526         [% END %]
527         [% END %]
528         <input type="submit" name="renew_checked" value="Renew or return checked items" />
529         <input type="submit" id="renew_all" name="renew_all" value="Renew all" />
530         </fieldset>
531     [% ELSE %]<p>Patron has nothing checked out.</p>
532 [% END %]
533 </div>
534
535
536 [% IF relissueloop %]
537 <div id="relissues">
538  <table id="relissuest">
539     <thead>
540     <tr>
541             <th scope="col">Due date</th>
542             <th scope="col">Title</th>
543             <th scope="col">Item type</th>
544             <th scope="col">Checked out on</th> 
545             <th scope="col">Checked out from</th>
546             <th scope="col">Call no.</th>
547             <th scope="col">Charge</th>
548             <th scope="col">Price</th>
549             <th scope="col">Patron</th>
550         </tr>
551     </thead>
552        <tbody>
553        [% FOREACH relissueloo IN relissueloop %]
554
555           [% IF ( relissueloo.overdue ) %]
556           <tr class="problem">
557           [% ELSE %]
558           <tr>
559           [% END %]
560           [% IF ( relissueloo.red ) %]
561             <td class="od">
562           [% ELSE %]
563             <td>
564           [% END %]
565                 [% relissueloo.date_due %]
566                 [% IF ( relissueloo.itemlost ) %]
567                                         <span class="lost">[% relissueloo.itemlost %]</span>
568                     [% END %]
569                 [% IF ( relissueloo.damaged ) %]
570                                         <span class="dmg">[% relissueloo.itemdamaged %]</span>
571                 [% END %]
572 </td>
573             <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>
574 <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissueloo.itemtype_image ) %]<img src="[% relissueloo.itemtype_image %]" alt="" />[% END %][% END %][% relissueloo.itemtype_description %]</td>
575             <td>[% relissueloo.issuedate %]</td>
576             <td>[% relissueloo.issuingbranchname %]</td>
577         <td>[% relissueloo.itemcallnumber %]</td>
578         <td>[% relissueloo.charge %]</td>
579         <td>[% relissueloo.replacementprice %]</td>
580         <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relissueloo.borrowernumber %]">[% relissueloo.firstname %] [% relissueloo.surname %] ([% relissueloo.cardnumber %])</a></td>
581         </tr>
582   [% END %]
583         </tbody>
584        </table>
585     </div>
586 [% END %]
587     </form>
588
589 <div id="finesandcharges">
590     [% IF ( totaldue_raw ) %]
591         <p>Total due: [% totaldue %]</p>
592     [% ELSE %]
593         <p>No outstanding charges</p>
594     [% END %]
595 </div>
596
597 <div id="onhold">
598 [% IF ( reservloop ) %]
599 <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
600         <input type="hidden" name="from" value="borrower" />
601         <table id="holdst">
602                 <thead><tr>
603                         <th>Hold date</th>
604                         <th>Title</th>
605             <th>Call number</th>
606                         <th>Barcode</th>
607                         <th>Priority</th>
608                         <th>Delete?</th>
609                         <th>&nbsp;</th>
610                 </tr></thead>
611                 <tbody>[% FOREACH reservloo IN reservloop %]
612                 <tr class="[% reservloo.color %]">
613             <td>[% reservloo.reservedate %]</td>
614             <td>
615                 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% reservloo.biblionumber %]">[% reservloo.title |html %]</a>[% IF ( reservloo.author ) %], by [% reservloo.author %][% END %]
616             </td>
617             <td>[% reservloo.itemcallnumber %]</td>
618             <td>[% IF ( reservloo.waiting ) %]
619                 <em>Item is <strong>waiting</strong></em>
620                 [% END %]
621                 [% IF ( reservloo.transfered ) %]
622                 <em>Item <strong>in transit</strong> from
623                 [% reservloo.frombranch %] since [% reservloo.datesent %] </em>
624                 [% END %]
625
626                 [% IF ( reservloo.nottransfered ) %]
627                 <em>Item hasn't been transferred yet from [% reservloo.nottransferedby %]</em>
628                 [% END %]
629                 [% IF ( reservloo.barcodereserv ) %]
630                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reservloo.biblionumber %]">[% reservloo.barcodereserv %]</a>
631                 [% END %]
632             </td>
633             <td>[% IF ( reservloo.waitingposition ) %]<strong>[% reservloo.waitingposition %]</strong>[% END %]</td>
634             <td><select name="rank-request">
635                     <option value="n">No</option>
636                     <option value="del">Yes</option>
637                 </select>
638                 <input type="hidden" name="biblionumber" value="[% reservloo.biblionumber %]" />
639                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
640             </td>
641             <td>[% IF ( reservloo.suspend ) %]Suspended [% IF ( reservloo.suspend_until ) %] until [% reservloo.suspend_until | $KohaDates %][% END %][% END %]</td>
642         </tr>
643                 [% END %]</tbody>
644     </table>
645
646         <fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel marked holds" /></fieldset>
647     </form>
648
649     [% IF SuspendHoldsIntranet %]
650     <fieldset class="action">
651         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
652             <input type="hidden" name="from" value="borrower" />
653             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
654             <input type="submit" value="Suspend all holds" />
655
656             [% IF AutoResumeSuspendedHolds %]
657             <label for="suspend_until">until</label>
658             <input type="text" size="10" id="suspend_until" name="suspend_until"/>
659             <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar"  border="0" id="CalendarSuspendUntil" style="cursor: pointer;" />
660             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
661
662              <script language="JavaScript" type="text/javascript">
663                          //<![CDATA[
664                    function validate1(date) {
665                          var today = new Date();
666                          if ( date < today ) {
667                              return true;
668                           } else {
669                              return false;
670                           }
671                      };
672                      function refocus(calendar) {
673                         $('#barcode').focus();
674                         calendar.hide();
675                      };
676                                 //#TODO - ADD syspref (AllowPostDatedCheckouts).
677                      Calendar.setup(
678                           {
679                              inputField : "suspend_until",
680                              ifFormat : "[% DHTMLcalendar_dateformat %]",
681                              button : "CalendarSuspendUntil",
682 //                           disableFunc : validate1,
683 //                           dateStatusFunc : validate1,
684                              onClose : refocus
685                            }
686                         );
687                                 //]]>
688              </script>
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' %]