Bug 29983: Display the pretend claim column in overdue.tt
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / moremember.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Context %]
4 [% USE Koha %]
5 [% USE Branches %]
6 [% USE ItemTypes %]
7 [% USE KohaDates %]
8 [% USE AuthorisedValues %]
9 [% USE TablesSettings %]
10 [% USE Price %]
11 [% PROCESS 'member-display-address-style.inc' %]
12 [% PROCESS 'member-display-alt-address-style.inc' %]
13 [% SET footerjs = 1 %]
14 [% INCLUDE 'doc-head-open.inc' %]
15 [% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %]
16 <title>
17     [% UNLESS blocking_error %]
18         Patron details for [% INCLUDE 'patron-title.inc' no_html = 1 %]
19     [% END %] &rsaquo; Patrons &rsaquo; Koha
20 </title>
21 [% INCLUDE 'doc-head-close.inc' %]
22 </head>
23
24 <body id="pat_moremember" class="pat">
25     [% INCLUDE 'header.inc' %]
26     [% INCLUDE 'patron-search-header.inc' %]
27
28     <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
29         <ol>
30             <li>
31                 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
32             </li>
33
34             [% IF blocking_error %]
35                 <li>
36                     <a href="#" aria-current="page">
37                         Patrons
38                     </a>
39                 </li>
40             [% ELSE %]
41                 <li>
42                     <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
43                 </li>
44                 <li>
45                     <a href="#" aria-current="page">
46                         Patron details for [% INCLUDE 'patron-title.inc' %]
47                     </a>
48                 </li>
49             [% END %]
50         </ol>
51     </nav>
52
53     <div class="main container-fluid">
54         <div class="row">
55             <div class="col-sm-10 col-sm-push-2">
56                 <main>
57
58
59                     [% INCLUDE 'members-toolbar.inc' %]
60
61                     [% IF ( error ) %]
62                         <div class="dialog alert">
63                             [% IF ( error == 'CANT_DELETE_STAFF' ) %]
64                                 <h3>Unable to delete staff user</h3>
65                                 <p>Insufficient privileges.</p>
66                             [% END %]
67                             [% IF ( error == 'CANT_DELETE_YOURSELF' ) %]
68                                 <h3>Not allowed to delete own account</h3>
69                                 <p>Deleting your own account would lock you out of Koha.</p>
70                             [% END %]
71                             [% IF ( error == 'CANT_DELETE_OTHERLIBRARY' ) %]
72                                 <h3>Unable to delete patrons from other libraries with current settings</h3>
73                                 <p>Insufficient privileges.</p>
74                             [% END %]
75                             [% IF ( error == 'CANT_DELETE_ANONYMOUS_PATRON' ) %]
76                                 <h3>Unable to delete patron that is set as AnonymousPatron</h3>
77                                 <p>This patron cannot be deleted while set as AnonymousPatron in the system preferences.</p>
78                             [% END %]
79                             [% IF ( error == 'CANT_DELETE' ) %]
80                                 <h3>Unable to delete patron</h3>
81                                 <p>Insufficient privileges.</p>
82                             [% END %]
83                         </div>
84                     [% END %]
85
86                     <div class="row">
87
88                         [% IF ( was_renewed ) %]
89                             <div class="dialog message">
90                                 Patron's account has been renewed until [% patron.dateexpiry | $KohaDates %]
91                             </div>
92                         [% END %]
93
94                         <div id="patron_messages" class="circmessage attention">
95                             [% INCLUDE 'patron_messages.inc' %]
96                         </div>
97
98                         <h1>[% INCLUDE 'patron-title.inc' no_html = 1 %]</h1>
99                         <div class="col-sm-6">
100
101                             <div id="patron-information" class="patroninfo-section">
102
103                                 <div class="patroninfo-heading">
104                                     <h3>Contact information</h3>
105                                     [% IF ( guarantor.borrowernumber ) %]
106                                         <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=1&amp;guarantorid=[% guarantor.borrowernumber | html %]"><i class="fa fa-pencil"></i> Edit</a>
107                                     [% ELSE %]
108                                         <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=1"><i class="fa fa-pencil"></i> Edit</a>
109                                     [% END %]
110                                 </div>
111
112                                 [% IF ( patron.othernames ) %]&ldquo;[% patron.othernames | html %]&rdquo;[% END %]
113
114                                 <div class="address">
115                                     <ul>
116                                         [% PROCESS 'display-address-style' %]
117                                     </ul>
118                                 </div>
119
120                                 <div class="rows">
121                                     <ol>
122                                         [% IF ( patron.phone ) %]
123                                             <li>
124                                                 <span class="label">Primary phone: </span>
125                                                 <a href="tel:[% patron.phone | uri %]">[% patron.phone | html %]</a>
126                                             </li>
127                                         [% END %]
128                                         [% IF ( patron.phonepro ) %]
129                                             <li>
130                                                 <span class="label">Secondary phone: </span>
131                                                 <a href="tel:[% patron.phonepro | uri %]">[% patron.phonepro | html %]</a>
132                                             </li>
133                                         [% END %]
134                                         [% IF ( patron.mobile ) %]
135                                             <li>
136                                                 <span class="label">Other phone: </span>
137                                                 <a href="tel:[% patron.mobile | uri %]">[% patron.mobile | html %]</a>
138                                             </li>
139                                         [% END %]
140                                         [% IF ( patron.fax ) %]
141                                             <li>
142                                                 <span class="label">Fax: </span>
143                                                 [% patron.fax | html %]
144                                             </li>
145                                         [% END %]
146                                         [% IF ( patron.email ) %]
147                                             <li class="email">
148                                                 <span class="label">Primary email:</span>
149                                                 <a title="[% patron.email | html %]" href="mailto:[% patron.email | url %]">[% patron.email | html %]</a>
150                                             </li>
151                                         [% END %]
152                                         [% IF ( patron.emailpro ) %]
153                                             <li class="email">
154                                                 <span class="label">Secondary email: </span>
155                                                 <a title="[% patron.emailpro | html %]" href="mailto:[% patron.emailpro | url %]">[% patron.emailpro | html %]</a>
156                                             </li>
157                                         [% END %]
158                                         [% UNLESS ( I ) %]
159                                             [% IF ( patron.initials ) %]
160                                                 <li>
161                                                     <span class="label">Initials: </span>
162                                                     [% patron.initials | html %]
163                                                 </li>
164                                             [% END %]
165                                             [% IF ( patron.dateofbirth ) %]
166                                                 <li>
167                                                     <span class="label">Date of birth:</span>
168                                                     [% INCLUDE 'patron-age.inc' %]
169                                                 </li>
170                                             [% END %]
171                                             [% IF ( patron.sex ) %]
172                                                 <li>
173                                                     <span class="label">Gender:</span>
174                                                     [% IF ( patron.sex == 'F' ) %]<span class="patronsex-female">Female</span>[% ELSIF ( patron.sex == 'M' ) %]<span class="patronsex-male">Male</span>[% ELSIF (patron.sex == 'O' ) %]<span class="patronsex-other">Other</span>[% ELSE %][% patron.sex | html %][% END %]
175                                                 </li>
176                                             [% END %]
177                                         [% END %]
178                                          <li id="patron-privacyguarantor">
179                                             <span class="label">Show checkouts to guarantor</span>
180                                             [% IF patron.privacy_guarantor_checkouts %]
181                                                 Yes
182                                             [% ELSE %]
183                                                 No
184                                             [% END %]
185                                         </li>
186
187                                         <li id="patron-privacy_guarantor_fines">
188                                             <span class="label">Show fines to guarantor</span>
189                                             [% IF patron.privacy_guarantor_fines %]
190                                                 Yes
191                                             [% ELSE %]
192                                                 No
193                                             [% END %]
194                                         </li>
195
196                                         [% IF guarantees %]
197                                             <li>
198                                                 <span class="label">Guarantees:</span>
199                                                 <ul>
200                                                     [% FOREACH guarantee IN guarantees %]
201                                                         [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
202                                                             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber | uri %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></li>
203                                                         [% ELSE %]
204                                                             <li>[% guarantee.firstname | html %] [% guarantee.surname | html %]</li>
205                                                         [% END %]
206                                                     [% END %]
207                                                 </ul>
208                                             </li>
209                                         [% ELSIF guarantor_relationships.count > 0 OR ( patron.contactfirstname OR patron.contactname ) %]
210                                                 <li>
211                                                 [% IF guarantor_relationships.count > 1 OR guarantor_relationships.count == 0 AND ( patron.contactfirstname OR patron.contactname ) %]
212                                                     <span class="label">Guarantors:</span>
213                                                 [% ELSE %]
214                                                     <span class="label">Guarantor:</span>
215                                                 [% END %]
216                                                     <ul>
217                                                     [% FOREACH gr IN guarantor_relationships %]
218                                                         [% SET guarantor = gr.guarantor %]
219                                                         [% IF logged_in_user.can_see_patron_infos( guarantor ) %]
220                                                             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.id | uri %]">[% guarantor.firstname | html %] [% guarantor.surname | html %][% IF gr.relationship %] ([% gr.relationship | html %])[% END %]</a></li>
221                                                         [% END %]
222                                                     [% END %]
223                                                     [% IF patron.contactfirstname OR patron.contactname %]
224                                                         <li>[% patron.contactfirstname | html %] [% patron.contactname | html %][% IF patron.relationship %] ([% patron.relationship | html %])[% END %]</li>
225                                                     [% END %]
226                                                     </ul>
227                                                 </li>
228                                         [% END %]
229
230                                         [% IF ( patron.primary_contact_method ) %]
231                                             <li>
232                                                 <span class="label">Main contact method: </span>
233                                                 [% SWITCH patron.primary_contact_method %]
234                                                     [% CASE 'phone' %]
235                                                         <span>Primary phone</span>
236                                                     [% CASE 'phonepro' %]
237                                                         <span>Secondary phone</span>
238                                                     [% CASE 'mobile' %]
239                                                         <span>Other phone</span>
240                                                     [% CASE 'email' %]
241                                                         <span>Primary email</span>
242                                                     [% CASE 'emailpro' %]
243                                                         <span>Secondary email</span>
244                                                     [% CASE 'fax' %]
245                                                         <span>Fax</span>
246                                                 [% END %]
247                                             </li>
248                                         [% END %]
249                                     </ol>
250                                 </div> [% # /div.rows %]
251                             </div> [% # /div#patron-information %]
252
253                             [% IF Koha.Preference('HouseboundModule') %]
254                                 <div id="houseboundroles" class="patroninfo-section">
255                                     [% IF ( housebound_role.housebound_chooser == 1 OR housebound_role.housebound_deliverer == 1 ) %]
256                                         <div class="patroninfo-heading">
257                                             <h3>Housebound roles</h3>
258                                             <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=7"><i class="fa fa-pencil"></i> Edit</a>
259                                         </div>
260                                         <div class="rows">
261                                             <ol>
262                                                 <li>
263                                                     <span class="label">Chooser:</span>
264                                                     [% IF ( housebound_role.housebound_chooser == 1 ) %]
265                                                         Yes
266                                                     [% ELSE %]
267                                                         No
268                                                     [% END %]
269                                                 </li>
270                                                 <li>
271                                                     <span class="label">Deliverer:</span>
272                                                     [% IF ( housebound_role.housebound_deliverer == 1 ) %]
273                                                         Yes
274                                                     [% ELSE %]
275                                                         No
276                                                     [% END %]
277                                                 </li>
278                                             </ol>
279                                         </div>
280                                     [% ELSE %]
281                                         <div class="patroninfo-heading">
282                                             <h3>Housebound roles</h3>
283                                             <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=7"><i class="fa fa-plus"></i> Add</a>
284                                         </div>
285                                     [% END %]
286                                 </div> [% #/ div#houseboundroles %]
287                             [% END %]
288
289                             [% IF Koha.Preference('ExtendedPatronAttributes') %]
290                                 [% UNLESS ( no_patron_attribute_types ) %]
291                                     <div id="patron-extended-attributes" class="patroninfo-section">
292                                         [% IF ( attributes_loop ) %]
293                                             <div class="patroninfo-heading">
294                                                 <h3>Additional attributes and identifiers</h3>
295                                                 <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=4"><i class="fa fa-pencil"></i> Edit</a>
296                                             </div>
297                                             [% FOREACH attribute IN attributes_loop %]
298                                                 [% IF attribute.class %]
299                                                     <div id="aai_[% attribute.class | html %]" class="rows">
300                                                 [% ELSE %]
301                                                     <div id="aai" class="rows">
302                                                 [% END %]
303                                                     <h4>[% attribute.lib | html %]</h4>
304                                                     <ol>
305                                                         [% FOREACH item IN attribute.items %]
306                                                             <li>
307                                                                 <span class="label">[% item.type.description | html %]: </span>
308                                                                 [% item.description | html_line_break %]
309                                                             </li>
310                                                         [% END %]
311                                                     </ol>
312                                                 </div>
313                                             [% END %]
314                                             <div class="action">
315                                             </div>
316                                         [% ELSE %]
317                                             <div class="patroninfo-heading">
318                                                 <h3>Additional attributes and identifiers</h3>
319                                                 <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=4"><i class="fa fa-plus"></i> Add</a>
320                                             </div>
321                                         [% END %]
322                                     </div> [% # /div#patron-extended-attributes %]
323                                 [% END %]
324                             [% END %]
325
326                             [% IF ( EnhancedMessagingPreferences ) %]
327                                 <div id="patron-messaging-prefs" class="patroninfo-section">
328                                     <div class="patroninfo-heading">
329                                         <h3>Patron messaging preferences</h3>
330                                         <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=5"><i class="fa fa-pencil"></i> Edit</a>
331                                     </div>
332                                     [% INCLUDE 'messaging-preference-form.inc' %]
333                                     [% IF Koha.Preference('SMSSendDriver') %]
334                                         <div class="rows">
335                                             <ol>
336                                                 <li>
337                                                     <span class="label">SMS number:</span>
338                                                     <a href="sms:[% patron.smsalertnumber | uri %]">[% patron.smsalertnumber | html %]</a>
339                                                 </li>
340                                                 [% IF Koha.Preference( 'SMSSendDriver') == 'Email' %]
341                                                 <li>
342                                                     <span class="label">SMS provider:</span>
343                                                     [% patron.sms_provider.name | html %]
344                                                 </li>
345                                                 [% END %]
346                                             </ol>
347                                         </div>
348                                     [% END %]
349                                 </div> [% # /div#patron-messaging-prefs %]
350                             [% END %]
351
352                         </div> <!-- /.col-sm-6 -->
353
354                         <div class="col-sm-6">
355                             <div id="patron-library-details" class="patroninfo-section">
356                                 <div class="patroninfo-heading">
357                                     <h3>Library use</h3>
358                                     <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=3"><i class="fa fa-pencil"></i> Edit</a>
359                                 </div>
360                                 <div class="rows">
361                                     <ol>
362                                         <li id="patron-cardnumber">
363                                             <span class="label">Card number: </span>
364                                             [% patron.cardnumber | html %]
365                                         </li>
366                                         <li id="patron-borrowernumber">
367                                             <span class="label">Borrowernumber: </span>
368                                             [% patron.borrowernumber | html %]
369                                         </li>
370                                         <li id="patron-categorydescription">
371                                             <span class="label">Category: </span>
372                                             [% patron.category.description | html %] ([% patron.categorycode | html %])
373                                         </li>
374                                         <li id="patron-dateenrolled">
375                                             <span class="label">Registration date: </span>
376                                             [% patron.dateenrolled | $KohaDates %]
377                                         </li>
378
379                                         [% IF ( patron.date_renewed ) %]
380                                             <li id="patron-daterenewed">
381                                                 <span class="label">Renewal date: </span>
382                                                 [% patron.date_renewed | $KohaDates %]
383                                             </li>
384                                         [% END %]
385
386                                         <li id="patron-expirationdate">
387                                             <span class="label">Expiration date: </span>
388                                             [% IF ( was_renewed ) %]
389                                                 <strong class="reregistrinfo">[% patron.dateexpiry | $KohaDates %]</strong>
390                                             [% ELSIF ( patron.is_expired ) %]
391                                                 <span class="blocker">
392                                                     [% patron.dateexpiry | $KohaDates %]
393                                                     <strong><em>Expired</em></strong>
394                                                     <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]">Edit details</a>
395                                                 </span>
396                                             [% ELSIF ( patron.is_going_to_expire ) %]
397                                                 [% patron.dateexpiry | $KohaDates %]
398                                                 <strong><em>Patron expires soon</em></strong>
399                                                 <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]">Edit details</a>
400                                             [% ELSE %]
401                                                 [% patron.dateexpiry | $KohaDates %]
402                                             [% END %]
403                                         </li>
404                                         <li id="patron-branchname">
405                                             <span class="label">Library: </span>
406                                             [% Branches.GetName( patron.branchcode ) | html %]
407                                         </li>
408
409                                         [% IF Koha.Preference( 'OPACPrivacy') %]
410                                             <li id="patron-privacypref">
411                                                 <span class="label">Privacy pref:</span>
412                                                     [% IF ( patron.privacy == 0 ) %]<span>Forever</span>[% END %]
413                                                     [% IF ( patron.privacy == 1 ) %]<span>Default</span>[% END %]
414                                                     [% IF ( patron.privacy == 2 ) %]<span>Never</span>[% END %]
415                                             </li>
416                                         [% END %]
417
418                                         [% IF ( patron.sort1 ) %]
419                                             <li id="patron-sort1">
420                                                 <span class="label">Sort field 1:</span>
421                                                 [% AuthorisedValues.GetByCode('Bsort1', patron.sort1) | html %]
422                                             </li>
423                                         [% END %]
424                                         [% IF ( patron.sort2 ) %]
425                                             <li id="patron-sort2">
426                                                 <span class="label">Sort field 2:</span>
427                                                 [% AuthorisedValues.GetByCode('Bsort2', patron.sort2) | html %]
428                                             </li>
429                                         [% END %]
430                                         [% UNLESS ( patron.autorenew_checkouts ) %]
431                                             <li id="patron-autorenew_checkouts">
432                                                 <span class="label">Auto-renewal:</span>
433                                                 Patron has opted out
434                                             </li>
435                                         [% END %]
436                                         <li id="patron-username">
437                                             <span class="label">Username: </span>
438                                             [% patron.userid | html %]
439                                         </li>
440                                         <li id="patron-password">
441                                             <span class="label">Password: </span>
442                                             [% IF ( patron.password ) %]
443                                                 *******
444                                             [% ELSE %]
445                                                 <i class="fa fa-exclamation-circle problem" aria-hidden="true"></i> <a href="/cgi-bin/koha/members/member-password.pl?member=[% patron.borrowernumber | uri %]">Undefined</a>
446                                             [% END %]
447                                         </li>
448                                         [% IF CAN_user_superlibrarian %]
449                                             <li id="patron-password_expiration_date">
450                                                 <span class="label">Password expires:</span>
451                                                 [% IF ( patron.password_expiration_date ) %]
452                                                     [% patron.password_expiration_date | $KohaDates %]
453                                                 [% ELSE %]
454                                                     <span>Never</span>
455                                                 [% END %]
456                                             </li>
457                                         [% END %]
458
459                                         [% IF ( patron.borrowernotes ) %]
460                                             <li id="patron-borrowernotes">
461                                                 <span class="label">Circulation note: </span><br />
462                                                 [% patron.borrowernotes | $raw | html_line_break %]
463                                             </li>
464                                         [% END %]
465
466                                         [% IF ( patron.opacnote ) %]
467                                             <li id="patron-opacnote">
468                                                 <span class="label">OPAC note:</span><br />
469                                                 [% patron.opacnote | html | html_line_break %]
470                                             </li>
471                                         [% END %]
472
473                                         [% IF ( Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' ) %]
474                                             <li id="patron-checkprev">
475                                                 <span class="label">Check previous checkouts: </span>
476                                                 [% IF ( patron.checkprevcheckout == 'yes' ) %]
477                                                     <span>Yes</span>
478                                                 [% ELSIF ( patron.checkprevcheckout == 'no' ) %]
479                                                     <span>No</span>
480                                                 [% ELSE %]
481                                                     <span>Inherited</span>
482                                                 [% END %]
483                                             </li>
484                                         [% END %]
485
486                                         [% IF Koha.Preference('TranslateNotices') %]
487                                             <li id="patron-translatenotices">
488                                                 <span class="label">Preferred language for notices: </span>
489                                                 [% translated_language | html %]
490                                             </li>
491                                         [% END %]
492                                     </ol>
493                                 </div> [% # /div.rows %]
494                             </div> [% # /div#patron-library-details %]
495
496                             <div id="patron-alternate-address" class="patroninfo-section">
497                                 [% IF ( patron.B_phone || patron.B_email || patron.contactnote || patron.B_address || patron.B_address2 || patron.B_city || patron.B_zipcode || patron.B_country ) %]
498                                     <div class="patroninfo-heading">
499                                         <h3>Alternate address</h3>
500                                         <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=6"><i class="fa fa-pencil"></i> Edit</a>
501                                     </div>
502                                     <div class="address">
503                                         <ul>
504                                             [% PROCESS 'display-alt-address-style' %]
505                                         </ul>
506                                     </div>
507                                     <div class="rows">
508                                         <ol>
509                                             [% IF ( patron.B_phone ) %]
510                                                 <li id="patron-bphone">
511                                                     <span class="label">Phone: </span>
512                                                     <a href="tel:[% patron.B_phone | uri %]">[% patron.B_phone |html  %]</a>
513                                                 </li>
514                                             [% END %]
515
516                                             [% IF ( patron.B_email ) %]
517                                                 <li id="patron-bemail" class="email">
518                                                     <span class="label">Email: </span>
519                                                     <a title="[% patron.B_email | html %]" href="mailto:[% patron.B_email | url %]">[% patron.B_email |html %]</a>
520                                                 </li>
521                                             [% END %]
522
523                                             [% IF ( patron.contactnote ) %]
524                                                 <li id="patron-contactnote">
525                                                     <span class="label">Contact note: </span>
526                                                     [% patron.contactnote |html %]
527                                                 </li>
528                                             [% END %]
529                                         </ol>
530                                     </div>
531                                 [% ELSE %]
532                                     <div class="patroninfo-heading">
533                                       <h3 class="inline">Alternate address</h3>
534                                         <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=6"><i class="fa fa-plus"></i> Add</a>
535                                     </div>
536                                 [% END %]
537                             </div> [% # /div#patron-alternate-address %]
538
539                             <div id="patron-alternative-contact" class="patroninfo-section">
540                                 [% IF ( patron.altcontactsurname || patron.altcontactfirstname || patron.altcontactaddress1 || patron.altcontactaddress2 || patron.altcontactaddress3 || patron.altcontactstate || patron.altcontactzipcode || patron.altcontactcountry || patron.altcontactphone ) %]
541                                     <div class="patroninfo-heading">
542                                         <h3>Alternative contact</h3>
543                                         <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=2"><i class="fa fa-pencil"></i> Edit</a>
544                                     </div>
545                                     <div class="rows">
546                                         <ol>
547                                             [% IF ( patron.altcontactsurname ) %]
548                                                 <li id="patron-altcontactsurname">
549                                                     <span class="label">Surname: </span>
550                                                     [% patron.altcontactsurname | html %]
551                                                 </li>
552                                             [% END %]
553                                             [% IF ( patron.altcontactfirstname ) %]
554                                                 <li id="patron-altcontactfirstname">
555                                                     <span class="label">First name: </span>
556                                                     [% patron.altcontactfirstname | html %]
557                                                 </li>
558                                             [% END %]
559                                             [% IF ( patron.altcontactaddress1 ) %]
560                                                 <li id="patron-altcontactaddress1">
561                                                     <span class="label">Address: </span>
562                                                     [% patron.altcontactaddress1 | html %]
563                                                 </li>
564                                             [% END %]
565                                             [% IF ( patron.altcontactaddress2 ) %]
566                                                 <li id="patron-altcontactaddress2">
567                                                     <span class="label">Address 2: </span>
568                                                     [% patron.altcontactaddress2 | html %]
569                                                 </li>
570                                             [% END %]
571                                             [% IF ( patron.altcontactaddress3 ) %]
572                                                 <li id="patron-altcontactaddress3">
573                                                     <span class="label">City: </span>
574                                                     [% patron.altcontactaddress3 | html %]
575                                                 </li>
576                                             [% END %]
577
578                                             [% IF ( patron.altcontactstate ) %]
579                                                 <li id="patron-altcontactstate">
580                                                     <span class="label">State: </span>
581                                                     [% patron.altcontactstate | html %]
582                                                 </li>
583                                             [% END %]
584                                             [% IF ( patron.altcontactzipcode ) %]
585                                                 <li id="patron-altcontactzipcode">
586                                                     <span class="label">ZIP/Postal code: </span>
587                                                     [% patron.altcontactzipcode | html %]
588                                                 </li>
589                                             [% END %]
590                                             [% IF ( patron.altcontactcountry ) %]
591                                                 <li id="patron-altcontactcountry">
592                                                     <span class="label">Country: </span>
593                                                     [% patron.altcontactcountry | html %]
594                                                 </li>
595                                             [% END %]
596                                             [% IF ( patron.altcontactphone ) %]
597                                                 <li id="patron-altcontactphone">
598                                                     <span class="label">Phone: </span>
599                                                     <a href="tel:[% patron.altcontactphone | url %]">[% patron.altcontactphone | html %]</a>
600                                                 </li>
601                                             [% END %]
602                                         </ol>
603                                     </div> [% # /div.rows %]
604                                 [% ELSE %]
605                                     <div class="patroninfo-heading">
606                                         <h3>Alternative contact</h3>
607                                         <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&amp;borrowernumber=[% patron.borrowernumber | html %]&amp;step=2"><i class="fa fa-plus"></i> Add</a>
608                                     </div>
609                                 [% END %]
610                             </div> [% # /div#patron-alternative-contact %]
611
612                             [% IF Koha.Preference('EnableBorrowerFiles') %]
613                                 <div id="patron-files" class="patroninfo-section">
614                                     <div class="patroninfo-heading">
615                                         <h3>Files</h3>
616                                         <a class="btn btn-default btn-xs" href="/cgi-bin/koha/members/files.pl?borrowernumber=[% patron.borrowernumber | uri %]"><i class="fa fa-list"></i> Manage</a>
617
618                                         [% IF ( files ) %]
619                                             <div class="rows">
620                                                 <ol>
621                                                     [% FOREACH f IN files %]
622                                                         <li>
623                                                             <a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% patron.borrowernumber | uri %]&amp;op=download&amp;file_id=[% f.file_id | uri %]">[% f.file_name | html %]</a>
624                                                             [% IF ( f.file_description ) %]
625                                                                 - [% f.file_description | html %]
626                                                             [% END %]
627                                                         </li>
628                                                     [% END # /FOREACH f %]
629                                                 </ol>
630                                             </div>
631                                         [% END # /IF files %]
632
633                                     </div> <!-- /.patroninfo-heading -->
634                                 </div> <!-- /#patron-files -->
635                             [% END # /IF EnableBorrowerFiles %]
636
637                         </div> <!-- /div.col-sm-6 -->
638                     </div> <!-- /div.row -->
639
640                     <div id="finesholdsissues" class="toptabs">
641                         <ul>
642                             <li>
643                                 <a href="#checkouts">Checkouts ([% issuecount || 0 | html %])</a>
644                             </li>
645                             [% IF relatives_issues_count %]
646                                 <li>
647                                     <a href="#relatives-issues" id="relatives-issues-tab">Relatives' checkouts ([% relatives_issues_count | html %])</a>
648                                 </li>
649                             [% END %]
650                             [% IF ( fines ) %]
651                                 <li id="finestab">
652                                     <a href="#finesandcharges">Charges ([% fines | $Price %])</a>
653                                 </li>
654                             [% END %]
655                             [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
656                                 <li>
657                                         <a href="#reserves" id="holds-tab">Holds ([% holds_count || 0 | html %])</a>
658                                 </li>
659                             [% END %]
660
661                             [% IF Koha.Preference('UseRecalls') %]
662                                 <li>
663                                     <a href="#recalls" id="recalls-tab">Recalls ([% recalls.count || 0 | html %])</a>
664                                 </li>
665                             [% END %]
666
667                             [% IF Koha.Preference('ArticleRequests') %]
668                                 [% SET article_requests = Context.Scalar( Context.Scalar( patron, 'article_requests' ), 'filter_by_current') %]
669                                 <li>
670                                     <a href="#article-requests" id="article-requests-tab">Article requests ([% article_requests.count || 0 | html %])</a>
671                                 </li>
672                             [% END %]
673
674                             [% IF Koha.Preference('ClaimReturnedLostValue') || Koha.Preference('BundleLostValue') %]
675                                 <li>
676                                     [% IF ( patron.return_claims.count ) %]
677                                         <a href="#return-claims" id="return-claims-tab">
678                                             Claims
679                                             ([% IF patron.return_claims.resolved.count == 0 %]
680                                                 <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span>
681                                             [% ELSE %]
682                                                 <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span>
683                                             [% END %]
684                                             [% IF patron.return_claims.unresolved.count == 0 %]
685                                                 <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span>
686                                             [% ELSE %]
687                                                 <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span>
688                                             [% END %])
689                                         </a>
690                                     [% ELSE %]
691                                         <a href="#return-claims" id="return-claims-tab">
692                                             Claims
693                                             (<span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">0</span>
694                                             <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span>)
695                                         </a>
696                                     [% END %]
697                                 </li>
698                             [% END %]
699
700                             <li>
701                                 <a id="debarments-tab-link" href="#reldebarments">Restrictions ([% debarments.size || 0 | html %])</a>
702                             </li>
703
704                             [% SET enrollments = patron.get_club_enrollments %]
705                             [% SET enrollable  = patron.get_enrollable_clubs(0) %] <!-- 0 => not OPAC -->
706                             [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
707                                 <li>
708                                     <a id="clubs-tab-link" href="#clubs-tab">
709                                         Clubs ([% enrollments.count | html %]/[% enrollable.count | html %])
710                                     </a>
711                                 </li>
712                             [% END %]
713                         </ul>
714
715                         [% INCLUDE "checkouts-table.inc" %]
716
717                         [% INCLUDE "relatives-issues-table.inc" %]
718
719                         [% IF ( fines ) %]
720                             <div id="finesandcharges">
721                                 [% IF ( fines ) %]
722                                     <p>Total due: [% fines | $Price %]</p>
723                                 [% ELSE %]
724                                     <p>No outstanding charges</p>
725                                 [% END %]
726                             </div>
727                         [% END %]
728
729                         [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %]
730                             <div id="clubs-tab">
731                                 Loading...
732                             </div>
733                         [% END %]
734
735                         [% INCLUDE borrower_debarments.inc %]
736
737                         [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
738                             <div id="reserves">
739                                 [% IF ( holds_count ) %]
740                                     <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
741                                         <input type="hidden" name="from" value="circ" />
742                                         <table id="holds-table" style="width: 100% !Important;">
743                                             <thead>
744                                                 <tr>
745                                                     <th>Hold date</th>
746                                                     <th>Title</th>
747                                                     <th>Call number</th>
748                                                     <th>Item type</th>
749                                                     <th>Barcode</th>
750                                                     <th>Pickup at</th>
751                                                     <th>Expiration</th>
752                                                     <th>Priority</th>
753                                                     <th>Delete?</th>
754                                                     <th>Suspend?</th>
755                                                     <th>Status</th>
756                                                 </tr>
757                                             </thead>
758                                         </table>
759
760                                         <fieldset class="action">
761                                             <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
762
763                                             [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
764                                             [% IF hold_cancellation.count %]
765                                                 <label for="cancellation-reason">Cancellation reason:</label>
766                                                 <select name="cancellation-reason">
767                                                     <option value="">No reason given</option>
768                                                     [% FOREACH reason IN hold_cancellation %]
769                                                         <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option>
770                                                     [% END %]
771                                                 </select>
772                                             [% END %]
773                                         </fieldset>
774                                     </form>
775
776                                     [% IF Koha.Preference('SuspendHoldsIntranet') %]
777                                         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
778                                             <fieldset class="action">
779                                                 <input type="hidden" name="from" value="borrower" />
780                                                 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
781                                                 <input type="submit" value="Suspend all holds" />
782
783                                                 [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
784                                                     <label for="suspend_until">until</label>
785                                                     <input type="text" size="10" id="suspend_until" name="suspend_until" class="flatpickr" data-flatpickr-futuredate="true"/>
786                                                     <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
787                                                 [% END %]
788                                             </fieldset>
789                                         </form>
790
791                                         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
792                                             <fieldset class="action">
793                                                 <input type="hidden" name="from" value="borrower" />
794                                                 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
795                                                 <input type="hidden" name="suspend" value="0" />
796                                                 <input type="submit" value="Resume all suspended holds" />
797                                             </fieldset>
798                                         </form>
799                                     [% END # IF SuspendHoldsIntranet %]
800
801                                 [% ELSE %]
802                                     <p>Patron has nothing on hold.</p>
803                                 [% END %]
804                             </div> [% # /div#reserves %]
805                         [% END %]
806
807                         [% IF Koha.Preference('UseRecalls') %]
808                             <div id="recalls">
809                                 [% INCLUDE 'recalls.inc' %]
810                             </div>
811                         [% END %]
812
813                         [% IF Koha.Preference('ClaimReturnedLostValue') %]
814                             [% INCLUDE 'patron-return-claims.inc' %]
815                         [% END %]
816
817                         [% IF Koha.Preference('ArticleRequests') %]
818                             [% INCLUDE 'patron-article-requests.inc' %]
819                         [% END %]
820
821                     </div> <!-- /div#finesholdsissues -->
822                 </main>
823             </div> <!-- /.col-sm-10.col-sm-push-2 -->
824
825             <div class="col-sm-2 col-sm-pull-10">
826                 <aside>
827                     [% INCLUDE 'circ-menu.inc' %]
828                 </aside>
829             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
830         </div> <!-- /.row -->
831
832         [% IF Koha.Preference('ClaimReturnedLostValue') %]
833             [% INCLUDE 'modals/resolve_return_claim.inc' %]
834         [% END %]
835
836 [% MACRO jsinclude BLOCK %]
837     [% INCLUDE 'datatables.inc' %]
838     [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]
839     [% INCLUDE 'columns_settings.inc' %]
840     [% INCLUDE 'select2.inc' %]
841     [% PROCESS 'modal-claims-js' %]
842     <script>
843         /* Set some variable needed in circulation.js */
844         var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]";
845         var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]";
846         var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]";
847         var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]";
848         var UnseenRenewals = "[% Koha.Preference('UnseenRenewals') | html %]";
849         var interface = "[% interface | html %]";
850         var theme = "[% theme | html %]";
851         var borrowernumber = "[% patron.borrowernumber | html %]";
852         var branchcode = "[% Branches.GetLoggedInBranchcode() | html %]";
853         var exports_enabled = "[% Koha.Preference('ExportCircHistory') | html %]";
854         var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 | html %]
855         var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 | html %];
856         var AllowRenewalOnHoldOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalOnHoldOverride') )? 1: 0 | html %];
857         var script = "moremember";
858         var relatives_borrowernumbers = new Array();
859         [% FOREACH b IN relatives_borrowernumbers %]
860             relatives_borrowernumbers.push("[% b | html %]");
861         [% END %]
862         var SuspendHoldsIntranet = [% ( Koha.Preference('SuspendHoldsIntranet') ) ? 1 : 0 | html %];
863     </script>
864     [% Asset.js("js/pages/circulation.js") | $raw %]
865     [% Asset.js("js/checkouts.js") | $raw %]
866     [% IF Koha.Preference('ClaimReturnedLostValue') %]
867         [% Asset.js("js/resolve_claim_modal.js") | $raw %]
868     [% END %]
869     [% Asset.js("js/holds.js") | $raw %]
870     [% INCLUDE 'calendar.inc' %]
871     [% INCLUDE 'str/members-menu.inc' %]
872     [% Asset.js("js/members-menu.js") | $raw %]
873     [% Asset.js("js/recalls.js") | $raw %]
874     <script>
875
876         table_settings_issues_table = [% TablesSettings.GetTableSettings( 'members', 'moremember', 'issues-table', 'json' ) | $raw %]
877
878         $(document).ready(function() {
879             $("#info_digests").tooltip();
880
881             if ( $('#clubs-tab').length ) {
882                 $('#clubs-tab-link').on('click', function() {
883                     $('#clubs-tab').text(_("Loading..."));
884                     $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% patron.borrowernumber | html %]');
885                 });
886             }
887
888             $('#finesholdsissues').tabs({
889                 // Correct table sizing for tables hidden in tabs
890                 // http://www.datatables.net/examples/api/tabs_and_scrolling.html
891                 "show": function(event, ui) {
892                     var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable();
893                     if ( oTable.length > 0 ) {
894                         oTable.fnAdjustColumnSizing();
895                     }
896                 },
897                 "activate": function( event, ui ) {
898                     $("a", ui.newTab ).click();
899                 }
900             } );
901
902             $("#view_restrictions").on("click",function(){
903                 $('#debarments-tab-link').click();
904             });
905          });
906         function uncheck_sibling(me){
907             nodename=me.getAttribute("name");
908             if (nodename =="barcodes[]"){
909                 var Node=me.parentNode.previousSibling;
910                 while (Node.nodeName!="TD"){Node=Node.previousSibling}
911                 var Nodes=Node.childNodes;
912                 for (var i=0;i < Nodes.length;i++){
913                     if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
914                         Nodes[i].checked=false;
915                     }
916                 }
917             } else {
918                 var Node=me.parentNode.nextSibling;
919                 while (Node.nodeName!="TD"){Node=Node.nextSibling}
920                 var Nodes=Node.childNodes;
921                 for (var i=0;i<Nodes.length;i++){
922                     if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
923                       Nodes[i].checked=false;
924                     }
925                }
926             }
927         }
928     </script>
929 [% END %]
930
931 [% INCLUDE 'intranet-bottom.inc' %]