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 ) %]
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 -->
17 [% INCLUDE 'doc-head-open.inc' %]
18 <title>Your library home › [% 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 %]
23 [% INCLUDE 'bodytag.inc' bodyid='opac-user' bodyclass='scrollto' %]
24 [% INCLUDE 'masthead.inc' %]
26 [% IF Koha.Preference('AmazonAssocTag') %]
27 [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
29 [% AmazonAssocTag = '' %]
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>
38 <li class="breadcrumb-item">
39 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
41 <li class="breadcrumb-item active">
42 <a href="#" aria-current="page">Your summary</a>
45 </nav> <!-- /#breadcrumbs -->
47 <div class="container-fluid">
49 <div class="col col-lg-2 order-2 order-lg-1">
51 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
54 <div class="col-md-12 col-lg-10 order-1 order-lg-2">
55 <div id="userdetails" class="maincontent">
59 [% INCLUDE 'opac-note.inc' %]
61 <p>Hello, [% INCLUDE 'patron-title.inc' patron = logged_in_user %]
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>
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 %]
68 <div class="alert alert-info">
70 <p>One or more holds were not placed due to existing holds.</p>
74 [% IF ( borrower.blockedonfines ) %]
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>
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 %]
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>
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):
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>
119 [% IF ( patron_flagged ) %]
120 <div class="alert alert-warning">
122 [% IF ( userdebarred ) %]
123 [% IF ( discharge_available ) %]
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>
128 <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen.
129 [% IF ( borrower.debarredcomment ) %]
131 <span id="userdebarred_comment">
133 [% IF borrower.debarredcomment.search('OVERDUES_PROCESS') %]
134 Restriction added by overdues process [% borrower.debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
136 [% borrower.debarredcomment | html_line_break %]
141 [% IF ( borrower.userdebarreddate && debarred_date != '9999-12-31' ) %]
143 <span id="userdebarred_date">[% borrower.userdebarreddate | $KohaDates %]</span>
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>
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') ) %]Update your contact information[% ELSE %]Go to your contact information[% 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 %]
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>
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 %]
163 [% END # / IF patron_flagged %]
165 <div class="alert alert-info" id="notesaved" style="display:none;"></div>
166 [% IF ( OpacMySummaryNote ) %]
167 <div id="opac-my-summary-note">[% PROCESS koha_news_block news => OpacMySummaryNote %]</div>
170 [% IF Koha.Preference('AllowPatronToControlAutorenewal') %]
171 <form id="autorenewal_option" action="/cgi-bin/koha/opac-user.pl" method="post">
172 <legend class="sr-only">Auto-renewal</legend>
173 <label for="yes-autorenew_checkouts">
176 [% IF ( borrower.autorenew_checkouts ) %]
177 <label class="radio inline" for="yes-autorenew_checkouts">
179 <input type="radio" id="yes-autorenew_checkouts" name="borrower_autorenew_checkouts" value="1" checked="checked" />
182 <label class="radio inline" for="no-autorenew_checkouts">
184 <input type="radio" id="no-autorenew_checkouts" name="borrower_autorenew_checkouts" value="0" />
187 <label class="radio inline" for="yes-autorenew_checkouts">
189 <input type="radio" id="yes-autorenew_checkouts" name="borrower_autorenew_checkouts" value="1" />
191 <label class="radio inline" for="no-autorenew_checkouts">
193 <input type="radio" id="no-autorenew_checkouts" name="borrower_autorenew_checkouts" value="0" checked="checked" />
196 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
197 <input type="hidden" name="update_arc" value="1" />
198 <input type="submit" value="Update auto-renewal preference" />
202 <div id="opac-user-views" class="toptabs">
204 <li><a href="#opac-user-checkouts">Checked out ([% issues_count | html %])</a></li>
205 [% IF relatives %]<li><a href="#opac-user-relative-issues">Relatives' checkouts</a></li>[% END %]
206 [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue ([% overdues_count | html %])</a></li>[% END %]
207 [% IF ( OPACFinesTab ) %]
208 [% IF ( amountoutstanding > 0 ) %]<li><a href="#opac-user-fines">Charges ([% amountoutstanding | $Price %])</a></li>[% END %]
209 [% IF ( amountoutstanding < 0 ) %]<li><a href="#opac-user-fines">Credits ([% amountoutstanding * -1 | $Price %])</a></li>[% END %]
210 [% IF relatives_with_fines %]<li><a href="#opac-user-relative-fines">Relatives' charges</a></li>[% END %]
213 [% IF borrower_club_enrollments.count || borrower_enrollable_clubs.count %]
215 <a id="opac-user-clubs-tab-link" href="#opac-user-clubs">
216 Clubs ([% borrower_club_enrollments.count || 0 | html %]/[% borrower_enrollable_clubs.count || 0 | html %])
221 [% IF ( RESERVES.count ) %]<li><a href="#opac-user-holds">Holds ([% RESERVES.count | html %])</a></li>[% END %]
222 [% IF Koha.Preference('UseRecalls') && RECALLS.count %]<li><a href="#opac-user-recalls">Recalls ([% RECALLS.count | html %])</a></li>[% END %]
223 [% IF Koha.Preference('ArticleRequests') %]<li><a href="#opac-user-article-requests">Article requests ([% current_article_requests.size || 0 | html %])</a></li>[% END %]
224 [% IF ( OverDriveCirculation ) %]
225 <li><a href="#opac-user-overdrive">OverDrive account</a></li>
227 [% IF ( RecordedBooksCirculation ) %]
228 <li><a href="#opac-user-recordedbooks">RecordedBooks account</a></li>
232 <div id="opac-user-overdrive">
234 <div id="opac-user-recordedbooks">
236 <div id="opac-user-checkouts">
237 [% IF ( issues_count ) %]
238 <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
239 <legend class="sr-only">Renew selected</legend>
240 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]">
241 <input type="hidden" name="from" value="opac_user" />
242 <table id="checkoutst" class="table table-bordered table-striped">
243 <caption>[% issues_count | html %] Item(s) checked out</caption>
246 [% IF ( JacketImages ) %]<th class="nosort"> </th>[% END %]
247 <th class="anti-the">Title</th>
249 <th class="psort">Due</th>
250 [% UNLESS ( item_level_itypes ) %]
253 [% IF ( show_barcode ) %]
257 [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
260 [% IF ( OPACFinesTab ) %]
263 [% IF ( OPACMySummaryHTML ) %]
264 <th class="nosort">Links</th>
266 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
267 <th class="hidden">Checkout note</th>
268 <th id="checkout-notes" class="nosort noExport" title="Use this to report any problems with your currently checked out items">Report a problem</th>
273 [% FOREACH ISSUE IN ISSUES %]
274 [% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
275 [% IF ( JacketImages ) %]<td class="jacketcell">
276 [% IF ( OPACAmazonCoverImages ) %]
277 [% IF ( ISSUE.normalized_isbn ) %]
278 <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>
280 <a href="#"><span class="no-image">No cover image available</span></a>
284 [% IF ( GoogleJackets ) %]
285 [% IF ( ISSUE.normalized_isbn ) %]
286 <div style="display:block;" title="Click to view in Google Books" class="[% ISSUE.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
288 <a href="http://books.google.com/books?q=[% ISSUE.title |url %]"><span class="no-image">No cover image available</span></a>
292 [% IF ( BakerTaylorEnabled ) %]
293 [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %]
295 <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
297 <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
301 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
302 [% SET custom_cover_image_url = ISSUE.biblio_object.custom_cover_image_url %]
303 [% IF custom_cover_image_url %]
304 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
308 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
309 <img src="https://secure.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn | html %]/SC.GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% ISSUE.normalized_upc | html %]&oclc=[% ISSUE.normalized_oclc | html %]" alt="" class="item-thumbnail" />
312 </td>[% END # / IF JacketImages %]
315 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber | html %]">[% INCLUDE 'biblio-title.inc' biblio=ISSUE %]</a>
316 [% IF ( ISSUE.enumchron ) %] [% ISSUE.enumchron | html %][% END %]
318 [% IF ( ISSUE.onsite_checkout ) %] <em class="onsite_checkout">(On-site checkout)</em>[% END %]
320 [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
321 [% INCLUDE 'user-star-ratings.inc' item=ISSUE %]
324 [% IF ( ISSUE.recall ) %]<br><i>This item has been recalled. Please return by the new due date.</i>[% END %]
327 <td class="author">[% ISSUE.author | html %]</td>
328 [% IF ( ISSUE.overdue ) %]
329 <td class="date_due overdue" data-order="[% ISSUE.date_due | html %]">
330 <span class="tdlabel">Date due:</span>
331 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
334 <td class="date_due" data-order="[% ISSUE.date_due | html %]">
335 <span class="tdlabel">Date due:</span>
336 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
339 [% UNLESS ( item_level_itypes ) %]
341 <span class="tdlabel">Item type:</span>
342 [% IF ( ISSUE.imageurl && !Koha.Preference('OpacNoItemTypeImages') ) %]
343 <img src="[% ISSUE.imageurl | html %]" title="[% ISSUE.description | html %]" alt="[% ISSUE.description | html %]" />
344 [% END %] [% ISSUE.description | html %]
347 [% IF ( show_barcode ) %]
349 <span class="tdlabel">Barcode:</span>
350 [% ISSUE.barcode | html %]
354 <span class="tdlabel">Call number:</span>
355 [% ISSUE.itemcallnumber | html %]
357 [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
358 [% IF ( ISSUE.status && canrenew ) %]
359 <td class="renew" data-order="[% ISSUE.renewsleft | html %]">
361 <td class="renew" data-order="0">
363 [% IF ISSUE.renewed %]<span class="blabel label-success">Renewed!</span><br />[% END %]
364 [% IF ( ISSUE.status ) %]
365 [% IF ( canrenew ) %]
366 <input type="checkbox" name="item" value="[% ISSUE.itemnumber | uri %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&item=[% ISSUE.itemnumber | uri %]&borrowernumber=[% ISSUE.borrowernumber | uri %]">Renew</a>
368 [% IF ISSUE.renewalfee > 0 %]
369 <span class="renewalfee label label-warning">Fee for item type '[% ItemTypes.GetDescription( ISSUE.renewalitemtype) | html %]': [% ISSUE.renewalfee | $Price %]</span>
371 [% IF ISSUE.itemtype_object.rentalcharge_daily > 0 %]
372 <span class="renewalfee label label-warning">[% ISSUE.itemtype_object.rentalcharge_daily | $Price %] per day</span>
374 [% IF ISSUE.itemtype_object.rentalcharge_hourly > 0 %]
375 <span class="renewalfee label label-warning">[% ISSUE.itemtype_object.rentalcharge_hourly | $Price %] per hour</span>
377 <span class="renewals">(
378 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
379 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
380 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
383 [% ELSIF ( ISSUE.on_reserve ) %]
384 <span class="usr-msg no-renew-hold">Not renewable <span class="renewals">(on hold)</span></span>
385 [% ELSIF ( ISSUE.too_many ) %]
386 <span class="usr-msg no-renew-too-many">Not renewable</span>
387 [% ELSIF ( ISSUE.too_unseen ) %]
388 <span class="usr-msg no-renew-unseen">Item must be renewed at the library. [% ISSUE.renewsleft | html %] renewals remaining</span>
389 [% ELSIF ( ISSUE.norenew_overdue ) %]
390 <span class="usr-msg no-renew-overdue">Not allowed <span class="renewals">(overdue)</span></span>
391 [% ELSIF ( ISSUE.auto_too_late ) %]
392 <span class="usr-msg no-renew-too-late">No longer renewable</span>
393 [% ELSIF ISSUE.auto_too_much_oweing %]
394 <span class="usr-msg auto-renew-fines">Automatic renewal failed, you have unpaid fines.</span>
395 <span class="renewals">(
396 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
397 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
398 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
401 [% ELSIF ISSUE.auto_account_expired %]
402 <span class="usr-msg auto-renew-expired">Automatic renewal failed, your account is expired.</span>
403 <span class="renewals">(
404 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
405 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
406 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
409 [% ELSIF ( ISSUE.too_soon ) %]
410 <span class="usr-msg no-renewal-before">No renewal before [% ISSUE.soonestrenewdate | html %]</span>
411 <span class="renewals">(
412 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
413 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
414 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
417 [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
418 <span class="usr-msg automatic-renewal">Automatic renewal</span>
419 <span class="renewals">(
420 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
421 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
422 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
425 [% ELSIF ( ISSUE.item_denied_renewal ) %]
430 [% IF ( OPACFinesTab ) %]
432 <span class="tdlabel">Fines:</span>
433 [% IF ( ISSUE.charges ) %]
434 Yes (Item overdue or lost)
435 [% ELSIF ( ISSUE.rentalfines ) %]
442 [% IF ( OPACMySummaryHTML ) %]
443 <td class="links">[% ISSUE.MySummaryHTML | $raw %]</td>
445 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
447 [% ISSUE.note | html %]
450 <div id="viewnote_[% ISSUE.issue_id | html %]">
451 [% ISSUE.note | html %]
453 <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 %]">
454 [% IF ( ISSUE.note ) -%]
455 <span>Edit note</span>
457 <span>Add note</span>
460 <input type="hidden" id="note_[% ISSUE.issue_id | html %]" name="note" value="[% ISSUE.note | html %]" data-origvalue="[% ISSUE.note | html %]" />
464 [% END # /FOREACH ISSUES %]
467 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
468 <input type="submit" class="btn btn-primary" value="Renew selected" />
469 <button type="button" id="renewall_js" class="btn btn-primary">Renew all</button>
473 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
474 <form id="renewall" class="js-hide" action="/cgi-bin/koha/opac-renew.pl" method="post">
475 <legend class="sr-only">Renew</legend>
476 <input type="hidden" name="from" value="opac_user" />
477 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
478 [% FOREACH ISSUE IN ISSUES %]
479 [% IF ISSUE.status %]
480 <input type="hidden" name="item" value="[% ISSUE.itemnumber | html %]" />
483 <input type="submit" class="btn btn-primary" value="Renew all" />
487 <table class="table table-bordered table-striped">
488 <caption class="sr-only">Checked out</caption>
489 <tr><td>You have nothing checked out</td></tr>
491 [% END # IF issues_count %]
493 <!-- Add note modal -->
494 <div class="modal" id="addNoteModal" tabindex="-1" aria-labelledby="addNoteLabel" aria-hidden="true">
495 <div class="modal-dialog">
496 <form action="#" id="addNoteForm">
497 <div class="modal-content">
498 <div class="modal-header">
499 <h5 class="modal-title" id="addNoteLabel">Report a problem</h5>
500 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
501 <span aria-hidden="true">×</span>
504 <div class="modal-body" id="addNoteBody">
505 <h6 id="addNoteTitle"></h6>
506 <input type="hidden" id="addNoteIssueId" name="issue_id" value="" />
507 <textarea name="note" id="addNote" rows="4"></textarea>
508 <div class="hint">Your note will be shown to the librarian when the item is checked in.</div>
510 <div class="modal-footer">
511 <button type="submit" class="btn btn-primary">Submit note</button>
512 <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
519 </div> <!-- / .opac-user-checkouts -->
521 [% IF borrower_club_enrollments.count || borrower_enrollable_clubs.count %]
522 <div id="opac-user-clubs">
527 [% IF ( OPACFinesTab ) %]
529 [% IF ( amountoutstanding > 0 ) %]
530 <div id="opac-user-fines">
531 <table class="table table-bordered table-striped">
532 <caption>Charges</caption>
533 <thead><tr><th colspan="2">Amount</th></tr></thead>
536 <td>You currently owe fines and charges amounting to:</td>
537 <td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding | $Price %]</a></td>
544 [% IF ( amountoutstanding < 0 ) %]
545 <div id="opac-user-fines">
546 <table class="table table-bordered table-striped">
547 <caption>Credits</caption>
548 <thead><tr><th colspan="2">Amount</th></tr></thead>
551 <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding * -1 | $Price %]</a></td>
558 [% IF relatives_with_fines %]
559 <div id="opac-user-relative-fines">
560 <table class="table table-bordered table-striped">
561 <caption>Fines and charges</caption>
564 <th colspan="2">Amount</th>
568 [% FOREACH r IN relatives_with_fines %]
570 <td>[% r.firstname | html %] [% r.surname | html %] currently owes fines and charges amounting to:</td>
571 <td><a href="/cgi-bin/koha/opac-account.pl#g[% r.id | uri %]">[% r.account.balance | $Price %]</a></td>
578 [% END # / OPACFinesTab %]
581 <div id="opac-user-relative-issues">
582 <table id="opac-user-relative-issues-table" class="table table-bordered table-striped">
583 <caption class="sr-only">Relative issues</caption>
586 <th class="anti-the">Title</th>
590 <th class="psort">Relative</th>
595 [% FOREACH r IN relatives %]
596 [% FOREACH c IN r.checkouts %]
599 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% c.item.biblio.biblionumber | uri %]">
600 [% c.item.biblio.title | html %][% IF ( c.item.enumchron ) %] [% c.item.enumchron | html %][% END %]
605 [% c.date_due | $KohaDates %]
609 [% c.item.barcode | html %]
613 [% c.item.itemcallnumber | html %]
617 [% r.firstname | html %] [% r.surname | html %]
627 [% IF ( overdues_count ) %]
628 <div id="opac-user-overdues">
629 <table id="overduest" class="table table-bordered table-striped">
630 <caption>Overdues <span class="count">([% overdues_count | html %] total)</span></caption>
631 <!-- OVERDUES TABLE ROWS -->
634 [% IF ( JacketImages ) %]<th class="nosort"> </th>[% END %]
635 <th class="anti-the">Title</th>
636 [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
637 [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
639 <th class="psort">Due</th>
640 [% IF ( OpacRenewalAllowed ) %]
641 <th class="nosort">Renew</th>
643 [% IF ( OPACFinesTab ) %]
649 [% FOREACH OVERDUE IN OVERDUES %]
651 [% IF ( JacketImages ) %]
652 <td class="jacketcell">
653 [% IF ( OPACAmazonCoverImages ) %]
654 [% IF ( OVERDUE.normalized_isbn ) %]
655 <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>
657 <a href="#"><span class="no-image">No cover image available</span></a>
661 [% IF ( GoogleJackets ) %]
662 [% IF ( OVERDUE.normalized_isbn ) %]
663 <div style="display:block;" title="Click to view in Google Books" class="[% OVERDUE.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
665 <a href="http://books.google.com/books?q=[% OVERDUE.title |url %]"><span class="no-image">No cover image available</span></a>
669 [% IF ( BakerTaylorEnabled ) %]
670 [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %]
672 <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
674 <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
678 [% IF ( SyndeticsCoverImages ) %]
679 <img src="https://secure.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn | html %]/SC.GIF&client=[% SyndeticsClientCode | html %]&upc=[% OVERDUE.normalized_upc | html %]&oclc=[% OVERDUE.normalized_oclc | html %]&type=xw10" alt="" class="item-thumbnail" />
682 [% END # /IF jacketcell %]
685 <a class="title" href="/cgi-bin/koha/opac-detail.pl?bib=[% OVERDUE.biblionumber | html %]">[% INCLUDE 'biblio-title.inc' biblio=OVERDUE %]</a>
686 <span class="item-details">[% OVERDUE.author | html %]</span>
689 [% UNLESS ( item_level_itypes ) %]
691 [% IF ( OVERDUE.imageurl && !Koha.Preference('OpacNoItemTypeImages') ) %]
692 <img src="[% OVERDUE.imageurl | html %]" title="[% OVERDUE.description | html %]" alt="[% OVERDUE.description | html %]" />
693 [% END %] [% OVERDUE.description | html %]
696 [% IF ( show_barcode ) %]
698 <span class="tdlabel">Barcode:</span>
699 [% OVERDUE.barcode | html %]
703 <span class="tdlabel">Call number:</span>
704 [% OVERDUE.itemcallnumber | html %]
706 <td data-order="[% OVERDUE.date_due | html %]">
707 <span class="tdlabel">Date due:</span>
708 [% OVERDUE.date_due | $KohaDates as_due_date => 1 %]
710 [% IF ( OpacRenewalAllowed ) %]
712 [% IF ( OVERDUE.debarred ) %]
714 [% ELSIF ( OVERDUE.status ) %]
715 [% IF ( canrenew ) %]
716 <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&item=[% OVERDUE.itemnumber | uri %]&bornum=[% OVERDUE.borrowernumber | uri %]">Renew</a>
718 <span class="renewals">(
719 [% OVERDUE.renewsleft | html %] of [% OVERDUE.renewsallowed | html %] renewals remaining
720 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
721 / [% OVERDUE.unseenleft | html %] of [% OVERDUE.unseenallowed | html %] renewals left before the item must be seen by the library
724 [% ELSIF ( OVERDUE.norenew_overdue ) %]
725 Not allowed<span class="renewals">(overdue)</span>
726 [% ELSIF ( OVERDUE.onreserve ) %]
733 [% IF ( OPACFinesTab ) %]
735 <span class="tdlabel">Fines:</span>
736 [% IF ( OVERDUE.charges ) %]
747 </div> <!-- / #opac-user-overdues -->
748 [% END # /overdues_count %]
750 [% PROCESS 'holds-table.inc' HOLDS = RESERVES, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds %]
752 [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
753 <div id="opac-user-recalls">
754 <table id="recalls-table" class="table table-bordered table-striped">
755 <caption>Recalls <span class="count">([% RECALLS.count | html %])</span></caption>
758 <th class="anti-the">Title</th>
759 <th class="psort">Placed on</th>
761 <th>Pickup location</th>
763 <th class="nosort"> </th>
767 [% FOREACH RECALL IN RECALLS %]
770 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblionumber | html %]">[% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio %]</a> [% IF RECALL.item_level_recall %]<p class="hint">Item recalled: [% RECALL.item.barcode | html %]</p>[% END %]
772 <td class="recalldate" data-order="[% RECALL.recalldate | html %]">
773 <span title="[% RECALL.recalldate | html %]">
774 <span class="tdlabel">Recall date:</span>
775 [% RECALL.recalldate | $KohaDates %]
778 <td class="expirationdate" data-order="[% RECALL.expirationdate | html %]">
779 [% IF ( RECALL.expirationdate ) %]
780 <span title="[% RECALL.expirationdate | html %]">
781 <span class="tdlabel">Expiration:</span>
782 [% RECALL.expirationdate | $KohaDates %]
785 <span title="0000-00-00">
786 <span class="tdlabel">Expiration:</span>
792 <span class="tdlabel">Pick up location:</span>
793 [% RECALL.library.branchname | html %]
796 <span class="tdlabel">Status:</span>
797 [% IF ( RECALL.requested ) %]
799 [% ELSIF ( RECALL.overdue ) %]
800 Overdue to be returned
801 [% ELSIF ( RECALL.in_transit ) %]
802 In transit to [% RECALL.library.branchname | html %]
803 [% ELSIF ( RECALL.waiting ) %]
807 <td class="cancelrecall">
808 [% IF ( RECALL.requested or RECALL.overdue ) %]
809 <form action="/cgi-bin/koha/opac-recall.pl" method="post">
810 <input type="hidden" name="op" value="cancel">
811 <input type="hidden" name="recall_id" value="[% RECALL.recall_id | html %]">
812 <input type="hidden" name="biblionumber" value="[% RECALL.biblionumber | html %]">
813 <button type="submit" name="submit" class="btn btn-sm btn-danger cancel_recall"><i class="fa fa-remove" aria-hidden="true"></i> Cancel</button>
822 [% END # / # RECALLS.count %]
824 [% IF Koha.Preference('ArticleRequests') %]
825 <div id="opac-user-article-requests">
826 [% IF current_article_requests.size %]
827 <table id="article-requests-table" class="table table-bordered table-striped">
828 <caption>Article requests <span class="count"></span></caption>
831 <th class="anti-the article-request-record-title">Record title</th>
832 <th class="psort article-request-created-on">Placed on</th>
833 <th class="anti-the article-request-title">Title</th>
834 <th class="article-request-author">Author</th>
835 <th class="article-request-volume">Volume</th>
836 <th class="article-request-issue">Issue</th>
837 <th class="article-request-date">Date</th>
838 <th class="article-request-toc" title="Table of contents">TOC</th>
839 <th class="article-request-pages">Pages</th>
840 <th class="article-request-chapters">Chapters</th>
841 <th class="article-request-patron-notes">Notes</th>
842 <th class="article-request-format">Format</th>
843 <th class="article-request-status">Status</th>
844 <th class="article-request-branchcode">Pickup library</th>
845 <th class="nosort article-request-cancel"> </th>
850 [% FOREACH ar IN current_article_requests %]
851 <td class="article-request-record-title">
852 <a class="article-request-title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ar.biblionumber | html %]">
853 [% INCLUDE 'biblio-title.inc' biblio=ar.biblio %]
854 [% ar.item.enumchron | html %]
856 [% ar.biblio.author | html %]
857 [% IF ar.itemnumber %] <em>(only [% ar.item.barcode | html %])</em>[% END %]
860 <td class="article-request-created_on">
861 [% ar.created_on | $KohaDates %]
864 <td class="article-request-title">
865 [% ar.title | html %]
868 <td class="article-request-author">
869 [% ar.author | html %]
872 <td class="article-request-volume">
873 [% ar.volume | html %]
876 <td class="article-request-issue">
877 [% ar.issue | html %]
880 <td class="article-request-date">
884 <td class="article-request-toc">
885 [% IF ar.toc_request %]Yes[% END %]
888 <td class="article-request-pages">
889 [% ar.pages | html %]
892 <td class="article-request-chapters">
893 [% ar.chapters | html %]
896 <td class="article-request-patron-notes">
897 [% ar.patron_notes | html %]
900 <td class="article-request-format">[% IF ar.format == 'PHOTOCOPY' %]Copy[% ELSIF ar.format == 'SCAN' %]Scan[% END %]</td>
902 <td class="article-request-status">
903 [% IF ar.status == 'PENDING' %]
905 [% ELSIF ar.status == 'PROCESSING' %]
907 [% ELSIF ar.status == 'REQUESTED' %]
909 [% ELSIF ar.status == 'COMPLETED' %]
911 [% ELSIF ar.status == 'CANCELED' %]
916 <td class="article-request-branchcode">
917 [% ar.branch.branchname | html %]
920 <td class="article-request-cancel">
921 <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>
928 <table class="table table-bordered table-striped">
929 <caption class="sr-only">Article requests</caption>
930 <tr><td>You have no article requests currently.</td></tr>
932 [% END # IF current_article_requests.size %]
933 </div> <!-- / #opac-user-article-requests -->
936 </div> <!-- /#opac-user-views -->
937 </div> <!-- /#userdetails -->
938 </div> <!-- /.col-10 -->
939 </div> <!-- /.row -->
940 </div> <!-- /.container-fluid -->
941 </div> <!-- /#main -->
943 [% # hold suspend modal form %]
944 <div id="suspendHoldModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="suspendModalLabel" aria-hidden="true" data-focus="false">
945 <div class="modal-dialog">
946 <div class="modal-content">
947 <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
948 <div class="modal-header">
949 [% IF HOLD.suspend %]
950 <h5 class="modal-title" id="suspendModalLabel">Resume hold</h5>
952 <h5 class="modal-title" id="suspendModalLabel">Suspend hold</h5>
954 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
955 <span aria-hidden="true">x</span>
958 <div class="modal-body">
959 <h6 id="suspendHoldTitle"></h6>
960 <input type="hidden" name="reserve_id" id="suspendHoldReserveId" value="" />
961 <label for="suspend_untilDate">Suspend until:</label>
962 <input type="text" name="suspend_until" id="suspend_untilDate" size="10" />
963 [% INCLUDE 'date-format.inc' %]
964 <p><a href="#" class="clear-flatpickr" data-fp="suspend_untilDate">Clear date to suspend indefinitely</a></p>
966 <div class="modal-footer">
967 <button class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Suspend</button>
968 <button data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-remove" aria-hidden="true"></i> Do not suspend</button>
971 </div> <!-- /.modal-content -->
972 </div> <!-- /.modal-dialog -->
973 </div> <!-- /#suspendModal -->
975 [% IF ( OverDriveCirculation ) %]
976 [% INCLUDE 'overdrive-checkout.inc' %]
977 [% IF ( Koha.Preference('OverDrivePasswordRequired') ) %]
978 [% INCLUDE 'overdrive-login.inc' %]
981 [% IF ( RecordedBooksCirculation ) %]
982 [% INCLUDE 'recordedbooks-checkout.inc' %]
985 [% INCLUDE 'opac-bottom.inc' %]
986 [% BLOCK jsinclude %]
987 [% INCLUDE 'calendar.inc' %]
988 [% INCLUDE 'datatables.inc' %]
990 var AR_CAPTION_COUNT = _("(%s total)");
993 function tableInit( tableId ){
994 if( tableId == "checkoutst" ){
995 $(".dt-buttons").append("<button type=\"button\" class=\"dt-button buttons-ical\" id=\"buttons-ics\">iCal</button> ");
996 [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
997 $(".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>");
1001 $(document).ready(function(){
1002 $('#opac-user-article-requests caption .count').html(AR_CAPTION_COUNT.format('[% current_article_requests_count | html %]'));
1003 $('#opac-user-views').tabs();
1004 $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
1006 $(".btn-delete-hold").on("click", function(e){
1008 var hold_title = $(this).data("title");
1009 var reserve_id = $(this).data("reserve_id");
1010 confirmModal( hold_title, _("Are you sure you want to cancel this hold?"), _("Yes, cancel hold"), _("No, do not cancel hold"), function( result ){
1011 $("#bootstrap-confirm-box-modal").remove()
1013 $("#delete_hold_" + reserve_id ).submit();
1019 $(".btn-delete-article-request").on("click", function(e){
1021 var article_request = $(this).data("title");
1022 var article_request_id = $(this).data("article-request_id");
1024 var doCancel = function( result ){
1025 $("#bootstrap-confirm-box-modal").remove();
1029 url: '/api/v1/public/patrons/'+borrowernumber+'/article_requests/'+article_request_id+'?cancellation_reason=OPAC',
1030 success: function( data ) {
1031 row.parents('tr').hide({
1033 complete: function() {
1034 var ar_tab = $('a[href="#opac-user-article-requests"');
1035 var ar_table = $('#article-requests-table');
1036 var ar_length = $('tbody tr:visible', ar_table).length;
1037 var ar_count = $('caption .count', ar_table);
1039 ar_tab.html(ar_tab.html().replace(/\(\d+\)/, '('+ar_length+')'));
1040 ar_count.html(AR_CAPTION_COUNT.format(ar_length));
1047 confirmModal( article_request, _("Are you sure you want to cancel this article request?"), _("Yes, cancel article request"), _("No, do not cancel article request"), doCancel);
1051 /* We initiate this flatpickr instance here so that we can use the variable later */
1052 var suspend_until_date = $("#suspend_untilDate").flatpickr({
1056 $(".suspend_hold").on("click", function(e){
1058 var title = $(this).data("title");
1059 var reserve_id = $(this).data("reserve_id");
1060 $("#suspendHoldReserveId").val( reserve_id );
1061 $("#suspendHoldTitle").html( "<em>" + title + "</em>" );
1062 $("#suspendHoldModal").modal("show");
1065 $("#suspendHoldModal").on("hidden.bs.modal", function(){
1066 $("#suspendHoldTitle").html("");
1067 $("#suspendHoldReserveId").val("");
1068 suspend_until_date.clear();
1071 $("#suspend_all_submit").on("click", function(e){
1073 var title = _("Are you sure you want to suspend all holds?");
1074 var body = _("All holds will be suspended.");
1075 confirmModal( body, title, _("Yes, suspend all holds"), "", function( result ){
1076 $("#bootstrap-confirm-box-modal").remove()
1078 $("#suspend_all_holds").submit();
1084 $("#resume_all_submit").on("click", function(e){
1086 var title = _("Are you sure you want to resume all suspended holds?");
1087 var body = _("All holds will resume.");
1088 confirmModal( body, title, _("Yes, resume all holds"), _("No, do not resume holds"), function( result ){
1089 $("#bootstrap-confirm-box-modal").remove()
1091 $("#resume_all_holds").submit();
1097 var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table");
1098 dTables.each(function(){
1099 var thIndex = $(this).find("th.psort").index();
1100 $(this).on("init.dt", function() {
1101 tableInit( $(this).attr("id") );
1103 .dataTable($.extend(true, {}, dataTablesDefaults, {
1104 "sorting" : [[ thIndex, 'asc' ]],
1105 "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1107 { "targets": [ "nosort" ],"sortable": false,"searchable": false },
1108 { "type": "anti-the", "targets" : [ "anti-the" ] },
1109 { "visible": false, "targets" : [ "hidden" ] }
1112 "search": "_INPUT_",
1113 "searchPlaceholder": _("Search")
1117 /* Override default button set so that we can extend the options of print and csv */
1118 'clearFilter', 'copy',
1122 /* Print view should show all columns (even invisible ones) unless they are .noExport */
1123 columns: ":not(.noExport)"
1129 /* CSV export should include all columns (even invisible ones) unless they are .noExport */
1130 columns: ":not(.noExport)"
1137 $("body").on("click", "#buttons-ics", function(){
1138 location.href="/cgi-bin/koha/opac-ics.pl";
1141 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1142 [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1143 $("#renewselected").submit(function(){
1145 $("input[type=checkbox]").each(function(){
1146 if($(this).is(':checked')){
1151 alert(_("Nothing has been selected. Check the box for each item you want to renew"));
1155 $("body").on("click","#renewselected_link",function(e){
1157 $("#renewselected").submit();
1159 $("body").on("click","#renewall_link, #renewall_js",function(e){
1161 $("#renewall").submit();
1163 [% END # /IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1165 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
1167 /* If JS enabled, show button, otherwise show link to redirect to a page where note can be submitted */
1168 $(".nonjs_submitnote").hide();
1170 $("input[name='note']").prop('readonly', false);
1171 $("input[name='note']").keypress(function(e){
1172 /* prevent submitting of renewselected form */
1177 $("input[name='note']").keyup(function(e){
1178 var $btn_save = $('#save_'+$(this).data('issue_id'));
1179 var origvalue = $(this).data('origvalue');
1180 var value = $(this).val();
1182 if(origvalue != value) {
1184 $btn_save.text(_("Submit changes"));
1186 $btn_save.text(_("Submit note"));
1195 if ( $('#opac-user-clubs').length ) {
1196 $('#opac-user-clubs-tab-link').on('click', function() {
1197 $('#opac-user-clubs').text(_("Loading..."));
1198 $('#opac-user-clubs').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrowernumber | html %]');
1202 $(".cancel_recall").click(function(e){
1203 return confirmDelete(_("Are you sure you want to remove this recall?"));
1206 $("body").on("click", ".btn-add-note", function(e){
1208 var title = $(this).data("title");
1209 var issue_id = $(this).data("issueid");
1210 var note = $("#note_" + issue_id ).val();
1211 var origvalue = $("#note_" + issue_id ).data("origvalue");
1212 $("#addNote").val( note );
1213 $("#addNoteIssueId").val( issue_id );
1214 $("#addNoteTitle").text( title );
1215 $("#addNoteModal").modal("show");
1218 $("#addNoteForm").on("submit", function(e){
1220 var title = $("#addNoteTitle").text();
1221 var issue_id = $("#addNoteIssueId").val();
1222 var note = $("#addNote").val();
1223 submitNote( title, issue_id, note );
1226 $("#addNoteModal").on("hidden.bs.modal", function(){
1227 $("#addNoteTitle").text("");
1228 $("#addNote").val("");
1232 function submitNote( title, issue_id, note ){
1233 var self = $("#addNoteModal");
1234 var notebutton = $("#save_" + issue_id );
1235 var noteinput = $("#note_" + issue_id );
1238 'action': 'issuenote',
1239 'issue_id': issue_id,
1244 url: '/cgi-bin/koha/svc/checkout_notes/',
1249 .done(function(data) {
1251 if(data.status == 'saved') {
1252 $("#notesaved").removeClass("alert-error");
1253 $("#notesaved").addClass("alert-info");
1254 noteinput.data('origvalue', data.note)
1256 notebutton.text( _("Edit note" ) );
1257 $("#viewnote_" + issue_id ).text( data.note );
1258 message = "<p>" + _("Your note about %s has been saved and sent to the library.").format( em(title) ) + "</p>";
1259 message += "<p class=\"checkout_note\">" + data.note;
1260 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>";
1262 } else if(data.status == 'removed') {
1263 $("#notesaved").removeClass("alert-error");
1264 $("#notesaved").addClass("alert-info");
1265 noteinput.data('origvalue', "")
1267 notebutton.text( _("Add note") );
1268 $("#viewnote_" + issue_id ).text( data.note );
1269 message = "<p>" + _("Your note about %s was removed.").format( em(title) ) + "</p>";
1271 $("#notesaved").removeClass("alert-info");
1272 $("#notesaved").addClass("alert-error");
1273 message = "<p>" + _("Your note about %s could not be saved.").format( em(title) ) + "</p>";
1274 notebutton.text( _("Add note") );
1275 $("#viewnote_" + issue_id ).text( data.note );
1276 message += "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>";
1278 $("#notesaved").html(message);
1280 .fail(function(data) {
1281 $("#notesaved").removeClass("alert-info");
1282 $("#notesaved").addClass("alert-error");
1283 var message = "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>";
1284 $("#notesaved").html(message);
1286 .always(function() {
1288 $("#notesaved").show();
1292 function em( title ){
1293 return "<em>" + title + "</em>";
1296 var borrowernumber = "[% borrowernumber | html %]";
1297 var MSG_YOUR_RATING = _("Your rating: %s, ");
1298 var MSG_AVERAGE_RATING = _("Average rating: %s (%s votes)");
1300 [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
1301 [% Asset.js("lib/jquery/plugins/jquery.barrating.min.js") | $raw %]
1302 [% Asset.js("js/ratings.js") | $raw %]
1304 [% IF Koha.Preference('OverDriveCirculation') %]
1305 [% Asset.js("js/overdrive.js") | $raw %]
1307 var OD_password_required = [% IF Koha.Preference('OverDrivePasswordRequired') %]1[% ELSE %]0[% END %];
1308 $(document).ready(function() {
1309 [% IF ( overdrive_error ) %]
1310 KOHA.OverDriveCirculation.display_error("#opac-user-overdrive", "[% overdrive_error.dquote | html %]");
1313 [% IF ( overdrive_tab ) %]
1314 $("#opac-user-views").tabs("select", "#opac-user-overdrive");
1317 $("#opac-user-overdrive").each( function() {
1318 KOHA.OverDriveCirculation.display_account_details(this);
1323 [% IF RecordedBooksCirculation %]
1324 [% Asset.js("js/recordedbooks.js") | $raw %]
1326 $(document).ready(function() {
1327 [% IF ( recordedbooks_error ) %]
1328 KOHA.RecordedBooks.display_error("#opac-user-recordedbooks", "[% recordedbooks_error.dquote | html %]");
1330 [% IF ( recordedbooks_tab ) %]
1331 $("#opac-user-views").tabs("select", "#opac-user-recordedbooks");
1333 $("#opac-user-recordedbooks").each( function() {
1334 KOHA.RecordedBooks.display_account_details(this);