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