Bug 31051: (follow-up) Simplify savings wording for OPAC
[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 [% USE AuthorisedValues %]
9 [% USE AdditionalContents %]
10 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
11 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
12 [% SET OpacMySummaryNote = AdditionalContents.get( location => "OpacMySummaryNote", lang => lang, library => branchcode ) %]
13
14 [% SET borrower_club_enrollments = logged_in_user.get_club_enrollments %]
15 [% SET borrower_enrollable_clubs = logged_in_user.get_enrollable_clubs(1) %] <!-- 1 => OPAC -->
16
17 [% INCLUDE 'doc-head-open.inc' %]
18 <title>Your library home &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
19 [% INCLUDE 'doc-head-close.inc' %]
20 [% Asset.css("css/overdrive.css") | $raw %]
21 [% BLOCK cssinclude %][% END %]
22 </head>
23 [% INCLUDE 'bodytag.inc' bodyid='opac-user' bodyclass='scrollto' %]
24 [% INCLUDE 'masthead.inc' %]
25
26 [% IF Koha.Preference('AmazonAssocTag') %]
27     [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
28 [% ELSE %]
29     [% AmazonAssocTag = '' %]
30 [% END %]
31
32 <div class="main">
33     <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
34         <ol class="breadcrumb">
35             <li class="breadcrumb-item">
36                 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
37             </li>
38             <li class="breadcrumb-item">
39                 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
40             </li>
41             <li class="breadcrumb-item active">
42                 <a href="#" aria-current="page">Your summary</a>
43             </li>
44         </ol>
45     </nav> <!-- /#breadcrumbs -->
46
47     <div class="container-fluid">
48         <div class="row">
49             <div class="col col-lg-2 order-2 order-lg-1">
50                 <div id="navigation">
51                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
52                 </div>
53             </div>
54             <div class="col-md-12 col-lg-10 order-1 order-lg-2">
55                 <div id="userdetails" class="maincontent">
56
57                     <h1>Your summary</h1>
58
59                     [% INCLUDE 'opac-note.inc' %]
60
61                     <p>Hello, [% INCLUDE 'patron-title.inc' patron = logged_in_user %]
62                     <br />
63                     <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>
64
65                     [% IF ( patronupdate ) %]<div class="alert alert-info"><h2>Thank you!</h2><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
66
67                     [% IF failed_holds %]
68                         <div class="alert alert-info">
69                             <h2>Notice:</h2>
70                             <p>One or more holds were not placed due to existing holds.</p>
71                         </div>
72                     [% END %]
73
74                     [% IF ( borrower.blockedonfines && Koha.Preference('OPACHoldRequests') ) %]
75                         <div class="alert alert-warning" id="blockedonfines">
76                             <strong>Please note:</strong><span> Your account has outstanding fees & charges of [% amountoutstanding | $Price %]. Holds are blocked because your fine balance is over the limit.</span>
77                         </div>
78                     [% END %]
79
80                     [% IF ( borrower.warndeparture ) %]
81                         <div class="alert alert-warning" id="warndeparture">
82                             <strong>Please note:</strong><span> Your library card will expire on <span id="warndeparture_date">[% borrower.warndeparture | $KohaDates %]</span>. Please contact the library for more information.</span>
83                                 [% IF ( borrower.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your library card expires.</span>[% END %]
84                         </div>
85                     [% END %]
86
87                     [% IF ( borrower.warnexpired ) %]
88                         <div class="alert alert-warning" id="warnexpired">
89                             <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>
90                         </div>
91                     [% END %]
92
93                     [% IF ( RENEW_ERROR ) %]
94                         <div class="alert alert-warning">
95                             <strong>Please note:</strong>
96                                 Your loan renewal failed because of the following reason(s):
97                                 <ul>
98                                     [% FOREACH error IN RENEW_ERROR.split('\|') %]
99                                         [% IF error == 'card_expired' %]
100                                             <li>Your account has expired. Please contact the library for more information.</li>
101                                         [% ELSIF error == 'too_many' %]
102                                             <li>You have renewed this item the maximum number of times allowed.</li>
103                                         [% ELSIF error == 'too_unseen' %]
104                                             <li>You have renewed this item the maximum number of consecutive times without it being seen by the library.</li>
105                                         [% ELSIF error == 'too_soon' %]
106                                             <li>It is too soon after the checkout date for this item to be renewed.</li>
107                                         [% ELSIF error == 'on_reserve' %]
108                                             <li>This item is on hold for another borrower.</li>
109                                         [% ELSIF error == 'item_denied_renewal' %]
110                                             <li>Item renewal is not allowed.</li>
111                                         [% ELSIF error == 'auto_too_soon' %]
112                                             <li>This item is scheduled for auto renewal.</li>
113                                         [% END %]
114                                     [% END %]
115                                 </ul>
116                         </div>
117                     [% END %]
118
119                     [% IF ( patron_flagged ) %]
120                         <div class="alert alert-warning">
121                             <ul>
122                                 [% IF ( userdebarred ) %]
123                                     [% IF ( discharge_available ) %]
124                                         <li id="discharged">
125                                             <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>
126                                         </li>
127                                     [% ELSE %]
128                                         <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen.
129                                         [% IF ( borrower.debarredcomment ) %]
130                                             Comment:
131                                             <span id="userdebarred_comment">
132                                                 <strong>
133                                                     [% IF borrower.debarredcomment.search('OVERDUES_PROCESS') %]
134                                                         Restriction added by overdues process [% borrower.debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
135                                                     [% ELSE %]
136                                                         [% borrower.debarredcomment | html_line_break %]
137                                                     [% END %]
138                                                 </strong>
139                                             </span>
140                                         [% END %]
141                                         [% IF ( borrower.userdebarreddate && debarred_date != '9999-12-31' ) %]
142                                             End date:
143                                             <span id="userdebarred_date">[% borrower.userdebarreddate | $KohaDates %]</span>
144                                         [% END %]
145
146                                         <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>
147                                     [% END %]
148                                 [% END %]
149                                 [% IF ( borrower.gonenoaddress ) %]
150                                     <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date contact information. Please contact the library.
151                                 <a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]<span>Update your contact information</span>[% ELSE %]<span>Go to your contact information</span>[% END %]</a>
152                                 [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %]
153                                     </li>
154                                 [% END %]
155                                 [% IF ( borrower.lost ) %]
156                                     <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>
157                                 [% END %]
158                                 [% IF ( renewal_blocked_fines.defined ) && ( OpacRenewalAllowed ) %]
159                                     <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 %]
160                                 [% END %]
161                             </ul>
162                         </div>
163                     [% END # / IF patron_flagged %]
164
165                     [% IF savings %]
166                         <div class="alert alert-info">
167                             Congratulations, you have saved a total of [% savings | $Price with_symbol => 1 %] by using the library.
168                         </div>
169                     [% END %]
170
171                     <div class="alert alert-info" id="notesaved" style="display:none;"></div>
172                     [% IF ( OpacMySummaryNote ) %]
173                         [% PROCESS koha_news_block news => OpacMySummaryNote %]
174                     [% END %]
175
176                     [% IF Koha.Preference('AllowPatronToControlAutorenewal') %]
177                     <form id="autorenewal_option" action="/cgi-bin/koha/opac-user.pl" method="post">
178                         <legend class="sr-only">Auto-renewal</legend>
179                             <label for="yes-autorenew_checkouts">
180                                 Allow auto-renewal:
181                             </label>
182                                 [% IF ( borrower.autorenew_checkouts ) %]
183                                     <label class="radio inline" for="yes-autorenew_checkouts">
184                                         Yes
185                                         <input type="radio" id="yes-autorenew_checkouts" name="borrower_autorenew_checkouts" value="1" checked="checked" />
186                                     </label>
187
188                                     <label class="radio inline" for="no-autorenew_checkouts">
189                                         No
190                                         <input type="radio" id="no-autorenew_checkouts" name="borrower_autorenew_checkouts" value="0" />
191                                     </label>
192                                 [% ELSE %]
193                                     <label class="radio inline" for="yes-autorenew_checkouts">
194                                         Yes
195                                         <input type="radio" id="yes-autorenew_checkouts" name="borrower_autorenew_checkouts" value="1" />
196                                     </label>
197                                     <label class="radio inline" for="no-autorenew_checkouts">
198                                         No
199                                         <input type="radio" id="no-autorenew_checkouts" name="borrower_autorenew_checkouts" value="0" checked="checked" />
200                                     </label>
201                                 [% END %]
202                         <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
203                         <input type="hidden" name="update_arc" value="1" />
204                         <input type="submit" value="Update auto-renewal preference" />
205                     </form>
206                     [% END %]
207
208                     <div id="opac-user-views" class="toptabs">
209                         <ul class="nav nav-tabs" role="tablist">
210                             <li class="nav-item" role="presentation">
211                                 <a class="nav-link active" id="opac-user-checkouts-tab" data-toggle="tab" role="tab" aria-controls="opac-user-checkouts" aria-selected="true"  href="#opac-user-checkouts">Checked out ([% issues_count | html %])</a>
212                             </li>
213                             [% IF relatives %]
214                                 <li class="nav-item" role="presentation">
215                                     <a class="nav-link" id="opac-user-relative-issues-tab" data-toggle="tab" role="tab" aria-controls="opac-user-relative-issues" aria-selected="false" href="#opac-user-relative-issues">Relatives' checkouts</a>
216                                 </li>
217                             [% END %]
218                             [% IF ( overdues_count ) %]
219                                 <li class="nav-item" role="presentation">
220                                     <a class="nav-link" id="opac-user-overdues-tab" data-toggle="tab" role="tab" aria-controls="opac-user-overdues" aria-selected="false" href="#opac-user-overdues">Overdue ([% overdues_count | html %])</a>
221                                 </li>
222                             [% END %]
223                             [% IF ( OPACFinesTab ) %]
224                                 [% IF ( amountoutstanding > 0 ) %]
225                                     <li class="nav-item" role="presentation">
226                                         <a class="nav-link" id="opac-user-fines-tab" data-toggle="tab" role="tab" aria-controls="opac-user-fines" aria-selected="false" href="#opac-user-fines">Charges ([% amountoutstanding | $Price %])</a>
227                                     </li>
228                                 [% END %]
229                                 [% IF ( amountoutstanding < 0 ) %]
230                                     <li class="nav-item" role="presentation">
231                                         <a class="nav-link" id="opac-user-fines-tab" data-toggle="tab" role="tab" aria-controls="opac-user-fines" aria-selected="false" href="#opac-user-fines">Credits ([% amountoutstanding * -1 | $Price %])</a>
232                                     </li>
233                                 [% END %]
234                                 [% IF relatives_with_fines %]
235                                     <li class="nav-item" role="presentation">
236                                         <a class="nav-link" id="opac-user-relative-fines-tab" data-toggle="tab" role="tab" aria-controls="opac-user-relative-fines" aria-selected="false" href="#opac-user-relative-fines">Relatives' charges</a>
237                                     </li>
238                                 [% END %]
239                             [% END %]
240
241                             [% IF borrower_club_enrollments.count || borrower_enrollable_clubs.count %]
242                                 <li class="nav-item" role="presentation">
243                                     <a class="nav-link" data-toggle="tab" role="tab" aria-controls="opac-user-clubs" aria-selected="false" id="opac-user-clubs-tab-link" href="#opac-user-clubs">
244                                         Clubs ([% borrower_club_enrollments.count || 0 | html %]/[% borrower_enrollable_clubs.count || 0 | html %])
245                                     </a>
246                                 </li>
247                             [% END %]
248
249                             [% IF ( RESERVES.count ) %]
250                                 <li class="nav-item" role="presentation">
251                                     <a class="nav-link" id="opac-user-holds-tab" data-toggle="tab" role="tab" aria-controls="opac-user-holds" aria-selected="false" href="#opac-user-holds">Holds ([% RESERVES.count | html %])</a>
252                                 </li>
253                             [% END %]
254                             [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
255                                 <li class="nav-item" role="presentation">
256                                     <a class="nav-link" id="opac-user-recalls-tab" data-toggle="tab" role="tab" aria-controls="opac-user-recalls" aria-selected="false" href="#opac-user-recalls">Recalls ([% RECALLS.count | html %])</a>
257                                 </li>
258                             [% END %]
259                             [% IF Koha.Preference('ArticleRequests') %]
260                                 <li class="nav-item" role="presentation">
261                                     <a class="nav-link" id="opac-user-article-requests-tab" data-toggle="tab" role="tab" aria-controls="opac-user-article-requests" aria-selected="false" href="#opac-user-article-requests">Article requests ([% current_article_requests.size || 0 | html %])</a>
262                                 </li>
263                             [% END %]
264                             [% IF ( OverDriveCirculation ) %]
265                                 <li class="nav-item" role="presentation">
266                                     <a class="nav-link" id="opac-user-overdrive-tab" data-toggle="tab" role="tab" aria-controls="opac-user-overdrive" aria-selected="false" href="#opac-user-overdrive">OverDrive account</a>
267                                 </li>
268                             [% END %]
269                             [% IF ( RecordedBooksCirculation ) %]
270                                 <li class="nav-item" role="presentation">
271                                     <a class="nav-link" id="opac-user-recordedbooks-tab" data-toggle="tab" role="tab" aria-controls="opac-user-recordedbooks" aria-selected="false" href="#opac-user-recordedbooks">RecordedBooks account</a>
272                                 </li>
273                             [% END %]
274                         </ul>
275                         <div class="tab-content">
276
277                             <div id="opac-user-overdrive" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-overdrive-tab">
278                             </div>
279                             <div id="opac-user-recordedbooks" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-recordedbooks-tab">
280                             </div>
281                             <div id="opac-user-checkouts" class="tab-pane active" role="tabpanel" aria-labelledby="opac-user-checkouts-tab">
282                                 [% IF ( issues_count ) %]
283                                     <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
284                                         <legend class="sr-only">Renew selected</legend>
285                                         <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]">
286                                         <input type="hidden" name="from" value="opac_user" />
287                                         <table id="checkoutst" class="table table-bordered table-striped">
288                                             <caption>[% issues_count | html %] Item(s) checked out</caption>
289                                             <thead>
290                                                 <tr>
291                                                     [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
292                                                     <th class="anti-the">Title</th>
293                                                     <th>Author</th>
294                                                     <th class="psort">Due</th>
295                                                     [% UNLESS ( item_level_itypes ) %]
296                                                         <th>Item type</th>
297                                                     [% END %]
298                                                     [% IF ( show_barcode ) %]
299                                                         <th>Barcode</th>
300                                                     [% END %]
301                                                         <th>Call number</th>
302                                                     [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
303                                                         <th>Renew</th>
304                                                     [% END %]
305                                                     [% IF ( OPACFinesTab ) %]
306                                                         <th>Fines</th>
307                                                     [% END %]
308                                                     [% IF ( OPACMySummaryHTML ) %]
309                                                         <th class="nosort">Links</th>
310                                                     [% END %]
311                                                     [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
312                                                         <th class="hidden">Checkout note</th>
313                                                         <th id="checkout-notes" class="nosort noExport" title="Use this to report any problems with your currently checked out items">Report a problem</th>
314                                                     [% END %]
315                                                 </tr>
316                                             </thead>
317                                             <tbody>
318                                                 [% FOREACH ISSUE IN ISSUES %]
319                                                     [% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
320                                                     [% IF ( JacketImages ) %]
321                                                         <td class="jacketcell">
322                                                             [% IF ( OPACAmazonCoverImages ) %]
323                                                                 [% IF ( ISSUE.normalized_isbn ) %]
324                                                                     <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>
325                                                                 [% ELSE %]
326                                                                     <a href="#"><span class="no-image">No cover image available</span></a>
327                                                                 [% END %]
328                                                             [% END %]
329
330                                                             [% IF ( GoogleJackets ) %]
331                                                                 [% IF ( ISSUE.normalized_isbn ) %]
332                                                                     <div style="display:block;" title="Click to view in Google Books" class="[% ISSUE.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
333                                                                 [% ELSE %]
334                                                                     <a href="http://books.google.com/books?q=[% ISSUE.title |url %]"><span class="no-image">No cover image available</span></a>
335                                                                 [% END %]
336                                                             [% END %]
337
338                                                             [% IF ( BakerTaylorEnabled ) %]
339                                                                 [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %]
340                                                                 [% IF ( bt_id ) %]
341                                                                     <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
342                                                                 [% ELSE %]
343                                                                     <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
344                                                                 [% END %]
345                                                             [% END %]
346
347                                                             [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
348                                                                 [% SET custom_cover_image_url = ISSUE.biblio_object.custom_cover_image_url %]
349                                                                 [% IF custom_cover_image_url %]
350                                                                     <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
351                                                                 [% END %]
352                                                             [% END %]
353
354                                                             [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
355                                                                 <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" />
356                                                             [% END %]
357                                                         </td>
358                                                     [% END # / IF JacketImages %]
359
360                                                     <td class="title">
361                                                         [% INCLUDE 'biblio-title.inc' biblio=ISSUE link=> 1 %]
362                                                         [% IF ( ISSUE.enumchron ) %] [% ISSUE.enumchron | html %][% END %]
363
364                                                         [% IF ( ISSUE.onsite_checkout ) %] <em class="onsite_checkout">(On-site checkout)</em>[% END %]
365
366                                                         [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
367                                                             [% INCLUDE 'user-star-ratings.inc' item=ISSUE %]
368                                                         [% END %]
369
370                                                         [% IF ( ISSUE.recall ) %]<br><i>This item has been recalled. Please return by the new due date.</i>[% END %]
371                                                     </td>
372
373                                                     <td class="author">[% ISSUE.author | html %]</td>
374                                                     [% IF ( ISSUE.overdue ) %]
375                                                         <td class="date_due overdue" data-order="[% ISSUE.date_due | html %]">
376                                                             <span class="tdlabel">Date due:</span>
377                                                             [% ISSUE.date_due | $KohaDates  as_due_date => 1 %]
378                                                         </td>
379                                                     [% ELSE %]
380                                                         <td class="date_due" data-order="[% ISSUE.date_due | html %]">
381                                                             <span class="tdlabel">Date due:</span>
382                                                             [% ISSUE.date_due | $KohaDates  as_due_date => 1 %]
383                                                         </td>
384                                                     [% END %]
385                                                     [% UNLESS ( item_level_itypes ) %]
386                                                         <td class="itype">
387                                                             <span class="tdlabel">Item type:</span>
388                                                             [% IF ( ISSUE.imageurl && !Koha.Preference('OpacNoItemTypeImages') ) %]
389                                                                 <img src="[% ISSUE.imageurl | html %]" title="[% ISSUE.description | html %]" alt="[% ISSUE.description | html %]" />
390                                                                 [% END %] <span class="itypetext">[% ISSUE.description | html %]</span>
391                                                         </td>
392                                                     [% END %]
393                                                     [% IF ( show_barcode ) %]
394                                                         <td class="barcode">
395                                                             <span class="tdlabel">Barcode:</span>
396                                                             [% ISSUE.barcode | html %]
397                                                         </td>
398                                                     [% END %]
399                                                     <td class="call_no">
400                                                         <span class="tdlabel">Call number:</span>
401                                                         [% ISSUE.itemcallnumber | html %]
402                                                     </td>
403                                                     [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
404                                                         [% IF ( ISSUE.status && canrenew ) %]
405                                                             <td class="renew" data-order="[% ISSUE.renewsleft | html %]">
406                                                         [% ELSE %]
407                                                             <td class="renew" data-order="0">
408                                                         [% END %]
409                                                         [% IF ISSUE.renewed %]<span class="blabel label-success">Renewed!</span><br />[% END %]
410                                                         [% IF ( ISSUE.status ) %]
411                                                             [% IF ( canrenew ) %]
412                                                                 <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>
413                                                             [% END %]
414                                                             [% IF ISSUE.renewalfee > 0 %]
415                                                                 <span class="renewalfee label label-warning">Fee for item type '[% ItemTypes.GetDescription( ISSUE.renewalitemtype) | html %]': [% ISSUE.renewalfee | $Price %]</span>
416                                                             [% END %]
417                                                             [% IF ISSUE.itemtype_object.rentalcharge_daily > 0 %]
418                                                                 <span class="renewalfee label label-warning">[% ISSUE.itemtype_object.rentalcharge_daily | $Price %] per day</span>
419                                                             [% END %]
420                                                             [% IF ISSUE.itemtype_object.rentalcharge_hourly > 0 %]
421                                                                 <span class="renewalfee label label-warning">[% ISSUE.itemtype_object.rentalcharge_hourly | $Price %] per hour</span>
422                                                             [% END %]
423                                                             <span class="renewals">(
424                                                                 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
425                                                                 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
426                                                                     / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
427                                                                 [% END %]
428                                                             )</span>
429                                                         [% ELSIF ( ISSUE.on_reserve ) %]
430                                                             <span class="usr-msg no-renew-hold">Not renewable <span class="renewals">(on hold)</span></span>
431                                                         [% ELSIF ( ISSUE.too_many ) %]
432                                                             <span class="usr-msg no-renew-too-many">Not renewable</span>
433                                                         [% ELSIF ( ISSUE.too_unseen ) %]
434                                                             <span class="usr-msg no-renew-unseen">Item must be renewed at the library. [% ISSUE.renewsleft | html %] renewals remaining</span>
435                                                         [% ELSIF ( ISSUE.norenew_overdue ) %]
436                                                             <span class="usr-msg no-renew-overdue">Not allowed <span class="renewals">(overdue)</span></span>
437                                                         [% ELSIF ( ISSUE.auto_too_late ) %]
438                                                             <span class="usr-msg no-renew-too-late">No longer renewable</span>
439                                                         [% ELSIF ISSUE.auto_too_much_oweing %]
440                                                             <span class="usr-msg auto-renew-fines">Automatic renewal failed, you have unpaid fines.</span>
441                                                             <span class="renewals">(
442                                                                 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
443                                                                 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
444                                                                     / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
445                                                                 [% END %]
446                                                             )</span>
447                                                         [% ELSIF ISSUE.auto_account_expired %]
448                                                             <span class="usr-msg auto-renew-expired">Automatic renewal failed, your account is expired.</span>
449                                                             <span class="renewals">(
450                                                                 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
451                                                                 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
452                                                                     / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
453                                                                 [% END %]
454                                                             )</span>
455                                                         [% ELSIF ( ISSUE.too_soon ) %]
456                                                             <span class="usr-msg no-renewal-before">No renewal before [% ISSUE.soonestrenewdate | $KohaDates  as_due_date => 1 %]</span>
457                                                             <span class="renewals">(
458                                                                 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
459                                                                 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
460                                                                     / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
461                                                                 [% END %]
462                                                             )</span>
463                                                         [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
464                                                             <span class="usr-msg automatic-renewal">Automatic renewal</span>
465                                                             <span class="renewals">(
466                                                                 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
467                                                                 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
468                                                                     / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
469                                                                 [% END %]
470                                                             )</span>
471                                                         [% ELSIF ( ISSUE.item_denied_renewal ) %]
472                                                             Renewal not allowed
473                                                         [% END %]
474                                                         </td>
475                                                     [% END %]
476                                                     [% IF ( OPACFinesTab ) %]
477                                                         <td class="fines">
478                                                             <span class="tdlabel">Fines:</span>
479                                                             [% IF ( ISSUE.charges ) %]
480                                                                 <span>Yes (Item overdue or lost)</span>
481                                                             [% ELSIF ( ISSUE.rentalfines ) %]
482                                                                 <span>Yes (Rental fees)</span>
483                                                             [% ELSE %]
484                                                                 <span>No</span>
485                                                             [% END %]
486                                                         </td>
487                                                     [% END %]
488                                                     [% IF ( OPACMySummaryHTML ) %]
489                                                         <td class="links">[% ISSUE.MySummaryHTML | $raw %]</td>
490                                                     [% END %]
491                                                     [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
492                                                         <td>
493                                                             [% ISSUE.note | html %]
494                                                         </td>
495                                                         <td class="note">
496                                                             <div id="viewnote_[% ISSUE.issue_id | html %]">
497                                                                 [% ISSUE.note | html %]
498                                                             </div>
499                                                             <a id="save_[% ISSUE.issue_id | html %]" href="/cgi-bin/koha/opac-issue-note.pl?issue_id=[% ISSUE.issue_id | html %]" class="btn btn-primary btn-sm btn-add-note noprint" data-title="[% ISSUE.title | html %] [% FOREACH subtitle IN ISSUE.subtitle.split(' \| ') %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %][% subtitle | html %][% END %]" data-issueid="[% ISSUE.issue_id | html %]" id="save_[% ISSUE.issue_id | html %]">
500                                                                 [% IF ( ISSUE.note ) -%]
501                                                                     <span>Edit note</span>
502                                                                 [% ELSE -%]
503                                                                     <span>Add note</span>
504                                                                 [% END %]
505                                                             </a>
506                                                             <input type="hidden" id="note_[% ISSUE.issue_id | html %]" name="note" value="[% ISSUE.note | html %]" data-origvalue="[% ISSUE.note | html %]" />
507                                                         </td>
508                                                     [% END %]
509                                                     </tr>
510                                                 [% END # /FOREACH ISSUES %]
511                                             </tbody>
512                                         </table>
513                                         [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
514                                             <input type="submit" class="btn btn-primary" value="Renew selected" />
515                                             <button type="button" id="renewall_js" class="btn btn-primary">Renew all</button>
516                                         [% END %]
517                                     </form>
518
519                                     [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
520                                         <form id="renewall" class="js-hide" action="/cgi-bin/koha/opac-renew.pl" method="post">
521                                             <legend class="sr-only">Renew</legend>
522                                             <input type="hidden" name="from" value="opac_user" />
523                                             <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
524                                             [% FOREACH ISSUE IN ISSUES %]
525                                                 [% IF ISSUE.status %]
526                                                     <input type="hidden" name="item" value="[% ISSUE.itemnumber | html %]" />
527                                                 [% END %]
528                                             [% END %]
529                                             <input type="submit" class="btn btn-primary" value="Renew all" />
530                                         </form>
531                                     [% END %]
532                                 [% ELSE %]
533                                     <table class="table table-bordered table-striped">
534                                         <caption class="sr-only">Checked out</caption>
535                                         <tr><td>You have nothing checked out</td></tr>
536                                     </table>
537                                 [% END # IF issues_count %]
538
539                                 <!-- Add note modal -->
540                                 <div class="modal" id="addNoteModal" tabindex="-1" aria-labelledby="addNoteLabel" aria-hidden="true">
541                                     <div class="modal-dialog">
542                                         <form action="#" id="addNoteForm">
543                                             <div class="modal-content">
544                                                 <div class="modal-header">
545                                                     <h5 class="modal-title" id="addNoteLabel">Report a problem</h5>
546                                                     <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
547                                                         <span aria-hidden="true">&times;</span>
548                                                     </button>
549                                                 </div>
550                                                 <div class="modal-body" id="addNoteBody">
551                                                     <h6 id="addNoteTitle"></h6>
552                                                     <input type="hidden" id="addNoteIssueId" name="issue_id" value="" />
553                                                     <textarea name="note" id="addNote" rows="4"></textarea>
554                                                     <div class="hint">Your note will be shown to the librarian when the item is checked in.</div>
555                                                 </div>
556                                                 <div class="modal-footer">
557                                                     <button type="submit" class="btn btn-primary">Submit note</button>
558                                                     <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
559                                                 </div>
560                                             </div>
561                                         </form>
562                                     </div>
563                                 </div>
564
565                             </div> <!-- / .opac-user-checkouts -->
566
567                             [% IF borrower_club_enrollments.count || borrower_enrollable_clubs.count %]
568                                 <div id="opac-user-clubs" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-clubs-tab-link">
569                                     Loading...
570                                 </div>
571                             [% END %]
572
573                             [% IF ( OPACFinesTab ) %]
574                                 <!-- FINES BOX -->
575                                 [% IF ( amountoutstanding > 0 ) %]
576                                     <div id="opac-user-fines" class="tab-pane" id="home" role="tabpanel" aria-labelledby="opac-user-fines-tab">
577                                         <table class="table table-bordered table-striped">
578                                             <caption>Charges</caption>
579                                             <thead><tr><th colspan="2">Amount</th></tr></thead>
580                                             <tbody>
581                                                 <tr>
582                                                     <td>You currently owe fines and charges amounting to:</td>
583                                                     <td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding | $Price %]</a></td>
584                                                 </tr>
585                                             </tbody>
586                                         </table>
587                                     </div>
588                                 [% END %]
589
590                                 [% IF ( amountoutstanding < 0 ) %]
591                                     <div id="opac-user-fines" class="tab-pane" id="home" role="tabpanel" aria-labelledby="opac-user-fines-tab">
592                                         <table class="table table-bordered table-striped">
593                                             <caption>Credits</caption>
594                                             <thead><tr><th colspan="2">Amount</th></tr></thead>
595                                             <tbody>
596                                                 <tr>
597                                                     <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding * -1 | $Price %]</a></td>
598                                                 </tr>
599                                             </tbody>
600                                         </table>
601                                     </div>
602                                 [% END %]
603
604                                 [% IF relatives_with_fines %]
605                                     <div id="opac-user-relative-fines" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-relative-fines-tab">
606                                         <table class="table table-bordered table-striped">
607                                             <caption>Fines and charges</caption>
608                                             <thead>
609                                                 <tr>
610                                                     <th colspan="2">Amount</th>
611                                                 </tr>
612                                             </thead>
613                                             <tbody>
614                                                 [% FOREACH r IN relatives_with_fines %]
615                                                 <tr>
616                                                     <td>[% r.firstname | html %] [% r.surname | html %] currently owes fines and charges amounting to:</td>
617                                                     <td><a href="/cgi-bin/koha/opac-account.pl#g[% r.id | uri %]">[% r.account.balance | $Price %]</a></td>
618                                                 </tr>
619                                                 [% END %]
620                                             </tbody>
621                                         </table>
622                                     </div>
623                                 [% END %]
624                             [% END # / OPACFinesTab %]
625
626                             [% IF relatives %]
627                                 <div id="opac-user-relative-issues" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-relative-issues-tab">
628                                     <table id="opac-user-relative-issues-table" class="table table-bordered table-striped">
629                                         <caption class="sr-only">Relative issues</caption>
630                                         <thead>
631                                             <tr>
632                                                 <th class="anti-the">Title</th>
633                                                 <th>Due</th>
634                                                 <th>Barcode</th>
635                                                 <th>Call number</th>
636                                                 <th class="psort">Relative</th>
637                                             </tr>
638                                         </thead>
639
640                                         <tbody>
641                                             [% FOREACH r IN relatives %]
642                                                 [% FOREACH c IN r.checkouts %]
643                                                     <tr>
644                                                         <td>
645                                                             <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% c.item.biblio.biblionumber | uri %]">
646                                                                 [% c.item.biblio.title | html %][% IF ( c.item.enumchron ) %] [% c.item.enumchron | html %][% END %]
647                                                             </a>
648                                                         </td>
649
650                                                         <td>
651                                                             [% c.date_due | $KohaDates %]
652                                                         </td>
653
654                                                         <td>
655                                                             [% c.item.barcode | html %]
656                                                         </td>
657
658                                                         <td>
659                                                             [% c.item.itemcallnumber | html %]
660                                                         </td>
661
662                                                         <td>
663                                                             [% r.firstname | html %] [% r.surname | html %]
664                                                         </td>
665                                                     </tr>
666                                                 [% END %]
667                                             [% END %]
668                                         </tbody>
669                                     </table>
670                                 </div>
671                             [% END %]
672
673                             [% IF ( overdues_count ) %]
674                                 <div id="opac-user-overdues" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-overdues-tab">
675                                     <table id="overduest" class="table table-bordered table-striped">
676                                         <caption>Overdues <span class="count">([% overdues_count | html %] total)</span></caption>
677                                         <!-- OVERDUES TABLE ROWS -->
678                                         <thead>
679                                             <tr>
680                                                 [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
681                                                 <th class="anti-the">Title</th>
682                                                 [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
683                                                 [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
684                                                 <th>Call number</th>
685                                                 <th class="psort">Due</th>
686                                                 [% IF ( OpacRenewalAllowed ) %]
687                                                     <th class="nosort">Renew</th>
688                                                 [% END %]
689                                                 [% IF ( OPACFinesTab ) %]
690                                                     <th>Fines</th>
691                                                 [% END %]
692                                             </tr>
693                                         </thead>
694                                         <tbody>
695                                             [% FOREACH OVERDUE IN OVERDUES %]
696                                                 <tr>
697                                                     [% IF ( JacketImages ) %]
698                                                         <td class="jacketcell">
699                                                         [% IF ( OPACAmazonCoverImages ) %]
700                                                             [% IF ( OVERDUE.normalized_isbn ) %]
701                                                                 <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>
702                                                             [% ELSE %]
703                                                                 <a href="#"><span class="no-image">No cover image available</span></a>
704                                                             [% END %]
705                                                         [% END %]
706
707                                                         [% IF ( GoogleJackets ) %]
708                                                             [% IF ( OVERDUE.normalized_isbn ) %]
709                                                                 <div style="display:block;" title="Click to view in Google Books" class="[% OVERDUE.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
710                                                             [% ELSE %]
711                                                                 <a href="http://books.google.com/books?q=[% OVERDUE.title |url %]"><span class="no-image">No cover image available</span></a>
712                                                             [% END %]
713                                                         [% END %]
714
715                                                         [% IF ( BakerTaylorEnabled ) %]
716                                                             [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %]
717                                                             [% IF ( bt_id ) %]
718                                                                 <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
719                                                             [% ELSE %]
720                                                                 <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
721                                                             [% END %]
722                                                         [% END %]
723
724                                                         [% IF ( SyndeticsCoverImages ) %]
725                                                             <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" />
726                                                         [% END %]
727                                                         </td>
728                                                     [% END # /IF jacketcell %]
729
730                                                     <td>
731                                                         [% INCLUDE 'biblio-title.inc' biblio=OVERDUE link=> 1 %]
732                                                         <span class="item-details">[% OVERDUE.author | html %]</span>
733                                                     </td>
734
735                                                     [% UNLESS ( item_level_itypes ) %]
736                                                         <td>
737                                                             [% IF ( OVERDUE.imageurl  && !Koha.Preference('OpacNoItemTypeImages') ) %]
738                                                                 <img src="[% OVERDUE.imageurl | html %]" title="[% OVERDUE.description | html %]" alt="[% OVERDUE.description | html %]" />
739                                                             [% END %] [% OVERDUE.description | html %]
740                                                         </td>
741                                                     [% END %]
742                                                     [% IF ( show_barcode ) %]
743                                                         <td>
744                                                             <span class="tdlabel">Barcode:</span>
745                                                             [% OVERDUE.barcode | html %]
746                                                         </td>
747                                                     [% END %]
748                                                     <td>
749                                                         <span class="tdlabel">Call number:</span>
750                                                         [% OVERDUE.itemcallnumber | html %]
751                                                     </td>
752                                                     <td data-order="[% OVERDUE.date_due | html %]">
753                                                         <span class="tdlabel">Date due:</span>
754                                                         [% OVERDUE.date_due | $KohaDates  as_due_date => 1 %]
755                                                     </td>
756                                                     [% IF ( OpacRenewalAllowed ) %]
757                                                         <td>
758                                                             [% IF ( OVERDUE.debarred ) %]
759                                                                 Account frozen
760                                                             [% ELSIF ( OVERDUE.status ) %]
761                                                                 [% IF ( canrenew ) %]
762                                                                     <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber | uri %]&amp;bornum=[% OVERDUE.borrowernumber | uri %]">Renew</a>
763                                                                 [% END %]
764                                                                     <span class="renewals">(
765                                                                         [% OVERDUE.renewsleft | html %] of [% OVERDUE.renewsallowed | html %] renewals remaining
766                                                                         [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
767                                                                             / [% OVERDUE.unseenleft | html %] of [% OVERDUE.unseenallowed | html %] renewals left before the item must be seen by the library
768                                                                         [% END %]
769                                                                     )</span>
770                                                             [% ELSIF ( OVERDUE.norenew_overdue ) %]
771                                                                 Not allowed <span class="renewals">(overdue)</span>
772                                                             [% ELSIF ( OVERDUE.onreserve ) %]
773                                                                 <span>On hold</span>
774                                                             [% ELSE %]
775                                                                <span>No renewals left</span>
776                                                             [% END %]
777                                                         </td>
778                                                     [% END %]
779                                                     [% IF ( OPACFinesTab ) %]
780                                                         <td>
781                                                             <span class="tdlabel">Fines:</span>
782                                                             [% IF ( OVERDUE.charges ) %]
783                                                                 <span>Yes</span>
784                                                             [% ELSE %]
785                                                                 <span>No</span>
786                                                             [% END %]
787                                                         </td>
788                                                     [% END %]
789                                                 </tr>
790                                             [% END %]
791                                         </tbody>
792                                     </table>
793                                 </div> <!-- / #opac-user-overdues -->
794                             [% END # /overdues_count %]
795
796                             [% PROCESS 'holds-table.inc' HOLDS = RESERVES, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds %]
797
798                             [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
799                                 <div id="opac-user-recalls" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-recalls-tab">
800                                     <table id="recalls-table" class="table table-bordered table-striped">
801                                         <caption>Recalls <span class="count">([% RECALLS.count | html %])</span></caption>
802                                         <thead>
803                                             <tr>
804                                                 <th class="anti-the">Title</th>
805                                                 <th class="psort">Placed on</th>
806                                                 <th>Expires on</th>
807                                                 <th>Pickup location</th>
808                                                 <th>Status</th>
809                                                 <th class="nosort">&nbsp;</th>
810                                             </tr>
811                                         </thead>
812                                         <tbody>
813                                             [% FOREACH RECALL IN RECALLS %]
814                                             <tr>
815                                                 <td class="title">
816                                                     [% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio link=> 1 %]
817                                                     [% IF RECALL.item_level %]<p class="hint">Item recalled: [% RECALL.item.barcode | html %]</p>[% END %]
818                                                 </td>
819                                                 <td class="recalldate" data-order="[% RECALL.created_date | html %]">
820                                                     <span title="[% RECALL.created_date | html %]">
821                                                         <span class="tdlabel">Recall date:</span>
822                                                         [% RECALL.created_date | $KohaDates %]
823                                                     </span>
824                                                 </td>
825                                                 <td class="expirationdate" data-order="[% RECALL.expiration_date | html %]">
826                                                     [% IF ( RECALL.expiration_date ) %]
827                                                         <span title="[% RECALL.expiration_date | html %]">
828                                                             <span class="tdlabel">Expiration:</span>
829                                                             [% RECALL.expiration_date | $KohaDates %]
830                                                         </span>
831                                                     [% ELSE %]
832                                                         <span title="0000-00-00">
833                                                             <span class="tdlabel">Expiration:</span>
834                                                             Never expires
835                                                         </span>
836                                                     [% END %]
837                                                 </td>
838                                                 <td class="branch">
839                                                     <span class="tdlabel">Pick up location:</span>
840                                                     [% RECALL.library.branchname | html %]
841                                                 </td>
842                                                 <td class="status">
843                                                     <span class="tdlabel">Status:</span>
844                                                     [% IF ( RECALL.requested ) %]
845                                                         <span>Requested</span>
846                                                     [% ELSIF ( RECALL.overdue ) %]
847                                                         <span>Overdue to be returned</span>
848                                                     [% ELSIF ( RECALL.in_transit ) %]
849                                                         <span>In transit to [% RECALL.library.branchname | html %]</span>
850                                                     [% ELSIF ( RECALL.waiting ) %]
851                                                         <span>Ready for pickup</span>
852                                                     [% END %]
853                                                 </td>
854                                                 <td class="cancelrecall">
855                                                     [% IF ( RECALL.requested or RECALL.overdue ) %]
856                                                         <form action="/cgi-bin/koha/opac-recall.pl" method="post">
857                                                             <input type="hidden" name="op" value="cancel">
858                                                             <input type="hidden" name="recall_id" value="[% RECALL.id | html %]">
859                                                             <input type="hidden" name="biblionumber" value="[% RECALL.biblio_id | html %]">
860                                                             <button type="submit" name="submit" class="btn btn-sm btn-danger cancel_recall"><i class="fa fa-remove" aria-hidden="true"></i> Cancel</button>
861                                                         </form>
862                                                     [% END %]
863                                                 </td>
864                                             [% END %]
865                                             </tr>
866                                         </tbody>
867                                     </table>
868                                 </div>
869                             [% END # / # RECALLS.count %]
870
871                             [% IF Koha.Preference('ArticleRequests') %]
872                                 <div id="opac-user-article-requests" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-article-requests-tab">
873                                     [% IF current_article_requests.size %]
874                                         <table id="article-requests-table" class="table table-bordered table-striped">
875                                             <caption>Article requests <span class="count"></span></caption>
876                                             <thead>
877                                                 <tr>
878                                                     <th class="anti-the article-request-record-title">Record title</th>
879                                                     <th class="psort article-request-created-on">Placed on</th>
880                                                     <th class="anti-the article-request-title">Title</th>
881                                                     <th class="article-request-author">Author</th>
882                                                     <th class="article-request-volume">Volume</th>
883                                                     <th class="article-request-issue">Issue</th>
884                                                     <th class="article-request-date">Date</th>
885                                                     <th class="article-request-toc" title="Table of contents">TOC</th>
886                                                     <th class="article-request-pages">Pages</th>
887                                                     <th class="article-request-chapters">Chapters</th>
888                                                     <th class="article-request-patron-notes">Notes</th>
889                                                     <th class="article-request-format">Format</th>
890                                                     <th class="article-request-status">Status</th>
891                                                     <th class="article-request-branchcode">Pickup library</th>
892                                                     <th class="nosort article-request-cancel">&nbsp;</th>
893                                                 </tr>
894                                             </thead>
895
896                                             <tbody>
897                                                     [% FOREACH ar IN current_article_requests %]
898                                                         <tr>
899                                                             <td class="article-request-record-title">
900                                                                 [% INCLUDE 'biblio-title.inc' biblio=ar.biblio link=> 1 %]
901                                                                 [% ar.item.enumchron | html %]
902                                                                 [% ar.biblio.author | html %]
903                                                                 [% IF ar.itemnumber %] <em>(only [% ar.item.barcode | html %])</em>[% END %]
904                                                             </td>
905
906                                                             <td class="article-request-created_on">
907                                                                 [% ar.created_on | $KohaDates %]
908                                                             </td>
909
910                                                             <td class="article-request-title">
911                                                                 [% ar.title | html %]
912                                                             </td>
913
914                                                             <td class="article-request-author">
915                                                                 [% ar.author | html %]
916                                                             </td>
917
918                                                             <td class="article-request-volume">
919                                                                 [% ar.volume | html %]
920                                                             </td>
921
922                                                             <td class="article-request-issue">
923                                                                 [% ar.issue | html %]
924                                                             </td>
925
926                                                             <td class="article-request-date">
927                                                                 [% ar.date | html %]
928                                                             </td>
929
930                                                             <td class="article-request-toc">
931                                                                 [% IF ar.toc_request %]Yes[% END %]
932                                                             </td>
933
934                                                             <td class="article-request-pages">
935                                                                 [% ar.pages | html %]
936                                                             </td>
937
938                                                             <td class="article-request-chapters">
939                                                                 [% ar.chapters | html %]
940                                                             </td>
941
942                                                             <td class="article-request-patron-notes">
943                                                                 [% ar.patron_notes | html %]
944                                                             </td>
945
946                                                             <td class="article-request-format">[% IF ar.format == 'PHOTOCOPY' %]<span>Copy</span>[% ELSIF ar.format == 'SCAN' %]<span>Scan</span>[% END %]</td>
947
948                                                             <td class="article-request-status">
949                                                                 [% IF ar.status == 'PENDING' %]
950                                                                     <span>Pending</span>
951                                                                 [% ELSIF ar.status == 'PROCESSING' %]
952                                                                     <span>Processing</span>
953                                                                 [% ELSIF ar.status == 'REQUESTED' %]
954                                                                     <span>New</span>
955                                                                 [% ELSIF ar.status == 'COMPLETED' %]
956                                                                     <span>Completed</span>
957                                                                 [% ELSIF ar.status == 'CANCELED' %]
958                                                                     <span>Canceled</span>
959                                                                 [% END %]
960                                                             </td>
961
962                                                             <td class="article-request-branchcode">
963                                                                 [% ar.branch.branchname | html %]
964                                                             </td>
965
966                                                             <td class="article-request-cancel">
967                                                                 <button data-title="[% ar.biblio.title | html %] [% ar.item.enumchron | html %]" data-article-request_id="[% ar.id | html %]" class="btn btn-sm btn-danger btn-delete-article-request"><i class="fa fa-remove" aria-hidden="true"></i> Cancel</button>
968                                                             </td>
969                                                         </tr>
970                                                     [% END %]
971                                             </tbody>
972                                         </table>
973                                     [% ELSE %]
974                                         <table class="table table-bordered table-striped">
975                                             <caption class="sr-only">Article requests</caption>
976                                             <tr><td>You have no article requests currently.</td></tr>
977                                         </table>
978                                     [% END # IF current_article_requests.size %]
979                                 </div> <!-- / #opac-user-article-requests -->
980                             [% END %]
981                         </div> <!-- /.tab-content -->
982                     </div> <!-- /#opac-user-views -->
983                 </div> <!-- /#userdetails -->
984             </div> <!-- /.col-10 -->
985         </div> <!-- /.row -->
986     </div> <!-- /.container-fluid -->
987 </div> <!-- /#main -->
988
989 [% # hold suspend modal form %]
990 <div id="suspendHoldModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="suspendModalLabel" aria-hidden="true" data-focus="false">
991     <div class="modal-dialog">
992         <div class="modal-content">
993             <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
994                 <div class="modal-header">
995                     [% IF HOLD.suspend %]
996                         <h5 class="modal-title" id="suspendModalLabel">Resume hold</h5>
997                     [% ELSE %]
998                         <h5 class="modal-title" id="suspendModalLabel">Suspend hold</h5>
999                     [% END %]
1000                     <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
1001                         <span aria-hidden="true">x</span>
1002                     </button>
1003                 </div>
1004                 <div class="modal-body">
1005                     <h6 id="suspendHoldTitle"></h6>
1006                     <input type="hidden" name="reserve_id" id="suspendHoldReserveId" value="" />
1007                     <label for="suspend_untilDate">Suspend until:</label>
1008                     <input type="text" name="suspend_until" id="suspend_untilDate" size="10" />
1009                     [% INCLUDE 'date-format.inc' %]
1010                     <p><a href="#" class="clear-flatpickr" data-fp="suspend_untilDate">Clear date to suspend indefinitely</a></p>
1011                 </div>
1012                 <div class="modal-footer">
1013                     <button class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Suspend</button>
1014                     <button data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-remove" aria-hidden="true"></i> Do not suspend</button>
1015                 </div>
1016             </form>
1017         </div> <!-- /.modal-content -->
1018     </div> <!-- /.modal-dialog -->
1019 </div>  <!-- /#suspendModal -->
1020
1021 [% IF ( OverDriveCirculation ) %]
1022     [% INCLUDE 'overdrive-checkout.inc' %]
1023     [% IF ( Koha.Preference('OverDrivePasswordRequired') ) %]
1024         [% INCLUDE 'overdrive-login.inc' %]
1025     [% END %]
1026 [% END %]
1027 [% IF ( RecordedBooksCirculation ) %]
1028 [% INCLUDE 'recordedbooks-checkout.inc' %]
1029 [% END %]
1030
1031 [% INCLUDE 'opac-bottom.inc' %]
1032 [% BLOCK jsinclude %]
1033     [% INCLUDE 'calendar.inc' %]
1034     [% INCLUDE 'datatables.inc' %]
1035     <script>
1036         var AR_CAPTION_COUNT = _("(%s total)");
1037
1038
1039         function tableInit( tableId ){
1040             if( tableId == "checkoutst" ){
1041                 $(".dt-buttons").append("<button type=\"button\" class=\"dt-button buttons-ical\" id=\"buttons-ics\">iCal</button> ");
1042                 [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1043                     $(".dt-buttons").append("<button id=\"renewselected_link\" class=\"dt-button buttons-renew\"><i class=\"fa fa-check\" aria-hidden=\"true\"></i> "+_("Renew selected")+"</button> <button id=\"renewall_link\" class=\"dt-button buttons-renewall\"><span class=\"fa-stack\"><i class=\"fa fa-check fa-stack-1x\" aria-hidden=\"true\"></i><i class=\"fa fa-check fa-stack-1x\" aria-hidden=\"true\"></i></span> "+_("Renew all")+"</button>");
1044                 [% END %]
1045             }
1046         }
1047         $(document).ready(function(){
1048             $('#opac-user-article-requests caption .count').html(AR_CAPTION_COUNT.format('[% current_article_requests.size | html %]'));
1049
1050             $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
1051
1052             $(".btn-delete-hold").on("click", function(e){
1053                 e.preventDefault();
1054                 var hold_title = $(this).data("title");
1055                 var reserve_id = $(this).data("reserve_id");
1056                 confirmModal( hold_title, _("Are you sure you want to cancel this hold?"), _("Yes, cancel hold"), _("No, do not cancel hold"), function( result ){
1057                         $("#bootstrap-confirm-box-modal").remove()
1058                         if( result ){
1059                             $("#delete_hold_" + reserve_id ).submit();
1060                         }
1061                     }
1062                 );
1063             });
1064
1065             $(".btn-req-delete-hold").on("click", function(e){
1066                 e.preventDefault();
1067                 var hold_title = $(this).data("title");
1068                 var reserve_id = $(this).data("reserve_id");
1069                 confirmModal( hold_title, _("Are you sure you want to request cancelling this hold?"), _("Yes"), _("No"), function( result ){
1070                         $("#bootstrap-confirm-box-modal").remove()
1071                         if( result ){
1072                             $("#req_cancel_hold_" + reserve_id ).submit();
1073                         }
1074                     }
1075                 );
1076             });
1077
1078             $(".btn-delete-article-request").on("click", function(e){
1079                 e.preventDefault();
1080                 var article_request = $(this).data("title");
1081                 var article_request_id = $(this).data("article-request_id");
1082                 (function(row){
1083                     var doCancel = function( result ){
1084                         $("#bootstrap-confirm-box-modal").remove();
1085                         if( result ){
1086                             $.ajax({
1087                                 type: "DELETE",
1088                                 url: '/api/v1/public/patrons/'+borrowernumber+'/article_requests/'+article_request_id+'?cancellation_reason=OPAC',
1089                                 success: function( data ) {
1090                                     row.parents('tr').hide({
1091                                         duration: 'slow',
1092                                         complete: function() {
1093                                             var ar_tab = $('a[href="#opac-user-article-requests"');
1094                                             var ar_table = $('#article-requests-table');
1095                                             var ar_length = $('tbody tr:visible', ar_table).length;
1096                                             var ar_count = $('caption .count', ar_table);
1097
1098                                             ar_tab.html(ar_tab.html().replace(/\(\d+\)/, '('+ar_length+')'));
1099                                             ar_count.html(AR_CAPTION_COUNT.format(ar_length));
1100                                         }
1101                                     });
1102                                 }
1103                             });
1104                         }
1105                     };
1106                     confirmModal( article_request, _("Are you sure you want to cancel this article request?"), _("Yes, cancel article request"), _("No, do not cancel article request"), doCancel);
1107                 })($(this))
1108             });
1109
1110             /* We initiate this flatpickr instance here so that we can use the variable later */
1111             var suspend_until_date = $("#suspend_untilDate").flatpickr({
1112                 minDate: "today"
1113             });
1114
1115             $(".suspend_hold").on("click", function(e){
1116                 e.preventDefault();
1117                 var title = $(this).data("title");
1118                 var reserve_id = $(this).data("reserve_id");
1119                 $("#suspendHoldReserveId").val( reserve_id );
1120                 $("#suspendHoldTitle").html( "<em>" + title + "</em>" );
1121                 $("#suspendHoldModal").modal("show");
1122             });
1123
1124             $("#suspendHoldModal").on("hidden.bs.modal", function(){
1125                 $("#suspendHoldTitle").html("");
1126                 $("#suspendHoldReserveId").val("");
1127                 suspend_until_date.clear();
1128             });
1129
1130             $("#suspend_all_submit").on("click", function(e){
1131                 e.preventDefault();
1132                 var title = _("Are you sure you want to suspend all holds?");
1133                 var body = _("All holds will be suspended.");
1134                 confirmModal( body, title, _("Yes, suspend all holds"), "", function( result ){
1135                         $("#bootstrap-confirm-box-modal").remove()
1136                         if( result ){
1137                             $("#suspend_all_holds").submit();
1138                         }
1139                     }
1140                 );
1141             });
1142
1143             $("#resume_all_submit").on("click", function(e){
1144                 e.preventDefault();
1145                 var title = _("Are you sure you want to resume all suspended holds?");
1146                 var body = _("All holds will resume.");
1147                 confirmModal( body, title, _("Yes, resume all holds"), _("No, do not resume holds"), function( result ){
1148                         $("#bootstrap-confirm-box-modal").remove()
1149                         if( result ){
1150                             $("#resume_all_holds").submit();
1151                         }
1152                     }
1153                 );
1154             });
1155
1156             var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table");
1157             dTables.each(function(){
1158                 var thIndex = $(this).find("th.psort").index();
1159                 $(this).on("init.dt", function() {
1160                         tableInit( $(this).attr("id") );
1161                     })
1162                     .dataTable($.extend(true, {}, dataTablesDefaults, {
1163                     "sorting" : [[ thIndex, 'asc' ]],
1164                     "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1165                     "columnDefs": [
1166                         { "targets": [ "nosort" ],"sortable": false,"searchable": false },
1167                         { "type": "anti-the", "targets" : [ "anti-the" ] },
1168                         { "visible": false, "targets" : [ "hidden" ] }
1169                     ],
1170                     "language": {
1171                         "search": "_INPUT_",
1172                         "searchPlaceholder": _("Search")
1173                     },
1174                     "autoWidth": false,
1175                     buttons: [
1176                         /* Override default button set so that we can extend the options of print and csv */
1177                         'clearFilter', 'copy',
1178                         {
1179                             extend: "print",
1180                             exportOptions: {
1181                                 /* Print view should show all columns (even invisible ones) unless they are .noExport */
1182                                 columns: ":not(.noExport)"
1183                             }
1184                         },
1185                         {
1186                             extend: "csv",
1187                             exportOptions: {
1188                                 /* CSV export should include all columns (even invisible ones) unless they are .noExport */
1189                                 columns: ":not(.noExport)"
1190                             }
1191                         }
1192                     ]
1193                 }));
1194             });
1195
1196             $("body").on("click", "#buttons-ics", function(){
1197                 location.href="/cgi-bin/koha/opac-ics.pl";
1198             });
1199
1200             [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1201             [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1202                 $("#renewselected").submit(function(){
1203                     valid = false;
1204                     $("input[type=checkbox]").each(function(){
1205                         if($(this).is(':checked')){
1206                             valid = true;
1207                         }
1208                     });
1209                     if(!valid){
1210                         alert(_("Nothing has been selected. Check the box for each item you want to renew"));
1211                     }
1212                     return valid;
1213                 });
1214                 $("body").on("click","#renewselected_link",function(e){
1215                     e.preventDefault();
1216                     $("#renewselected").submit();
1217                 });
1218                 $("body").on("click","#renewall_link, #renewall_js",function(e){
1219                     e.preventDefault();
1220                     $("#renewall").submit();
1221                 });
1222             [% END # /IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1223
1224             [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
1225
1226                 /* If JS enabled, show button, otherwise show link to redirect to a page where note can be submitted */
1227                 $(".nonjs_submitnote").hide();
1228
1229                 $("input[name='note']").prop('readonly', false);
1230                 $("input[name='note']").keypress(function(e){
1231                     /* prevent submitting of renewselected form */
1232                     if(e.which == 13)
1233                         e.preventDefault();
1234                 });
1235
1236                 $("input[name='note']").keyup(function(e){
1237                     var $btn_save = $('#save_'+$(this).data('issue_id'));
1238                     var origvalue = $(this).data('origvalue');
1239                     var value = $(this).val();
1240
1241                     if(origvalue != value) {
1242                         if(origvalue != "")
1243                             $btn_save.text(_("Submit changes"));
1244                         else
1245                             $btn_save.text(_("Submit note"));
1246                         $btn_save.show();
1247                     } else {
1248                         $btn_save.hide();
1249                     }
1250                 });
1251
1252             [% END %]
1253
1254             $(".change_pickup").on("click", function(){
1255                 var hold_id = $(this).data("hold-id");
1256                 $(this).hide();
1257                 $("#change-pickup-location" + hold_id ).show();
1258             });
1259
1260             if ( $('#opac-user-clubs').length ) {
1261                 $('#opac-user-clubs-tab-link').on('click', function() {
1262                     $('#opac-user-clubs').text(_("Loading..."));
1263                     $('#opac-user-clubs').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrowernumber | html %]');
1264                 });
1265             }
1266
1267             $(".cancel_recall").click(function(e){
1268                 return confirmDelete(_("Are you sure you want to remove this recall?"));
1269             });
1270
1271             $("body").on("click", ".btn-add-note", function(e){
1272                 e.preventDefault();
1273                 var title = $(this).data("title");
1274                 var issue_id = $(this).data("issueid");
1275                 var note = $("#note_" + issue_id ).val();
1276                 var origvalue = $("#note_" + issue_id ).data("origvalue");
1277                 $("#addNote").val( note );
1278                 $("#addNoteIssueId").val( issue_id );
1279                 $("#addNoteTitle").text( title );
1280                 $("#addNoteModal").modal("show");
1281             });
1282
1283             $("#addNoteForm").on("submit", function(e){
1284                 e.preventDefault();
1285                 var title = $("#addNoteTitle").text();
1286                 var issue_id = $("#addNoteIssueId").val();
1287                 var note = $("#addNote").val();
1288                 submitNote( title, issue_id, note );
1289             });
1290
1291             $("#addNoteModal").on("hidden.bs.modal", function(){
1292                 $("#addNoteTitle").text("");
1293                 $("#addNote").val("");
1294             });
1295         });
1296
1297         function submitNote( title, issue_id, note ){
1298             var self = $("#addNoteModal");
1299             var notebutton = $("#save_" + issue_id );
1300             var noteinput = $("#note_" + issue_id );
1301
1302             var ajaxData = {
1303                 'action': 'issuenote',
1304                 'issue_id': issue_id,
1305                 'note': note
1306             };
1307
1308             $.ajax({
1309                 url: '/cgi-bin/koha/svc/checkout_notes/',
1310                 type: 'POST',
1311                 dataType: 'json',
1312                 data: ajaxData,
1313             })
1314             .done(function(data) {
1315                 var message = "";
1316                 if(data.status == 'saved') {
1317                     $("#notesaved").removeClass("alert-error");
1318                     $("#notesaved").addClass("alert-info");
1319                     noteinput.data('origvalue', data.note)
1320                         .val(data.note);
1321                     notebutton.text( _("Edit note" ) );
1322                     $("#viewnote_" + issue_id ).text( data.note );
1323                     message = "<p>" + _("Your note about %s has been saved and sent to the library.").format( em(title) ) + "</p>";
1324                     message += "<p class=\"checkout_note\">" + data.note;
1325                     message += "<a href=\"/cgi-bin/koha/opac-issue-note.pl?issue_id=" + issue_id + "\" class=\"btn btn-link btn-sm btn-add-note\" data-title=\"" + title + "\" data-issueid=\"" + issue_id + "\"><i class=\"fa fa-pencil\" aria-hidden=\"true\"></i> " + _("Edit note") + "</a>";
1326                     message += "</p>";
1327                 } else if(data.status == 'removed') {
1328                     $("#notesaved").removeClass("alert-error");
1329                     $("#notesaved").addClass("alert-info");
1330                     noteinput.data('origvalue', "")
1331                         .val("")
1332                     notebutton.text( _("Add note") );
1333                     $("#viewnote_" + issue_id ).text( data.note );
1334                     message = "<p>" + _("Your note about %s was removed.").format( em(title) ) + "</p>";
1335                 } else {
1336                     $("#notesaved").removeClass("alert-info");
1337                     $("#notesaved").addClass("alert-error");
1338                     message =  "<p>" + _("Your note about %s could not be saved.").format( em(title) ) + "</p>";
1339                     notebutton.text( _("Add note") );
1340                     $("#viewnote_" + issue_id ).text( data.note );
1341                     message += "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>";
1342                 }
1343                 $("#notesaved").html(message);
1344             })
1345             .fail(function(data) {
1346                 $("#notesaved").removeClass("alert-info");
1347                 $("#notesaved").addClass("alert-error");
1348                 var message = "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>";
1349                 $("#notesaved").html(message);
1350             })
1351             .always(function() {
1352                 self.modal("hide");
1353                 $("#notesaved").show();
1354             });
1355         }
1356
1357         function em( title ){
1358             return "<em>" + title + "</em>";
1359         }
1360
1361         var borrowernumber = "[% borrowernumber | html %]";
1362     </script>
1363     [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
1364         [% Asset.js("lib/jquery/plugins/jquery.barrating.min.js") | $raw %]
1365         [% Asset.js("js/ratings.js") | $raw %]
1366     [% END %]
1367     [% IF Koha.Preference('OverDriveCirculation') %]
1368     [% Asset.js("js/overdrive.js") | $raw %]
1369     <script>
1370     [%- IF Koha.Preference('OverDrivePasswordRequired') -%]
1371         var OD_password_required = 1;
1372     [%- ELSE -%]
1373         var OD_password_required = 0;
1374     [%- END -%]
1375     $(document).ready(function() {
1376         [% IF ( overdrive_error ) %]
1377             KOHA.OverDriveCirculation.display_error("#opac-user-overdrive", "[% overdrive_error.dquote | html %]");
1378         [% END %]
1379
1380         [% IF ( overdrive_tab ) %]
1381             $("#opac-user-views a[href='#opac-user-overdrive']").tab("show");
1382         [% END %]
1383
1384         $("#opac-user-overdrive").each( function() {
1385             KOHA.OverDriveCirculation.display_account_details(this);
1386         } );
1387     });
1388     </script>
1389     [% END %]
1390     [% IF RecordedBooksCirculation %]
1391         [% Asset.js("js/recordedbooks.js") | $raw %]
1392         <script>
1393             $(document).ready(function() {
1394                 [% IF ( recordedbooks_error ) %]
1395                     KOHA.RecordedBooks.display_error("#opac-user-recordedbooks", "[% recordedbooks_error.dquote | html %]");
1396                 [% END %]
1397                 [% IF ( recordedbooks_tab ) %]
1398                     $("#opac-user-views a[href='#opac-user-recordedbooks']").tab("show");
1399                 [% END %]
1400                 $("#opac-user-recordedbooks").each( function() {
1401                     KOHA.RecordedBooks.display_account_details(this);
1402                 } );
1403             });
1404         </script>
1405     [% END %]
1406 [% END %]