Bug 12461 - Add patron clubs feature
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / moremember.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% USE KohaDates %]
4 [% USE AuthorisedValues %]
5 [% USE ColumnsSettings %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Patrons &rsaquo;
8 [% IF ( unknowuser ) %]
9     Patron does not exist
10 [% ELSE %]
11     Patron details for [% INCLUDE 'patron-title.inc' %]
12 [% END %]
13 </title>
14 [% INCLUDE 'doc-head-close.inc' %]
15 [% INCLUDE 'calendar.inc' %]
16 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
17 [% INCLUDE 'datatables.inc' %]
18 [% INCLUDE 'columns_settings.inc' %]
19 [% INCLUDE 'strings.inc' %]
20 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
21 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
22 [% INCLUDE 'timepicker.inc' %]
23 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
24 <script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/circulation.js"></script>
25 <script type="text/javascript" src="[% interface %]/[% theme %]/js/checkouts.js"></script>
26 <script type="text/javascript" src="[% interface %]/[% theme %]/js/holds.js"></script>
27 <script type="text/JavaScript">
28 //<![CDATA[
29 /* Set some variable needed in circulation.js */
30 var interface = "[% interface %]";
31 var theme = "[% theme %]";
32 var borrowernumber = "[% borrowernumber %]";
33 var branchcode = "[% Branches.GetLoggedInBranchcode() %]";
34 var exports_enabled = "[% Koha.Preference('ExportCircHistory') %]";
35 var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 %]
36 var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 %];
37 var script = "moremember";
38 var relatives_borrowernumbers = new Array();
39 [% FOREACH b IN relatives_borrowernumbers %]
40     relatives_borrowernumbers.push("[% b %]");
41 [% END %]
42
43 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
44
45 columns_settings = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) %]
46
47 $(document).ready(function() {
48     if ( $('#clubs-tab').length ) {
49         $('#clubs-tab-link').on('click', function() {
50             $('#clubs-tab').text(_("Loading..."));
51             $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber %]');
52         });
53     }
54
55     $('#finesholdsissues').tabs({
56         // Correct table sizing for tables hidden in tabs
57         // http://www.datatables.net/examples/api/tabs_and_scrolling.html
58         "show": function(event, ui) {
59             var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable();
60             if ( oTable.length > 0 ) {
61                 oTable.fnAdjustColumnSizing();
62             }
63         },
64         "activate": function( event, ui ) {
65             $('#'+ui.newTab.context.id).click();
66         }
67     } );
68     $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
69         "sDom": 't',
70         "aoColumnDefs": [
71             { "aTargets": [ -1,-2 ], "bSortable": false, "bSearchable": false }
72         ],
73         "aoColumns": [
74             { "sType": "title-string" },{ "sType": "anti-the" },null,null,null,null,null,null
75         ],
76         "bPaginate": false
77     }));
78     [% IF ( picture ) %]
79     // new YAHOO.widget.Button("delpicture");   // FIXME: formatting mismatch between YUI and normal button
80         $('#delpicture').click(function(){
81                  return confirm(_("Are you sure you want to delete this patron image? This cannot be undone."));
82         });
83         $('#manage-patron-image').find("input[value*=Upload]").click(function(){
84         if($("#uploadfile").val() == ""){
85             alert(_("Please choose a file to upload"));
86             return false;
87         }
88         return confirm(_("Are you sure you want to replace the current patron image? This cannot be undone."));
89         });[% END %]
90
91     $("#suspend_until").datepicker({
92         onClose: function(dateText, inst) {
93             validate_date(dateText, inst);
94         },
95         minDate: 1, // require that hold suspended until date is after today
96     }).on("change", function(e, value) {
97         if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
98     });
99
100     $("#view_restrictions").on("click",function(){
101         $('#debarments-tab-link').click();
102     });
103  });
104 function uncheck_sibling(me){
105 nodename=me.getAttribute("name");
106 if (nodename =="barcodes[]"){
107     var Node=me.parentNode.previousSibling;
108     while (Node.nodeName!="TD"){Node=Node.previousSibling}
109     var Nodes=Node.childNodes;
110     for (var i=0;i < Nodes.length;i++){
111       if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
112         Nodes[i].checked=false;
113       }     
114    }   
115
116 }else {
117     var Node=me.parentNode.nextSibling;
118     while (Node.nodeName!="TD"){Node=Node.nextSibling}
119     var Nodes=Node.childNodes;
120     for (var i=0;i<Nodes.length;i++){
121       if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
122         Nodes[i].checked=false;
123       }     
124    }   
125 }
126 }
127 function validate1(date) {
128     var today = new Date();
129     if ( date < today ) {
130         return true;
131      } else {
132         return false;
133      }
134 };
135 //]]>
136 </script>
137
138 </head>
139 <body id="pat_moremember" class="pat">
140 [% INCLUDE 'header.inc' %]
141 [% INCLUDE 'patron-search.inc' %]
142
143 <div id="breadcrumbs">
144          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
145 &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
146 &rsaquo; [% IF ( unknowuser ) %]Patron does not exist[% ELSE %]Patron details for [% INCLUDE 'patron-title.inc' %][% END %]
147 </div>
148
149 <div id="doc3" class="yui-t2">
150    
151    <div id="bd">
152         <div id="yui-main">
153         <div class="yui-b">
154
155 [% UNLESS ( unknowuser ) %]
156 [% INCLUDE 'members-toolbar.inc' %]
157 [% END %]
158
159 [% IF ( error ) %]
160 <div class="dialog alert">
161     [% IF ( error == 'CANT_DELETE_STAFF' ) %]
162         <h3>Unable to delete staff user</h3>
163         <p>Insufficient privileges.</p>
164     [% END %]
165     [% IF ( error == 'CANT_DELETE_YOURSELF' ) %]
166         <h3>Not allowed to delete own account</h3>
167         <p>Deleting your own account would lock you out of Koha.</p>
168     [% END %]
169     [% IF ( error == 'CANT_DELETE_OTHERLIBRARY' ) %]
170         <h3>Unable to delete patrons from other libraries with current settings</h3>
171         <p>Insufficient privileges.</p>
172     [% END %]
173     [% IF ( error == 'CANT_DELETE' ) %]
174         <h3>Unable to delete patron</h3>
175         <p>Insufficient privileges.</p>
176     [% END %]
177 </div>
178 [% END %]
179 <div class="yui-g">
180
181 [% IF ( unknowuser ) %]
182    <div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div>
183 [% ELSE %]
184     [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry | $KohaDates %]</div>[% END %]
185
186     [% IF fines %]
187     <div id="circmessages" class="circmessage attention">
188       <ul>
189         [% INCLUDE 'blocked-fines.inc' %]
190       </ul>
191     </div>
192     [% END %]
193
194     [% IF ( flagged ) %]
195     <div id="circmessages" class="circmessage attention">
196         <ul>
197         [% IF ( userdebarred ) %]
198             <li class="blocker">Patron's account is restricted
199                [% IF ( userdebarreddate ) %]
200                    until [% userdebarreddate %]
201                [% END %]
202
203                [% IF ( debarredcomment ) %]
204                    with the explanation: <i>
205                    [% IF debarredcomment.search('OVERDUES_PROCESS') %]
206                        Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
207                    [% ELSE %]
208                        [% debarredcomment | html_line_break %]
209                    [% END %]
210                     </i>
211                [% END %]
212                 <a href="#reldebarments" id="view_restrictions">View restrictions</a>
213             </li>
214         [% END %]
215         [% IF ( gonenoaddress ) %]<li class="blocker">Patron's address is in doubt.</li>[% END %]
216         [% IF ( lost ) %]<li class="blocker">Patron's card has been reported lost.</li>[% END %]
217         </ul>
218     </div>
219     [% END %]
220
221 <h3>[% UNLESS ( I ) %]
222    [% title | html %] [% firstname | html %] [% END %] [% surname | html %] ([% cardnumber | html %])</h3>
223  <div class="yui-u first">
224 <div id="patron-information" style="padding : .5em;">
225
226      [% UNLESS ( I ) %][% IF ( othernames ) %]&ldquo;[% othernames | html %]&rdquo;[% END %]
227
228     <div class = "address">
229         [% IF Koha.Preference( 'AddressFormat' ) %]
230             [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
231         [% ELSE %]
232             [% INCLUDE 'member-display-address-style-us.inc' %]
233         [% END %]
234     </div>
235                     
236         <div class="rows">
237                 <ol>
238         [% IF ( I ) %]
239             [% IF ( phonepro ) %]<li><span class="label">Organization phone: </span><a href="tel:[% phonepro %]">[% phonepro | html %]</a></li>[% END %]
240             [% IF ( emailpro ) %]<li class="email"><span class="label">Organization email: </span>[% emailpro | html %]</li>[% END %]
241         [% ELSE %]
242             [% IF ( phone ) %]<li><span class="label">Primary phone: </span><a href="tel:[% phone %]">[% phone | html %]</a></li>[% END %]
243             [% IF ( phonepro ) %]<li><span class="label">Secondary phone: </span><a href="tel:[% phonepro %]">[% phonepro | html %]</a></li>[% END %]
244             [% IF ( mobile ) %]<li><span class="label">Other phone: </span><a href="tel:[% mobile %]">[% mobile | html %]</a></li>[% END %]
245         [% END %]
246
247         [% IF ( fax ) %]<li><span class="label">Fax: </span>[% fax %]</li>[% END %]
248     [% UNLESS ( I ) %]
249         [% IF ( email ) %]<li class="email"><span class="label">Primary email:</span><a title="[% email %]" href="mailto:[% email | url %]">[% email | html %]</a></li>[% END %]
250         [% IF ( emailpro ) %]<li class="email"><span class="label">Secondary email: </span><a title="[% emailpro %]" href="mailto:[% emailpro | url %]">[% emailpro | html %]</a></li>[% END %]
251     [% END %]
252     [% IF ( initials ) %]<li><span class="label">Initials: </span>[% initials %]</li>[% END %]
253     [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth | $KohaDates %] ([% age %] years)</li>[% END %]
254     [% IF ( sex ) %]<li><span class="label">Gender:</span>
255     [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %]
256     </li>[% END %][% END %]
257     [% IF guarantees %]
258         <li>
259             <span class="label">Guarantees:</span>
260             <ul>
261                 [% FOREACH guarantee IN guarantees %]
262                     <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></li>
263                 [% END %]
264             </ul>
265         </li>
266     [% ELSIF guarantor %]
267         <li>
268             <span class="label">Guarantor:</span>
269             [% IF guarantor.borrowernumber %]
270                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber %]">[% guarantor.firstname | html %] [% guarantor.surname | html %]</a>
271             [% ELSE %]
272                 [% guarantor.firstname | html %] [% guarantor.surname | html %]
273             [% END %]
274         </li>
275     [% END %]
276 </ol>
277 </div>
278       <div class="action">
279         [% IF ( guarantor.borrowernumber ) %]
280         <a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=1&amp;guarantorid=[% guarantor.borrowernumber %]">Edit</a>
281         [% ELSE %]
282         <a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=1">Edit</a>
283         [% END %]</div>
284
285 </div>
286
287 <!-- Begin Upload Patron Image Section -->
288
289 <div id="manage-patron-image">
290 [% IF ( patronimages ) %]
291     [% IF ( CAN_user_tools_batch_upload_patron_images ) %]
292         <form method="post" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data">
293             <fieldset class="brief">
294             [% IF ( picture ) %]
295                 <legend>Manage patron image</legend>
296                 <div class="hint">To update the image for [% title | html %] [% surname | html %], select a new image file and click 'Upload.' <br />Click the 'Delete' button to remove the current image.
297             [% ELSE %]
298                 <legend>Upload patron image</legend>
299                 <div class="hint">[% title %] [% firstname | html %] [% surname | html %] does not currently have an image available. To import an image for [% title %] [% surname | html %], enter the name of an image file to upload.
300             [% END %]
301                     <br />Only PNG, GIF, JPEG, XPM formats are supported.
302                 </div>
303                 <input type="hidden" id="image" name="filetype" value="image" />
304                 <input type="hidden" id="cardnumber" name="cardnumber" value="[% cardnumber | html %]" />
305                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
306                 <ol>
307                     <li>
308                        <label for="uploadfile">Select the file to upload: </label><input type="file" id="uploadfile" name="uploadfile" />
309                     </li>
310                 </ol>
311                 <fieldset class="action">
312                     <input type="hidden" name="csrf_token" value="[% csrf_token %]" />
313                     <input type="submit" value="Upload" class="submit" />
314                     <input name="op" type="hidden" value="Upload" />
315                     [% IF ( picture ) %]<a id="delpicture" href="/cgi-bin/koha/tools/picture-upload.pl?op=Delete&amp;borrowernumber=[% borrowernumber %]&amp;csrf_token=[% csrf_token %]" class="delete">Delete</a>[% END %]
316                 </fieldset>
317             </fieldset>
318         </form>
319     [% END %]
320 [% END %]
321 </div>
322
323 <!-- End Upload Patron Image Section -->
324
325 [% IF Koha.Preference('HouseboundModule') %]
326 <div id="houseboundroles">
327 <h3>Housebound roles</h3>
328 <div class="rows">
329   <ol>
330     <li>
331       <span class="label">Chooser:</span>
332       [% IF ( housebound_role.housebound_chooser == 1 ) %]
333         Yes
334       [% ELSE %]
335         No
336       [% END %]
337     </li>
338     <li>
339       <span class="label">Deliverer:</span>
340       [% IF ( housebound_role.housebound_deliverer == 1 ) %]
341         Yes
342       [% ELSE %]
343         No
344       [% END %]
345     </li>
346   </ol>
347 </div>
348 </div>
349 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=4">Edit</a></div>
350 [% END %]
351
352 [% IF ( ExtendedPatronAttributes ) %]
353 [% UNLESS ( no_patron_attribute_types ) %]
354 <div id="patron-extended-attributes" style="padding-top: 1em;">
355 <h3>Additional attributes and identifiers</h3>
356 [% FOREACH attribute IN attributes_loop %]
357     [% IF attribute.class %]
358         <div id="aai_[% attribute.class %]" class="rows">
359     [% ELSE %]
360         <div id="aai" class="rows">
361     [% END %]
362         <h4>[% attribute.lib %]</h4>
363         <ol>
364         [% FOREACH item IN attribute.items %]
365             <li>
366                 <span class="label">[% item.description %]: </span>
367                 [% IF ( item.value_description ) %]
368                     [% item.value_description %]
369                 [% ELSE %]
370                     [% item.value| html_line_break %]
371                 [% END %]
372             </li>
373         [% END %]
374         </ol>
375     </div>
376 [% END %]
377 </div>
378 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=4">Edit</a></div>
379 [% END %]
380 [% END %]
381
382
383 [% IF ( EnhancedMessagingPreferences ) %]
384 <div id="patron-messaging-prefs" style="padding-top: 1em;">
385 <h3>Patron messaging preferences</h3>
386 [% INCLUDE 'messaging-preference-form.inc' %]
387  [% IF ( SMSSendDriver ) %]
388       <div class="rows"> <ol><li><span class="label">SMS number:</span><a href="sms:[% SMSnumber %]">[% SMSnumber %]</a>
389      </li></ol></div>
390  [% END %]
391 </div>
392 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=5">Edit</a></div>
393 [% END %]
394
395 </div>
396  <div class="yui-u"> 
397  <div id="patron-library-details">
398  <h3>Library use</h3>
399 <div class="rows"> 
400 <ol>
401     <li><span class="label">Card number: </span>[% cardnumber %]</li>
402         <li><span class="label">Borrowernumber: </span> [% borrowernumber %]</li>
403     <li><span class="label">Category: </span>[% description %] ([% categorycode %])</li>
404     <li><span class="label">Registration date: </span>[% dateenrolled | $KohaDates %]</li>
405     
406     <li><span class="label">Expiration date: </span>
407     [% IF ( was_renewed ) %]
408             <strong class="reregistrinfo">[% dateexpiry | $KohaDates %]</strong>
409     [% ELSE %]
410             [% dateexpiry | $KohaDates %]
411     [% END %]
412     </li>
413     
414     <li><span class="label">Library: </span>[% branchname %]</li>
415
416     [% IF ( OPACPrivacy ) %]<li><span class="label">Privacy Pref:</span>
417          [% IF ( privacy0 ) %]Forever[% END %]
418          [% IF ( privacy1 ) %]Default[% END %]
419          [% IF ( privacy2 ) %]Never[% END %]
420     </li>[% END %]
421
422     <li>
423         <span class="label">Show checkouts to guarantor</span>
424         [% IF privacy_guarantor_checkouts %]
425             Yes
426         [% ELSE %]
427             No
428         [% END %]
429     </li>
430
431     [% IF ( sort1 ) %]<li><span class="label">Sort field 1:</span>[% AuthorisedValues.GetByCode('Bsort1', sort1) %]</li>[% END %]
432     [% IF ( sort2 ) %]<li><span class="label">Sort field 2:</span>[% AuthorisedValues.GetByCode('Bsort2', sort2) %]</li>[% END %]
433     <li><span class="label">Username: </span>[% userid %]</li>
434     <li><span class="label">Password: </span>
435     [% IF ( password ) %]
436         *******
437     [% ELSE %]
438         <span class="problem"><a href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]">Undefined</a></span>
439     [% END %] 
440     </li>
441     [% IF ( borrowernotes ) %]<li><span class="label">Circulation note: </span>[% borrowernotes %]</li>[% END %]
442     [% IF ( opacnote ) %]<li><span class="label">OPAC note:</span>[% opacnote %]</li>[% END %]
443     [% IF Koha.Preference( 'NorwegianPatronDBEnable' ) == 1 %]
444         [% IF ( sync == 1 ) %]
445             <li><span class="label">Activate sync: </span>Yes</li>
446             [% IF ( syncstatus ) %]<li><span class="label">Sync status: </span>[% syncstatus %]</li>[% END %]
447             [% IF ( lastsync ) %]<li><span class="label">Last sync: </span>[% lastsync | $KohaDates %]</li>[% END %]
448         [% ELSE %]
449             <li><span class="label">Activate sync: </span>No</li>
450         [% END %]
451     [% END %]
452     [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
453       <li><span class="label">Check previous checkouts: </span>
454         [% IF ( checkprevcheckout == 'yes' ) %]
455         Yes
456         [% ELSIF ( checkprevcheckout == 'no' ) %]
457         No
458         [% ELSE %]
459         Inherited
460         [% END %]
461       </li>
462     [% END %]
463         </ol>
464         </div>
465  </div>
466     <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=3">Edit</a></div>
467  
468     [% UNLESS ( I ) %]
469  <div id="patron-alternate-address" style="padding-top: 1em;">
470     <h3>Alternate address</h3>
471
472     [% IF Koha.Preference( 'AddressFormat' ) %]
473         [% INCLUDE "member-display-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
474     [% ELSE %]
475         [% INCLUDE 'member-display-alt-address-style-us.inc' %]
476     [% END %]
477
478     <div class="rows">  <ol>
479       [% IF ( B_phone ) %]<li><span class="label">Phone: </span><a href="tel:[% B_phone %]">[% B_phone %]</a></li>[% END %]
480       [% IF ( B_email ) %]<li class="email"><span class="label">Email: </span><a title="[% B_email %]" href="mailto:[% B_email %]">[% B_email %]</a></li>[% END %]
481       [% IF ( contactnote ) %]<li><span class="label">Contact note: </span> [% contactnote %]</li>[% END %]
482       </ol>
483     </div>
484 </div>
485 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=6">Edit</a></div>
486     [% END %]
487
488  <div id="patron-alternative-contact" style="padding-top: 1em;">
489  <h3>Alternative contact</h3>
490    <div class="rows"> <ol><li><span class="label">Surname: </span>[% altcontactsurname | html %]</li>
491     <li><span class="label">First name: </span>[% altcontactfirstname | html %]</li>
492     <li><span class="label">Address: </span>[% altcontactaddress1 | html %]</li>
493     <li><span class="label">Address 2: </span>[% altcontactaddress2 | html %]</li>
494         <li><span class="label">City: </span>[% altcontactaddress3 | html %]</li>
495     [% IF ( altcontactstate ) %]<li><span class="label">State: </span>[% altcontactstate | html %]</li>[% END %]
496     <li><span class="label">ZIP/Postal code: </span>[% altcontactzipcode | html %]</li>
497         [% IF ( altcontactcountry ) %]<li><span class="label">Country: </span>[% altcontactcountry | html %]</li>[% END %]
498     [% IF ( altcontactphone ) %]<li><span class="label">Phone: </span><a href="tel:[% altcontactphone | url %]">[% altcontactphone | html %]</a></li>[% END %]
499     </ol></div>
500 </div>
501 <div class="action"><a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=2">Edit</a></div>
502
503 </div>
504 </div>
505
506 <div id="finesholdsissues" class="toptabs">
507     <ul>
508         <li><a href="#checkouts">[% issuecount %] Checkout(s)</a></li>
509         [% IF relatives_issues_count %]
510             <li><a href="#relatives-issues" id="relatives-issues-tab">Relatives' checkouts</a></li>
511         [% END %]
512         <li><a href="#finesandcharges">Fines &amp; Charges</a></li>
513         <li>
514             [% IF ( holds_count ) %]
515                 <a href="#reserves" id="holds-tab">[% holds_count %] Hold(s)</a>
516             [% ELSE %]
517                 <a href="#reserves" id="holds-tab">0 Holds</a>
518             [% END %]
519         </li>
520         [% IF Koha.Preference('ArticleRequests') %]
521             <li>
522                 <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count %] Article requests</a>
523             </li>
524         [% END %]
525         <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
526         [% SET enrollments = borrower.get_club_enrollments.size || 0 %]
527         [% SET enrollable  = borrower.get_enrollable_clubs.size || 0 %]
528         [% IF CAN_user_clubs && ( enrollments || enrollable ) %]
529             <li>
530                 <a id="clubs-tab-link" href="#clubs-tab">
531                     Clubs ([% enrollments %]/[% enrollable %])
532                 </a>
533             </li>
534         [% END %]
535     </ul>
536
537 [% INCLUDE "checkouts-table.inc" %]
538
539 [% IF ( relatives_issues_count ) %]
540     <div id="relatives-issues">
541         <table id="relatives-issues-table" style="width: 100% !Important;">
542             <thead>
543                 <tr>
544                     <th scope="col">Due date hidden not formatted</th>
545                     <th scope="col">Due date</th>
546                     <th scope="col">Title</th>
547                     <th scope="col">Item type</th>
548                     <th scope="col">Location</th>
549                     <th scope="col">Checked out on</th>
550                     <th scope="col">Checked out from</th>
551                     <th scope="col">Call no</th>
552                     <th scope="col">Charge</th>
553                     <th scope="col">Fine</th>
554                     <th scope="col">Price</th>
555                     <th scope="col">Patron</th>
556                 </tr>
557             </thead>
558         </table>
559     </div>
560 [% END %]
561
562 <div id="finesandcharges">
563     [% IF ( totaldue_raw ) %]
564         <p>Total due: [% totaldue %]</p>
565     [% ELSE %]
566         <p>No outstanding charges</p>
567     [% END %]
568 </div>
569
570 [% IF CAN_user_clubs && ( enrollments || enrollable ) %]
571     <div id="clubs-tab">
572         Loading...
573     </div>
574 [% END %]
575
576 [% INCLUDE borrower_debarments.inc %]
577
578 <div id="reserves">
579 [% IF ( holds_count ) %]
580     <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
581         <input type="hidden" name="from" value="circ" />
582         <table id="holds-table" style="width: 100% !Important;">
583             <thead>
584                 <tr>
585                     <th>Hold date</th>
586                     <th>Title</th>
587                     <th>Call number</th>
588                     <th>Barcode</th>
589                     <th>Pickup at</th>
590                     <th>Expiration</th>
591                     <th>Priority</th>
592                     <th>Delete?</th>
593                     <th>Suspend?</th>
594                 </tr>
595             </thead>
596         </table>
597
598         <fieldset class="action">
599             <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
600         </fieldset>
601     </form>
602
603     [% IF SuspendHoldsIntranet %]
604     <fieldset class="action">
605         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
606             <input type="hidden" name="from" value="borrower" />
607             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
608             <input type="submit" value="Suspend all holds" />
609
610             [% IF AutoResumeSuspendedHolds %]
611             <label for="suspend_until">until</label>
612             <input type="text" size="10" id="suspend_until" name="suspend_until datepicker"/>
613             <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
614             [% END %]
615         </form>
616     </fieldset>
617
618     <fieldset class="action">
619         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
620             <input type="hidden" name="from" value="borrower" />
621             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
622             <input type="hidden" name="suspend" value="0" />
623             <input type="submit" value="Resume all suspended holds" />
624         </form>
625     </fieldset>
626     [% END # IF SuspendHoldsIntranet %]
627
628     [% ELSE %]<p>Patron has nothing on hold.</p>[% END %]
629         </div>
630
631
632 [% IF Koha.Preference('ArticleRequests') %]
633     [% INCLUDE 'patron-article-requests.inc' %]
634 [% END %]
635
636 </div>
637 [% END %] <!-- unknowuser -->
638
639
640 </div>
641 </div>
642 <div class="yui-b">
643 [% INCLUDE 'circ-menu.inc' %]
644 </div>
645 </div>
646 [% INCLUDE 'intranet-bottom.inc' %]