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