Bug 12461 - Add patron clubs feature
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-user.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% USE Branches %]
4 [% USE ItemTypes %]
5 [% USE Price %]
6
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% BLOCK cssinclude %][% END %]
11 </head>
12 [% INCLUDE 'bodytag.inc' bodyid='opac-user' bodyclass='scrollto' %]
13 [% INCLUDE 'masthead.inc' %]
14
15 <div class="main">
16     <ul class="breadcrumb">
17         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
18         <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' category_type = BORROWER_INFO.category_type firstname = BORROWER_INFO.firstname surname = BORROWER_INFO.surname othernames = BORROWER_INFO.othernames cardnumber = BORROWER_INFO.cardnumber %]</a> <span class="divider">&rsaquo;</span></li>
19         <li><a href="#">Your summary</a></li>
20     </ul>
21
22     <div class="container-fluid">
23         <div class="row-fluid">
24             <div class="span2">
25                 <div id="navigation">
26                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
27                 </div>
28             </div>
29             <div class="span10">
30                 <div id="userdetails" class="maincontent">
31
32                     [% IF adminWarning %]
33                         <div id="adminwarning" class="dialog alert">
34                             <p>
35 <strong><i class="fa fa-exclamation-triangle"> </i> Warning:</strong>
36 Using this account is not recommended because some parts of Koha will not function as expected. Instead, please log in with a different account.
37 <a class="btn btn-small" href="/cgi-bin/koha/opac-main.pl?logout.x=1">
38 <i class="fa fa-sign-out"> </i> Log out</a>
39                             </p>
40                         </div>
41                     [% END %]
42
43                     [% INCLUDE 'opac-note.inc' %]
44
45                     <h2>Hello, [% INCLUDE 'patron-title.inc' category_type = BORROWER_INFO.category_type firstname = BORROWER_INFO.firstname surname = BORROWER_INFO.surname othernames = BORROWER_INFO.othernames cardnumber = BORROWER_INFO.cardnumber %]
46                     </h2>
47
48                     <p><a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here if you're not [% BORROWER_INFO.title %] [% INCLUDE 'patron-title.inc' category_type = BORROWER_INFO.category_type firstname = BORROWER_INFO.firstname surname = BORROWER_INFO.surname othernames = BORROWER_INFO.othernames cardnumber = BORROWER_INFO.cardnumber %]</a></p>
49
50                     [% IF ( patronupdate ) %]<div class="alert alert-info"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
51
52                     [% IF failed_holds %]
53                         <div class="alert alert-info">
54                             <h3>Notice:</h3>
55                             <p>One or more holds were not placed due to existing holds.</p>
56                         </div>
57                     [% END %]
58
59                     [% IF ( BORROWER_INFO.warndeparture ) %]
60                         <div class="alert" id="warndeparture">
61                             <strong>Please note:</strong><span> Your card will expire on <span id="warndeparture_date">[% BORROWER_INFO.warndeparture | $KohaDates %]</span>. Please contact the library for more information.</span>
62                                 [% IF ( BORROWER_INFO.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your card expires.</span>[% END %]
63                         </div>
64                     [% END %]
65
66                     [% IF ( BORROWER_INFO.warnexpired ) %]
67                         <div class="alert" id="warnexpired">
68                             <strong>Please note: </strong><span>Your account has expired as of [% BORROWER_INFO.warnexpired | $KohaDates %]. Please contact the library if you wish to renew your account.</span>
69                         </div>
70                     [% END %]
71
72                     [% IF ( RENEW_ERROR ) %]
73                         <div class="dialog alert">
74                             <strong>Please note:</strong>
75                             <span>
76                                 Your loan renewal failed because of the following reason(s):
77                                 [% FOREACH error IN RENEW_ERROR.split('\|') %]
78                                     [% IF error == 'card_expired' %]
79                                         Your account has expired. Please contact the library for more information.
80                                     [% ELSIF error == 'too_many' %]
81                                         You have renewed this item the maximum number of times allowed.
82                                     [% ELSIF error == 'too_soon' %]
83                                         It is too soon after the checkout date for this item to be renewed.
84                                     [% ELSIF error == 'on_reserve' %]
85                                         This item is on hold for another borrower.
86                                     [% END %]
87                                 [% END %]
88                             </span>
89                         </div>
90                     [% END %]
91
92                     [% IF ( patron_flagged ) %]
93                         <div class="alert">
94                             <ul>
95                                 [% IF ( userdebarred ) %]
96                                     [% IF ( discharge_available ) %]
97                                         <li id="discharged">
98                                             <strong>Please note:</strong> Your account is frozen because it has been discharged. <a href="/cgi-bin/koha/opac-discharge.pl?op=get">Get your discharge</a>
99                                         </li>
100                                     [% ELSE %]
101                                         <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen.
102                                         [% IF ( BORROWER_INFO.debarredcomment ) %] Comment: <span id="userdebarred_comment">"[% BORROWER_INFO.debarredcomment %]"</span>[% END %]
103                                         [% IF ( BORROWER_INFO.userdebarreddate ) %] End date: <span id="userdebarred_date">[% BORROWER_INFO.userdebarreddate | $KohaDates %]</span>[% END %]
104                                         <em>Usually the reason for freezing an account is old overdues or damage fees. If your account shows to be clear, please contact the library.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your account page</a></li>
105                                     [% END %]
106                                 [% END %]
107                                 [% IF ( BORROWER_INFO.gonenoaddress ) %]
108                                     <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date contact information. Please contact the library.
109                                 <a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]Update your contact information[% ELSE %]Go to your contact information[% END %]</a>
110                                 [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %]
111                                     </li>
112                                 [% END %]
113                                 [% IF ( BORROWER_INFO.lost ) %]
114                                     <li id="lost"><strong>Please note: </strong> Your library card has been marked as lost or stolen. <em>If this is an error, please contact the library.</em></li>
115                                 [% END %]
116                                 [% IF ( renewal_blocked_fines.defined ) && ( OpacRenewalAllowed ) %]
117                                     <li id="renewal_blocked_fines"><strong>Please note: </strong>You cannot renew your books online. Reason: [% IF ( renewal_blocked_fines ) > 0  %]Your fines exceed <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines | $Price %]</span>.[% ELSE %]You have fines.[% END %]
118                                 [% END %]
119                             </ul>
120                         </div>
121                     [% END # / IF patron_flagged %]
122
123                     [% SET OPACMySummaryNote = Koha.Preference('OPACMySummaryNote') %]
124                     [% IF OPACMySummaryNote %][% OPACMySummaryNote %][% END %]
125
126                     <div id="opac-user-views" class="toptabs">
127                         <ul>
128                             <li><a href="#opac-user-checkouts">Checked out ([% issues_count %])</a></li>
129                             [% IF relatives %]<li><a href="#opac-user-relative-issues">Relatives' checkouts</a></li>[% END %]
130                             [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue ([% overdues_count %])</a></li>[% END %]
131                             [% IF ( OPACFinesTab ) %]
132                                 [% IF ( BORROWER_INFO.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% amountoutstanding | $Price %])</a></li>[% END %]
133                                 [% IF ( BORROWER_INFO.amountoverzero ) %]<li><a href="#opac-user-fines">Fines ([% amountoutstanding | $Price %])</a></li>[% END %]
134                                 [% IF ( BORROWER_INFO.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits ([% amountoutstanding | $Price %])</a></li>[% END %]
135                             [% END %]
136
137                             [% IF borrower.get_club_enrollments.size || borrower.get_enrollable_clubs(1).size %]
138                                 <li>
139                                     <a id="opac-user-clubs-tab-link" href="#opac-user-clubs">
140                                         Clubs ([% borrower.get_club_enrollments.size %]/[% borrower.get_enrollable_clubs(1).size || 0 %])
141                                     </a>
142                                 </li>
143                             [% END %]
144
145                             [% IF ( RESERVES.count ) %]<li><a href="#opac-user-holds">Holds ([% RESERVES.count %])</a></li>[% END %]
146                             [% IF Koha.Preference('ArticleRequests') && borrower.article_requests_current %]<li><a href="#opac-user-article-requests">Article requests ([% borrower.article_requests_current.count %])</a></li>[% END %]
147                             [% IF ( OverDriveCirculation ) %]
148                             <li><a href="#opac-user-overdrive">OverDrive Account</a></li>
149                             [% END %]
150                         </ul>
151
152                         <div id="opac-user-overdrive">
153                         </div>
154                         <div id="opac-user-checkouts">
155                             [% IF ( issues_count ) %]
156                                 <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
157                                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]">
158                                     <input type="hidden" name="from" value="opac_user" />
159                                     <table id="checkoutst" class="table table-bordered table-striped">
160                                         <caption>[% issues_count %] Item(s) checked out</caption>
161                                         <thead>
162                                             <tr>
163                                                 [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
164                                                 <th class="anti-the">Title</th>
165                                                 <th class="title-string psort">Due</th>
166                                                 [% UNLESS ( item_level_itypes ) %]
167                                                     <th>Item type</th>
168                                                 [% END %]
169                                                 [% IF ( show_barcode ) %]
170                                                     <th>Barcode</th>
171                                                 [% END %]
172                                                     <th>Call no.</th>
173                                                 [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.category.effective_BlockExpiredPatronOpacActions ) ) %]
174                                                     <th class="nosort">Renew</th>
175                                                 [% END %]
176                                                 [% IF ( OPACFinesTab ) %]
177                                                     <th>Fines</th>
178                                                 [% END %]
179                                                 [% IF ( OPACMySummaryHTML ) %]
180                                                     <th class="nosort">Links</th>
181                                                 [% END %]
182                                             </tr>
183                                         </thead>
184                                         <tbody>
185                                             [% FOREACH ISSUE IN ISSUES %]
186                                                 [% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
187                                                 [% IF ( JacketImages ) %]<td class="jacketcell">
188
189                                                     [% IF ( OPACAmazonCoverImages ) %]
190                                                         [% IF ( ISSUE.normalized_isbn ) %]
191                                                             <a href="http://www.amazon.com/gp/reader/[% ISSUE.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View on Amazon.com"><img src="https://images-na.ssl-images-amazon.com/images/P/[% ISSUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="View on Amazon.com" class="item-thumbnail"/></a>
192                                                         [% ELSE %]
193                                                             <a href="#"><span class="no-image">No cover image available</span></a>
194                                                         [% END %]
195                                                     [% END %]
196
197                                                     [% IF ( GoogleJackets ) %]
198                                                         [% IF ( ISSUE.normalized_isbn ) %]
199                                                             <div style="display:block;" title="Click to view in Google Books" class="[% ISSUE.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
200                                                         [% ELSE %]
201                                                             <a href="http://books.google.com/books?q=[% ISSUE.title |url %]"><span class="no-image">No cover image available</span></a>
202                                                         [% END %]
203                                                     [% END %]
204
205                                                     [% IF ( BakerTaylorEnabled ) %]
206                                                         [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %]
207                                                         [% IF ( bt_id ) %]
208                                                             <a href="https://[% BakerTaylorBookstoreURL |html %][% bt_id %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /></a>
209                                                         [% ELSE %]
210                                                             <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
211                                                         [% END %]
212                                                     [% END %]
213
214                                                     [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
215                                                         [% IF ( using_https ) %]
216                                                             <img src="https://secure.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% ISSUE.normalized_upc %]&amp;oclc=[% ISSUE.normalized_oclc %]" alt="" class="item-thumbnail" />
217                                                         [% ELSE %]
218                                                             <img src="http://www.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% ISSUE.normalized_upc %]&amp;oclc=[% ISSUE.normalized_oclc %]" alt="" class="item-thumbnail" />
219                                                         [% END %]
220                                                     [% END %]
221
222                                                 </td>[% END # / IF JacketImages %]
223
224                                                 <td class="title">
225                                                     <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %] [% FOREACH subtitl IN ISSUE.subtitle %] [% subtitl.subfield %][% END %]</a>
226                                                     [% IF ( ISSUE.enumchron ) %] [% ISSUE.enumchron %][% END %]
227                                                     <span class="item-details">[% ISSUE.author %]</span>
228                                                 </td>
229                                                 [% IF ( ISSUE.overdue ) %]
230                                                     <td class="date_due overdue">
231                                                         <span title="[% ISSUE.date_due %]">
232                                                             <span class="tdlabel">Date due:</span>
233                                                             [% ISSUE.date_due_sql | $KohaDates as_due_date => 1 %]
234                                                         </span>
235                                                     </td>
236                                                 [% ELSE %]
237                                                     <td class="date_due">
238                                                         <span title="[% ISSUE.date_due %]">
239                                                             <span class="tdlabel">Date due:</span>
240                                                             [% ISSUE.date_due_sql | $KohaDates as_due_date => 1 %]
241                                                         </span>
242                                                     </td>
243                                                 [% END %]
244                                                 [% UNLESS ( item_level_itypes ) %]
245                                                     <td class="itype">
246                                                         <span class="tdlabel">Item type:</span>
247                                                         [% IF ( ISSUE.imageurl ) %]
248                                                             <img src="[% ISSUE.imageurl %]" title="[% ISSUE.description %]" alt="[% ISSUE.description %]" />
249                                                         [% END %] [% ISSUE.description %]
250                                                     </td>
251                                                 [% END %]
252                                                 [% IF ( show_barcode ) %]
253                                                     <td class="barcode">
254                                                         <span class="tdlabel">Barcode:</span>
255                                                         [% ISSUE.barcode %]
256                                                     </td>
257                                                 [% END %]
258                                                 <td class="call_no">
259                                                     <span class="tdlabel">Call no.:</span>
260                                                     [% ISSUE.itemcallnumber %]
261                                                 </td>
262                                                 [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.category.effective_BlockExpiredPatronOpacActions ) ) %]
263                                                     <td class="renew">
264                                                     [% IF ISSUE.renewed %]<span class="blabel label-success">Renewed!</span><br />[% END %]
265                                                     [% IF ( ISSUE.status ) %]
266                                                         [% IF ( canrenew ) %]
267                                                             <input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% ISSUE.itemnumber %]&amp;borrowernumber=[% ISSUE.borrowernumber %]">Renew</a>
268                                                         [% END %]
269                                                         <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
270                                                     [% ELSIF ( ISSUE.on_reserve ) %]
271                                                         Not renewable <span class="renewals">(on hold)</span>
272                                                     [% ELSIF ( ISSUE.too_many ) %]
273                                                         Not renewable
274                                                     [% ELSIF ( ISSUE.norenew_overdue ) %]
275                                                         Not allowed <span class="renewals">(overdue)</span>
276                                                     [% ELSIF ( ISSUE.auto_too_late ) %]
277                                                         No longer renewable
278                                                     [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
279                                                         Automatic renewal
280                                                         <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
281                                                     [% ELSIF ( ISSUE.too_soon ) %]
282                                                         No renewal before [% ISSUE.soonestrenewdate %]
283                                                         <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
284                                                     [% END %]
285                                                     </td>
286                                                 [% END %]
287                                                 [% IF ( OPACFinesTab ) %]
288                                                     <td class="fines">
289                                                         <span class="tdlabel">Fines:</span>
290                                                         [% IF ( ISSUE.charges ) %]
291                                                             Yes
292                                                         [% ELSE %]
293                                                             No
294                                                         [% END %]
295                                                     </td>
296                                                 [% END %]
297                                                 [% IF ( OPACMySummaryHTML ) %]
298                                                     <td class="links">[% ISSUE.MySummaryHTML %]</td>
299                                                 [% END %]
300                                             </tr>
301                                         [% END # /FOREACH ISSUES %]
302                                     </tbody>
303                                 </table>
304                                 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.category.effective_BlockExpiredPatronOpacActions ) ) %]
305                                     <input type="submit" class="btn" value="Renew selected" />
306                                 [% END %]
307                                 </form>
308
309                                 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.category.effective_BlockExpiredPatronOpacActions ) ) %]
310                                 <form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
311                                     <input type="hidden" name="from" value="opac_user" />
312                                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
313                                     [% FOREACH ISSUE IN ISSUES %]
314                                         <input type="hidden" name="item" value="[% ISSUE.itemnumber %]" />
315                                     [% END %]
316                                     <input type="submit" class="btn" value="Renew all" />
317                                 </form>
318                                 [% END %]
319                                 <p><a href="opac-ics.pl">Download as iCal/.ics file</a></p>
320                             [% ELSE %]
321                                 <table class="table table-bordered table-striped">
322                                     <tr><td>You have nothing checked out</td></tr>
323                                 </table>
324                             [% END # IF issues_count %]
325                         </div> <!-- / .opac-user-checkouts -->
326
327                         [% IF borrower.get_club_enrollments_count.size || borrower.get_enrollable_clubs(1).size %]
328                             <div id="opac-user-clubs">
329                                 Loading...
330                             </div>
331                         [% END %]
332
333                         [% IF ( OPACFinesTab ) %]
334                             <!-- FINES BOX -->
335                             [% IF BORROWER_INFO.amountoverfive %]
336                                 <div id="opac-user-fines"> <h3>Fines and charges</h3>
337                                     <table class="table table-bordered table-striped">
338                                         <thead><tr><th colspan="2">Amount</th></tr></thead>
339                                         <tbody>
340                                             <tr>
341                                                 <td>You currently owe fines and charges amounting to:</td>
342                                                 <td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding | $Price %]</a></td>
343                                             </tr>
344                                         </tbody>
345                                     </table>
346                                 </div>
347                             [% END %]
348
349                             [% IF BORROWER_INFO.amountoverzero %]
350                                <div id="opac-user-fines"> <h3>Fines and charges</h3>
351                                     <table class="table table-bordered table-striped">
352                                         <thead><tr><th colspan="2">Amount</th></tr></thead>
353                                         <tbody>
354                                             <tr>
355                                                 <td>You currently owe fines and charges amounting to:</td>
356                                                 <td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding %]</a></td>
357                                             </tr>
358                                         </tbody>
359                                     </table>
360                                 </div>
361                             [% END %]
362
363                             [% IF BORROWER_INFO.amountlessthanzero %]
364                                 <div id="opac-user-fines">  <h3>Credits</h3>
365                                     <table class="table table-bordered table-striped">
366                                         <thead><tr><th colspan="2">Amount</th></tr></thead>
367                                         <tbody>
368                                             <tr>
369                                                 <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding %]</a></td>
370                                             </tr>
371                                         </tbody>
372                                     </table>
373                                 </div>
374                             [% END %]
375                         [% END # / OPACFinesTab %]
376
377                         [% IF relatives %]
378                             <div id="opac-user-relative-issues">
379                                 <table id="opac-user-relative-issues-table" class="table table-bordered table-striped">
380                                     <thead>
381                                         <tr>
382                                             <th class="anti-the">Title</th>
383                                             <th>Due</th>
384                                             <th>Barcode</th>
385                                             <th>Call no.</th>
386                                             <th class="psort">Relative</th>
387                                         </tr>
388                                     </thead>
389
390                                     <tbody>
391                                         [% FOREACH r IN relatives %]
392                                             [% FOREACH i IN r.issues %]
393                                                 <tr>
394                                                     <td>
395                                                         <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% i.item.biblio.biblionumber %]">
396                                                             [% i.item.biblio.title %][% IF ( i.item.enumchron ) %] [% i.item.enumchron %][% END %]
397                                                         </a>
398                                                     </td>
399
400                                                     <td>
401                                                         [% i.date_due | $KohaDates %]
402                                                     </td>
403
404                                                     <td>
405                                                         [% i.item.barcode %]
406                                                     </td>
407
408                                                     <td>
409                                                         [% i.item.itemcallnumber %]
410                                                     </td>
411
412                                                     <td>
413                                                         [% r.firstname %] [% r.surname %]
414                                                     </td>
415                                                 </tr>
416                                             [% END %]
417                                         [% END %]
418                                     </tbody>
419                                 </table>
420                             </div>
421                         [% END %]
422
423                         [% IF ( overdues_count ) %]
424                             <div id="opac-user-overdues">
425                                 <table id="overduest" class="table table-bordered table-striped">
426                                     <caption>Overdues <span class="count">([% overdues_count %] total)</span></caption>
427                                     <!-- OVERDUES TABLE ROWS -->
428                                     <thead>
429                                         <tr>
430                                             [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
431                                             <th class="anti-the">Title</th>
432                                             [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
433                                             [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
434                                             <th>Call no.</th>
435                                             <th class="title-string psort">Due</th>
436                                             [% IF ( OpacRenewalAllowed ) %]
437                                                 <th class="nosort">Renew</th>
438                                             [% END %]
439                                             [% IF ( OPACFinesTab ) %]
440                                                 <th>Fines</th>
441                                             [% END %]
442                                         </tr>
443                                     </thead>
444                                     <tbody>
445                                         [% FOREACH OVERDUE IN OVERDUES %]
446                                             <tr>
447                                                 [% IF ( JacketImages ) %]
448                                                     <td class="jacketcell">
449                                                     [% IF ( OPACAmazonCoverImages ) %]
450                                                         [% IF ( OVERDUE.normalized_isbn ) %]
451                                                             <a href="http://www.amazon.com/gp/reader/[% OVERDUE.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View on Amazon.com"><img src="https://images-na.ssl-images-amazon.com/images/P/[% OVERDUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="View on Amazon.com" class="item-thumbnail" /></a>
452                                                         [% ELSE %]
453                                                             <a href="#"><span class="no-image">No cover image available</span></a>
454                                                         [% END %]
455                                                     [% END %]
456
457                                                     [% IF ( GoogleJackets ) %]
458                                                         [% IF ( OVERDUE.normalized_isbn ) %]
459                                                             <div style="display:block;" title="Click to view in Google Books" class="[% OVERDUE.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
460                                                         [% ELSE %]
461                                                             <a href="http://books.google.com/books?q=[% OVERDUE.title |url %]"><span class="no-image">No cover image available</span></a>
462                                                         [% END %]
463                                                     [% END %]
464
465                                                     [% IF ( BakerTaylorEnabled ) %]
466                                                         [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %]
467                                                         [% IF ( bt_id ) %]
468                                                             <a href="https://[% BakerTaylorBookstoreURL |html %][% bt_id %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /></a>
469                                                         [% ELSE %]
470                                                             <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
471                                                         [% END %]
472                                                     [% END %]
473
474                                                     [% IF ( SyndeticsCoverImages ) %]
475                                                         [% IF ( using_https ) %]
476                                                             <img src="https://secure.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;upc=[% OVERDUE.normalized_upc %]&amp;oclc=[% OVERDUE.normalized_oclc %]&amp;type=xw10" alt="" class="item-thumbnail" />
477                                                         [% ELSE %]
478                                                             <img src="http://www.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;upc=[% OVERDUE.normalized_upc %]&amp;oclc=[% OVERDUE.normalized_oclc %]&amp;type=xw10" alt="" class="item-thumbnail" />
479                                                         [% END %]
480                                                     [% END %]
481                                                     </td>
482                                                 [% END # /IF jacketcell %]
483
484                                                 <td>
485                                                     <a class="title" href="/cgi-bin/koha/opac-detail.pl?bib=[% OVERDUE.biblionumber %]">[% OVERDUE.title |html %] [% FOREACH subtitl IN OVERDUE.subtitle %] [% subtitl.subfield %][% END %]
486                                                     </a>
487                                                     <span class="item-details">[% OVERDUE.author %]</span></td>
488
489                                                 [% UNLESS ( item_level_itypes ) %]
490                                                     <td>
491                                                         [% IF ( OVERDUE.imageurl ) %]
492                                                             <img src="[% OVERDUE.imageurl %]" title="[% OVERDUE.description %]" alt="[% OVERDUE.description %]" />
493                                                         [% END %] [% OVERDUE.description %]
494                                                     </td>
495                                                 [% END %]
496                                                 [% IF ( show_barcode ) %]
497                                                     <td>
498                                                         <span class="tdlabel">Barcode:</span>
499                                                         [% OVERDUE.barcode %]
500                                                     </td>
501                                                 [% END %]
502                                                 <td>
503                                                     <span class="tdlabel">Call no.:</span>
504                                                     [% OVERDUE.itemcallnumber %]
505                                                 </td>
506                                                 <td>
507                                                     <span title="[% OVERDUE.date_due %]">
508                                                         <span class="tdlabel">Date due:</span>
509                                                         [% OVERDUE.date_due_sql | $KohaDates as_due_date => 1 %]
510                                                     </span>
511                                                 </td>
512                                                 [% IF ( OpacRenewalAllowed ) %]
513                                                     <td>
514                                                         [% IF ( OVERDUE.debarred ) %]
515                                                             Account frozen
516                                                         [% ELSIF ( OVERDUE.status ) %]
517                                                             [% IF ( canrenew ) %]
518                                                                 <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber %]&amp;bornum=[% OVERDUE.borrowernumber %]">Renew</a>
519                                                             [% END %]
520                                                                 <span class="renewals">([% OVERDUE.renewsleft %] of [% OVERDUE.renewsallowed %] renewals remaining)</span>
521                                                         [% ELSIF ( OVERDUE.norenew_overdue ) %]
522                                                             Not allowed<span class="renewals">(overdue)</span>
523                                                         [% ELSIF ( OVERDUE.onreserve ) %]
524                                                             On hold
525                                                         [% ELSE %]
526                                                             No renewals left
527                                                         [% END %]
528                                                     </td>
529                                                 [% END %]
530                                                 [% IF ( OPACFinesTab ) %]
531                                                     <td>
532                                                         <span class="tdlabel">Fines:</span>
533                                                         [% IF ( OVERDUE.charges ) %]
534                                                             Yes
535                                                         [% ELSE %]
536                                                             No
537                                                         [% END %]
538                                                     </td>
539                                                 [% END %]
540                                             </tr>
541                                         [% END %]
542                                     </tbody>
543                                 </table>
544                             </div> <!-- / #opac-user-overdues -->
545                         [% END # /overdues_count %]
546
547
548                         [% IF ( RESERVES.count ) %]
549                             <div id="opac-user-holds">
550                                 <table id="holdst" class="table table-bordered table-striped">
551                                     <caption>Holds <span class="count">([% RESERVES.count %] total)</span></caption>
552                                     <!-- RESERVES TABLE ROWS -->
553                                     <thead>
554                                         <tr>
555                                             <th class="anti-the">Title</th>
556                                             <th class="psort">Placed on</th>
557                                             <th>Expires on</th>
558                                             <th>Pick up location</th>
559                                             [% IF ( showpriority ) %]
560                                                 <th>Priority</th>
561                                             [% END %]
562                                             <th>Status</th>
563                                             [% IF SuspendHoldsOpac %]
564                                                  <th class="nosort" >Suspend</th>
565                                             [% END %]
566                                             <th class="nosort">Modify</th>
567                                         </tr>
568                                     </thead>
569                                     <tbody>
570                                     [% FOREACH RESERVE IN RESERVES %]
571                                         [% IF ( RESERVE.is_waiting ) %]
572                                             [% IF ( RESERVE.is_at_destination ) %]
573                                                 [% IF ( RESERVE.is_found ) %]
574                                                     <tr class="reserved">
575                                                 [% ELSE %]
576                                                     <tr>
577                                                 [% END %]
578                                             [% ELSE %]
579                                                 <tr class="transfered">
580                                             [% END %]
581                                         [% ELSE %]
582                                             <tr>
583                                         [% END %]
584                                             <td class="title">
585                                                 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">
586                                                     [% RESERVE.biblio.title %]
587                                                     [% FOREACH s IN RESERVE.biblio.subtitles %]
588                                                         [% s %]
589                                                     [% END %]
590                                                     [% RESERVE.item.enumchron %]
591                                                 </a>
592                                                 [% RESERVE.biblio.author %]
593                                             </td>
594                                             <td class="reservedate">
595                                                 <span title="[% RESERVE.reservedate %]">
596                                                     <span class="tdlabel">Hold date:</span>
597                                                     [% RESERVE.reservedate | $KohaDates %]
598                                                 </span>
599                                             </td>
600                                             <td class="expirationdate">
601                                                 [% IF ! RESERVE.found %]
602                                                     [% IF ( RESERVE.expirationdate ) %]
603                                                         <span>
604                                                             <span class="tdlabel">Expiration:</span>
605                                                                 [% RESERVE.expirationdate | $KohaDates %]
606                                                         </span>
607                                                     [% ELSE %]
608                                                         <span class="tdlabel">Expiration:</span>
609                                                         Never expires
610                                                     [% END %]
611                                                 [% ELSE %]
612                                                     -
613                                                 [% END %]
614                                             </td>
615                                             <td class="branch">
616                                                 <span class="tdlabel">Pick up location:</span>
617                                                 [% RESERVE.branch.branchname %]
618                                             </td>
619                                             [% IF ( showpriority ) %]
620                                                  <td class="priority">
621                                                     <span class="tdlabel">Priority:</span>
622                                                     [% RESERVE.priority %]
623                                                 </td>
624                                             [% END %]
625                                             <td class="status">
626                                                 <span class="tdlabel">Status:</span>
627                                                 [% IF ( RESERVE.is_waiting ) %]
628                                                     [% IF ( RESERVE.is_at_destination ) %]
629                                                         [% IF ( RESERVE.found ) %]
630                                                             Item waiting at <b> [% RESERVE.branch.branchname %]</b>
631                                                             [% IF ( RESERVE.waitingdate ) %]
632                                                                 since [% RESERVE.waitingdate | $KohaDates %]
633                                                                 [% IF RESERVE.waiting_expires_on %]
634                                                                     until [% RESERVE.waiting_expires_on | $KohaDates %]
635                                                                 [% END %]
636                                                             [% END %]
637                                                             <input type="hidden" name="pickup" value="[% RESERVE.branchcode %]" />
638                                                         [% ELSE %]
639                                                             Item waiting to be pulled from <b> [% Branches.GetName( RESERVE.branchcode ) %]</b>
640                                                         [% END %]
641                                                     [% ELSE %]
642                                                         Item in transit to <b> [% Branches.GetName( RESERVE.branchcode ) %]</b> <input type="hidden" name="pickup" value="[% RESERVE.branchcode %]" />
643                                                     [% END %]
644                                                 [% ELSE %]
645                                                     [% IF ( RESERVE.is_in_transit ) %]
646                                                         [% SET transfer = RESERVE.item.get_transfer %]
647                                                         Item in transit from <b> [% Branches.GetName( transfer.frombranch ) %]</b> since
648                                                         [% transfer.datesent | $KohaDates %]
649                                                     [% ELSIF ( RESERVE.suspend ) %]
650                                                         Suspended [% IF ( RESERVE.suspend_until ) %] until [% RESERVE.suspend_until %] [% END %]
651                                                     [% ELSE %]
652                                                         [% IF RESERVE.itemtype %]
653                                                             Pending for next available item of item type '[% ItemTypes.GetDescription( RESERVE.itemtype ) %]'
654                                                         [% ELSE %]
655                                                             Pending
656                                                         [% END %]
657                                                     [% END %]
658                                                 [% END %]
659                                             </td>
660                                             [% IF SuspendHoldsOpac %]
661                                                 <td>
662                                                     [% IF ( RESERVE.is_cancelable ) %]
663                                                         [% IF RESERVE.suspend %]
664                                                             <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
665                                                                 <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
666                                                                 <button class="btn btn-link" type="submit" name="submit"><i class="icon-play"></i> Resume</button>
667                                                             </form>
668                                                         [% ELSE %]
669                                                             [% IF AutoResumeSuspendedHolds %]
670                                                                 <a class="btn btn-link js-show" href="#suspendModal[% RESERVE.reserve_id %]" role="button" data-toggle="modal"><i class="icon-pause"></i> Suspend</a>
671                                                                 [% # hold suspend modal form %]
672                                                                 <div id="suspendModal[% RESERVE.reserve_id %]" class="modal-nojs" tabindex="-1" role="dialog" aria-labelledby="suspendModal[% RESERVE.reserve_id %]Label" aria-hidden="true">
673                                                                     <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
674                                                                         <div class="modal-header">
675                                                                             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
676                                                                             [% IF RESERVE.suspend %]
677                                                                                 <h3 id="suspendModal[% RESERVE.reserve_id %]Label">Resume your hold on <i>[% RESERVE.biblio.title %]</i></h3>
678                                                                             [% ELSE %]
679                                                                                 <h3 id="suspendModal[% RESERVE.reserve_id %]Label">Suspend your hold on <i>[% RESERVE.biblio.title %]</i></h3>
680                                                                             [% END %]
681                                                                         </div>
682                                                                         <div class="modal-body">
683                                                                             <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
684                                                                             <label for="suspend_until_[% RESERVE.reserve_id %]">Suspend until:</label>
685                                                                             <input name="suspend_until" id="suspend_until_[% RESERVE.reserve_id %]" class="suspend-until" size="10" />
686                                                                             [% INCLUDE 'date-format.inc' %]
687                                                                             <p class="js-show"><a href="#" onclick="document.getElementById('suspend_until_[% RESERVE.reserve_id %]').value='';return false;">Clear date to suspend indefinitely</a></p>
688                                                                             <button class="btn btn-mini js-hide" type="submit" name="submit">Suspend</button>
689                                                                         </div>
690                                                                         <div class="modal-footer">
691                                                                             <button class="btn btn-primary" type="submit" name="submit">Suspend</button>
692                                                                             <a href="#" data-dismiss="modal" aria-hidden="true" class="cancel">Cancel</a>
693                                                                         </div>
694                                                                     </form>
695                                                                 </div>  <!-- /#suspendModal[% RESERVE.reserve_id %] -->
696                                                             [% ELSE %]
697                                                                 <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
698                                                                     <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
699                                                                     <button class="btn btn-link" type="submit" name="submit"><i class="icon-pause"></i> Suspend</button>
700                                                                 </form>
701                                                             [% END # / IF AutoResumeSuspendedHolds %]
702                                                         [% END # / IF RESERVE.suspend %]
703                                                     [% END # / IF ( RESERVE.is_cancelable )%]
704                                                 </td>
705                                             [% END # / IF SuspendHoldsOpac %]
706                                             <td class="modify">
707                                                 [% IF ( RESERVE.is_cancelable ) %]
708                                                     <form action="/cgi-bin/koha/opac-modrequest.pl" method="post">
709                                                     <input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber %]" />
710                                                     <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
711                                                     <button type="submit" name="submit" class="btn btn-mini btn-danger" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);"><i class="icon-remove icon-white"></i> Cancel</button></form>
712                                                 [% END %]
713                                             </td>
714                                         </tr>
715                                     [% END # /FOREACH RESERVES %]
716                                 </tbody>
717                             </table>
718
719                             [% IF SuspendHoldsOpac %]
720                                 <div>
721                                     <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
722                                         <button type="submit" name="submit" class="btn" onclick="return confirmDelete(MSG_CONFIRM_SUSPEND_HOLDS);"><i class="icon-pause"></i> Suspend all holds</button>
723                                         <input type="hidden" name="suspend" value="1" />
724
725                                         [% IF AutoResumeSuspendedHolds %]
726                                             <label for="suspend_until"> until </label>
727                                             <input name="suspend_until" id="suspend_until" class="suspend-until" readonly="readonly" size="10" />
728                                             <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date to suspend indefinitely</a>
729                                         [% END %]
730                                     </form>
731                                 </div>
732                                 <br/>
733                                 <div>
734                                     <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
735                                         <button type="submit" name="submit" class="btn" onclick="return confirmDelete(MSG_CONFIRM_RESUME_HOLDS);"><i class="icon-play"></i> Resume all suspended holds</button>
736                                         <input type="hidden" name="suspend" value="0" />
737                                     </form>
738                                 </div>
739                             [% END %]
740                         </div> <!-- / #opac-user-holds -->
741                         [% END # / #RESERVES.count %]
742
743                         [% IF Koha.Preference('ArticleRequests') && borrower.article_requests_current.count %]
744                             <div id="opac-user-article-requests">
745                                 <table id="article-requests-table" class="table table-bordered table-striped">
746                                     <caption>Article requests <span class="count">([% borrower.article_requests_current.count %] total)</span></caption>
747                                     <thead>
748                                         <tr>
749                                             <th class="anti-the article-request-record-title">Record title</th>
750                                             <th class="psort article-request-created-on">Placed on</th>
751                                             <th class="anti-the article-request-title">Title</th>
752                                             <th class="article-request-author">Author</th>
753                                             <th class="article-request-volume">Volume</th>
754                                             <th class="article-request-issue">Issue</th>
755                                             <th class="article-request-date">Date</th>
756                                             <th class="article-request-pages">Pages</th>
757                                             <th class="article-request-chapters">Chapters</th>
758                                             <th class="article-request-patron-notes">Notes</th>
759                                             <th class="article-request-status">Status</th>
760                                             <th class="article-request-branchcode">Pickup library</th>
761                                             <th class="nosort article-request-cancel">&nbsp;</th>
762                                         </tr>
763                                     </thead>
764
765                                     <tbody>
766                                     [% FOREACH ar IN borrower.article_requests_current %]
767                                             <td class="article-request-record-title">
768                                                 <a class="article-request-title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ar.biblionumber %]">
769                                                     [% ar.biblio.title %]
770                                                     [% ar.item.enumchron %]
771                                                 </a>
772                                                 [% ar.biblio.author %]
773                                                 [% IF ar.itemnumber %] <i>(only [% ar.item.barcode %])</i>[% END %]
774                                             </td>
775
776                                             <td class="article-request-created_on">
777                                                 [% ar.created_on | $KohaDates %]
778                                             </td>
779
780                                             <td class="article-request-title">
781                                                 [% ar.title %]
782                                             </td>
783
784                                             <td class="article-request-author">
785                                                 [% ar.author %]
786                                             </td>
787
788                                             <td class="article-request-volume">
789                                                 [% ar.volume %]
790                                             </td>
791
792                                             <td class="article-request-issue">
793                                                 [% ar.issue %]
794                                             </td>
795
796                                             <td class="article-request-date">
797                                                 [% ar.date %]
798                                             </td>
799
800                                             <td class="article-request-pages">
801                                                 [% ar.pages %]
802                                             </td>
803
804                                             <td class="article-request-chapters">
805                                                 [% ar.chapters %]
806                                             </td>
807
808                                             <td class="article-request-patron-notes">
809                                                 [% ar.patron_notes %]
810                                             </td>
811
812                                             <td class="article-request-status">
813                                                 [% IF ar.status == 'PENDING' %]
814                                                     Pending
815                                                 [% ELSIF ar.status == 'PROCESSING' %]
816                                                     Processing
817                                                 [% ELSIF ar.status == 'COMPLETED' %]
818                                                     Completed
819                                                 [% ELSIF ar.status == 'CANCELED' %]
820                                                     Canceled
821                                                 [% END %]
822                                             </td>
823
824                                             <td class="article-request-branchcode">
825                                                 [% ar.branch.branchname %]
826                                             </td>
827
828                                             <td class="article-request-cancel">
829                                                 <span class="tdlabel">Cancel:</span>
830                                                 <a class="btn btn-mini btn-danger" href="opac-article-request-cancel.pl?id=[% ar.id %]" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);"><i class="icon-remove icon-white"></i> Cancel</a>
831                                                 <!-- TODO: replace MSG_CONFIRM_DELETE_HOLD with correct message -->
832                                             </td>
833                                         </tr>
834                                     [% END %]
835                                 </tbody>
836                             </table>
837                         </div> <!-- / #opac-user-article-requests -->
838                     [% END %]
839
840                     </div> <!-- /#opac-user-views -->
841                 </div> <!-- /#userdetails -->
842             </div> <!-- /.span10 -->
843         </div> <!-- /.row-fluid -->
844     </div> <!-- /.container-fluid -->
845 </div> <!-- /#main -->
846
847 [% IF ( OverDriveCirculation ) %]
848 [% INCLUDE 'overdrive-checkout.inc' %]
849 [% END %]
850
851 [% INCLUDE 'opac-bottom.inc' %]
852
853
854 [% BLOCK jsinclude %]
855     [% INCLUDE 'calendar.inc' %]
856     [% INCLUDE 'datatables.inc' %]
857     <script type="text/JavaScript">
858         //<![CDATA[
859         var MSG_CONFIRM_DELETE_HOLD   = _("Are you sure you want to cancel this hold?");
860         var MSG_CONFIRM_SUSPEND_HOLDS = _("Are you sure you want to suspend all holds?");
861         var MSG_CONFIRM_RESUME_HOLDS  = _("Are you sure you want to resume all suspended holds?");
862
863         $(document).ready(function(){
864             $('#opac-user-views').tabs();
865             $(".js-show").show();
866             $(".js-hide").hide();
867             $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
868             $(".suspend-until").prop("readonly",1);
869
870             var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table");
871             dTables.each(function(){
872                 var thIndex = $(this).find("th.psort").index();
873                 $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
874                     "aaSorting" : [[ thIndex, 'asc' ]],
875                     "aoColumnDefs": [
876                         { "aTargets": [ "nosort" ],"bSortable": false,"bSearchable": false },
877                         { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
878                         { "sType": "title-string", "aTargets" : [ "title-string" ] }
879                     ]
880                 }));
881             });
882
883             [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
884             [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
885                 $("#renewselected").submit(function(){
886                     valid = false;
887                     $("input[type=checkbox]").each(function(){
888                         if($(this).is(':checked')){
889                             valid = true;
890                         }
891                     });
892                     if(!valid){
893                         alert(_("Nothing has been selected. Check the box for each item you want to renew"));
894                     }
895                     return valid;
896                 });
897                 $("body").on("click","#renewselected_link",function(e){
898                     e.preventDefault();
899                     $("#renewselected").submit();
900                 });
901                 $("body").on("click","#renewall_link",function(e){
902                     e.preventDefault();
903                     $("#renewall").submit();
904                 });
905                 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.category.effective_BlockExpiredPatronOpacActions ) ) %]
906                     $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");
907                 [% END %]
908             [% END %]
909
910             $( ".suspend-until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
911
912             if ( $('#opac-user-clubs').length ) {
913                 $('#opac-user-clubs-tab-link').on('click', function() {
914                     $('#opac-user-clubs').text(_("Loading..."));
915                     $('#opac-user-clubs').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrowernumber %]');
916                 });
917             }
918         });
919         //]]>
920     </script>
921     <script type="text/javascript" src="[% interface %]//[% theme %]/js/overdrive.js"></script>
922     <script type="text/JavaScript">
923     $(document).ready(function() {
924     [% IF ( overdrive_error ) %]
925         KOHA.OverDriveCirculation.display_error("#opac-user-overdrive", "[% overdrive_error.dquote %]");
926     [% END %]
927     [% IF ( overdrive_tab ) %]
928         $("#opac-user-views").tabs("select", "#opac-user-overdrive");
929     [% END %]
930         $("#opac-user-overdrive").each( function() {
931             KOHA.OverDriveCirculation.display_account_details(this);
932         } );
933     });
934     </script>
935 [% END %]