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