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 ) %]
13 [% SET borrower_club_enrollments = logged_in_user.get_club_enrollments %]
14 [% SET borrower_enrollable_clubs = logged_in_user.get_enrollable_clubs(1) %] <!-- 1 => OPAC -->
16 [% INCLUDE 'doc-head-open.inc' %]
17 <title>Your library home › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
18 [% INCLUDE 'doc-head-close.inc' %]
19 [% Asset.css("css/overdrive.css") | $raw %]
20 [% BLOCK cssinclude %][% END %]
22 [% INCLUDE 'bodytag.inc' bodyid='opac-user' bodyclass='scrollto' %]
23 [% INCLUDE 'masthead.inc' %]
25 [% IF Koha.Preference('AmazonAssocTag') %]
26 [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
28 [% AmazonAssocTag = '' %]
32 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
33 <ol class="breadcrumb">
34 <li class="breadcrumb-item">
35 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
37 <li class="breadcrumb-item">
38 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
40 <li class="breadcrumb-item active">
41 <a href="#" aria-current="page">Your summary</a>
44 </nav> <!-- /#breadcrumbs -->
46 <div class="container-fluid">
48 <div class="col col-lg-2 order-2 order-lg-1">
50 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
53 <div class="col-md-12 col-lg-10 order-1 order-lg-2">
54 <div id="userdetails" class="maincontent">
58 [% INCLUDE 'opac-note.inc' %]
60 <p>Hello, [% INCLUDE 'patron-title.inc' patron = logged_in_user %]
62 <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 [% 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 %]
67 <div class="alert alert-info">
69 <p>One or more holds were not placed due to existing holds.</p>
73 [% IF ( borrower.blockedonfines ) %]
74 <div class="alert alert-warning" id="blockedonfines">
75 <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>
79 [% IF ( borrower.warndeparture ) %]
80 <div class="alert alert-warning" id="warndeparture">
81 <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>
82 [% IF ( borrower.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your library card expires.</span>[% END %]
86 [% IF ( borrower.warnexpired ) %]
87 <div class="alert alert-warning" id="warnexpired">
88 <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>
92 [% IF ( RENEW_ERROR ) %]
93 <div class="alert alert-warning">
94 <strong>Please note:</strong>
95 Your loan renewal failed because of the following reason(s):
97 [% FOREACH error IN RENEW_ERROR.split('\|') %]
98 [% IF error == 'card_expired' %]
99 <li>Your account has expired. Please contact the library for more information.</li>
100 [% ELSIF error == 'too_many' %]
101 <li>You have renewed this item the maximum number of times allowed.</li>
102 [% ELSIF error == 'too_unseen' %]
103 <li>You have renewed this item the maximum number of consecutive times without it being seen by the library.</li>
104 [% ELSIF error == 'too_soon' %]
105 <li>It is too soon after the checkout date for this item to be renewed.</li>
106 [% ELSIF error == 'on_reserve' %]
107 <li>This item is on hold for another borrower.</li>
108 [% ELSIF error == 'item_denied_renewal' %]
109 <li>Item renewal is not allowed.</li>
110 [% ELSIF error == 'auto_too_soon' %]
111 <li>This item is scheduled for auto renewal.</li>
118 [% IF ( patron_flagged ) %]
119 <div class="alert alert-warning">
121 [% IF ( userdebarred ) %]
122 [% IF ( discharge_available ) %]
124 <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>
127 <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen.
128 [% IF ( borrower.debarredcomment ) %]
130 <span id="userdebarred_comment">
132 [% IF borrower.debarredcomment.search('OVERDUES_PROCESS') %]
133 Restriction added by overdues process [% borrower.debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
135 [% borrower.debarredcomment | html_line_break %]
140 [% IF ( borrower.userdebarreddate && debarred_date != '9999-12-31' ) %]
142 <span id="userdebarred_date">[% borrower.userdebarreddate | $KohaDates %]</span>
145 <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>
148 [% IF ( borrower.gonenoaddress ) %]
149 <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date contact information. Please contact the library.
150 <a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]Update your contact information[% ELSE %]Go to your contact information[% END %]</a>
151 [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %]
154 [% IF ( borrower.lost ) %]
155 <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 [% IF ( renewal_blocked_fines.defined ) && ( OpacRenewalAllowed ) %]
158 <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 %]
162 [% END # / IF patron_flagged %]
164 <div class="alert alert-info" id="notesaved" style="display:none;"></div>
166 [% IF Koha.Preference('OPACMySummaryNote') %]
167 <div id="opac-my-summary-note">[% Koha.Preference('OPACMySummaryNote') | $raw %]</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 title-string">Placed on</th>
760 <th class="title-string">Expires 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 %]">
771 [% RECALL.biblio.title | html %]
772 [% FOREACH s IN RECALL.biblio.subtitle %]
776 [% RECALL.biblio.author | html %]
778 <td class="recalldate">
779 <span title="[% RECALL.recalldate | html %]">
780 <span class="tdlabel">Recall date:</span>
781 [% RECALL.recalldate | $KohaDates %]
784 <td class="expirationdate">
785 [% IF ( RECALL.expirationdate ) %]
786 <span title="[% RECALL.expirationdate | html %]">
787 <span class="tdlabel">Expiration:</span>
788 [% RECALL.expirationdate | $KohaDates %]
791 <span title="0000-00-00">
792 <span class="tdlabel">Expiration:</span>
798 <span class="tdlabel">Pick up location:</span>
799 [% RECALL.library.branchname | html %]
802 <span class="tdlabel">Status:</span>
803 [% IF ( RECALL.requested ) %]
805 [% ELSIF ( RECALL.overdue ) %]
806 Overdue to be returned
807 [% ELSIF ( RECALL.in_transit ) %]
808 In transit to [% RECALL.library.branchname | html %]
809 [% ELSIF ( RECALL.waiting ) %]
813 <td class="cancelrecall">
814 [% IF ( RECALL.requested or RECALL.overdue ) %]
815 <form action="/cgi-bin/koha/opac-recall.pl" method="post">
816 <input type="hidden" name="op" value="cancel">
817 <input type="hidden" name="recall_id" value="[% RECALL.recall_id | html %]">
818 <input type="hidden" name="biblionumber" value="[% RECALL.biblionumber | html %]">
819 <button type="submit" name="submit" class="btn btn-sm btn-danger" id="cancel_recall"><i class="icon-remove icon-white"></i> Cancel</button>
828 [% END # / # RECALLS.count %]
830 [% IF Koha.Preference('ArticleRequests') %]
831 <div id="opac-user-article-requests">
832 [% IF current_article_requests.size %]
833 <table id="article-requests-table" class="table table-bordered table-striped">
834 <caption>Article requests <span class="count"></span></caption>
837 <th class="anti-the article-request-record-title">Record title</th>
838 <th class="psort article-request-created-on">Placed on</th>
839 <th class="anti-the article-request-title">Title</th>
840 <th class="article-request-author">Author</th>
841 <th class="article-request-volume">Volume</th>
842 <th class="article-request-issue">Issue</th>
843 <th class="article-request-date">Date</th>
844 <th class="article-request-toc" title="Table of contents">TOC</th>
845 <th class="article-request-pages">Pages</th>
846 <th class="article-request-chapters">Chapters</th>
847 <th class="article-request-patron-notes">Notes</th>
848 <th class="article-request-format">Format</th>
849 <th class="article-request-status">Status</th>
850 <th class="article-request-branchcode">Pickup library</th>
851 <th class="nosort article-request-cancel"> </th>
856 [% FOREACH ar IN current_article_requests %]
857 <td class="article-request-record-title">
858 <a class="article-request-title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ar.biblionumber | html %]">
859 [% INCLUDE 'biblio-title.inc' biblio=ar.biblio %]
860 [% ar.item.enumchron | html %]
862 [% ar.biblio.author | html %]
863 [% IF ar.itemnumber %] <em>(only [% ar.item.barcode | html %])</em>[% END %]
866 <td class="article-request-created_on">
867 [% ar.created_on | $KohaDates %]
870 <td class="article-request-title">
871 [% ar.title | html %]
874 <td class="article-request-author">
875 [% ar.author | html %]
878 <td class="article-request-volume">
879 [% ar.volume | html %]
882 <td class="article-request-issue">
883 [% ar.issue | html %]
886 <td class="article-request-date">
890 <td class="article-request-toc">
891 [% IF ar.toc_request %]Yes[% END %]
894 <td class="article-request-pages">
895 [% ar.pages | html %]
898 <td class="article-request-chapters">
899 [% ar.chapters | html %]
902 <td class="article-request-patron-notes">
903 [% ar.patron_notes | html %]
906 <td class="article-request-format">[% IF ar.format == 'PHOTOCOPY' %]Copy[% ELSIF ar.format == 'SCAN' %]Scan[% END %]</td>
908 <td class="article-request-status">
909 [% IF ar.status == 'PENDING' %]
911 [% ELSIF ar.status == 'PROCESSING' %]
913 [% ELSIF ar.status == 'REQUESTED' %]
915 [% ELSIF ar.status == 'COMPLETED' %]
917 [% ELSIF ar.status == 'CANCELED' %]
922 <td class="article-request-branchcode">
923 [% ar.branch.branchname | html %]
926 <td class="article-request-cancel">
927 <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>
934 <table class="table table-bordered table-striped">
935 <caption class="sr-only">Article requests</caption>
936 <tr><td>You have no article requests currently.</td></tr>
938 [% END # IF current_article_requests.size %]
939 </div> <!-- / #opac-user-article-requests -->
942 </div> <!-- /#opac-user-views -->
943 </div> <!-- /#userdetails -->
944 </div> <!-- /.col-10 -->
945 </div> <!-- /.row -->
946 </div> <!-- /.container-fluid -->
947 </div> <!-- /#main -->
949 [% # hold suspend modal form %]
950 <div id="suspendHoldModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="suspendModalLabel" aria-hidden="true" data-focus="false">
951 <div class="modal-dialog">
952 <div class="modal-content">
953 <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
954 <div class="modal-header">
955 [% IF HOLD.suspend %]
956 <h5 class="modal-title" id="suspendModalLabel">Resume hold</h5>
958 <h5 class="modal-title" id="suspendModalLabel">Suspend hold</h5>
960 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
961 <span aria-hidden="true">x</span>
964 <div class="modal-body">
965 <h6 id="suspendHoldTitle"></h6>
966 <input type="hidden" name="reserve_id" id="suspendHoldReserveId" value="" />
967 <label for="suspend_untilDate">Suspend until:</label>
968 <input type="text" name="suspend_until" id="suspend_untilDate" size="10" />
969 [% INCLUDE 'date-format.inc' %]
970 <p><a href="#" class="clear-flatpickr" data-fp="suspend_untilDate">Clear date to suspend indefinitely</a></p>
972 <div class="modal-footer">
973 <button class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Suspend</button>
974 <button data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-remove" aria-hidden="true"></i> Do not suspend</button>
977 </div> <!-- /.modal-content -->
978 </div> <!-- /.modal-dialog -->
979 </div> <!-- /#suspendModal -->
981 [% IF ( OverDriveCirculation ) %]
982 [% INCLUDE 'overdrive-checkout.inc' %]
983 [% IF ( Koha.Preference('OverDrivePasswordRequired') ) %]
984 [% INCLUDE 'overdrive-login.inc' %]
987 [% IF ( RecordedBooksCirculation ) %]
988 [% INCLUDE 'recordedbooks-checkout.inc' %]
991 [% INCLUDE 'opac-bottom.inc' %]
992 [% BLOCK jsinclude %]
993 [% INCLUDE 'calendar.inc' %]
994 [% INCLUDE 'datatables.inc' %]
996 var AR_CAPTION_COUNT = _("(%s total)");
999 function tableInit( tableId ){
1000 if( tableId == "checkoutst" ){
1001 $(".dt-buttons").append("<button type=\"button\" class=\"dt-button buttons-ical\" id=\"buttons-ics\">iCal</button> ");
1002 [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1003 $(".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>");
1007 $(document).ready(function(){
1008 $('#opac-user-article-requests caption .count').html(AR_CAPTION_COUNT.format('[% current_article_requests_count | html %]'));
1009 $('#opac-user-views').tabs();
1010 $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
1012 $(".btn-delete-hold").on("click", function(e){
1014 var hold_title = $(this).data("title");
1015 var reserve_id = $(this).data("reserve_id");
1016 confirmModal( hold_title, _("Are you sure you want to cancel this hold?"), _("Yes, cancel hold"), _("No, do not cancel hold"), function( result ){
1017 $("#bootstrap-confirm-box-modal").remove()
1019 $("#delete_hold_" + reserve_id ).submit();
1025 $(".btn-delete-article-request").on("click", function(e){
1027 var article_request = $(this).data("title");
1028 var article_request_id = $(this).data("article-request_id");
1030 var doCancel = function( result ){
1031 $("#bootstrap-confirm-box-modal").remove();
1035 url: '/api/v1/public/patrons/'+borrowernumber+'/article_requests/'+article_request_id+'?cancellation_reason=OPAC',
1036 success: function( data ) {
1037 row.parents('tr').hide({
1039 complete: function() {
1040 var ar_tab = $('a[href="#opac-user-article-requests"');
1041 var ar_table = $('#article-requests-table');
1042 var ar_length = $('tbody tr:visible', ar_table).length;
1043 var ar_count = $('caption .count', ar_table);
1045 ar_tab.html(ar_tab.html().replace(/\(\d+\)/, '('+ar_length+')'));
1046 ar_count.html(AR_CAPTION_COUNT.format(ar_length));
1053 confirmModal( article_request, _("Are you sure you want to cancel this article request?"), _("Yes, cancel article request"), _("No, do not cancel article request"), doCancel);
1057 /* We initiate this flatpickr instance here so that we can use the variable later */
1058 var suspend_until_date = $("#suspend_untilDate").flatpickr({
1062 $(".suspend_hold").on("click", function(e){
1064 var title = $(this).data("title");
1065 var reserve_id = $(this).data("reserve_id");
1066 $("#suspendHoldReserveId").val( reserve_id );
1067 $("#suspendHoldTitle").html( "<em>" + title + "</em>" );
1068 $("#suspendHoldModal").modal("show");
1071 $("#suspendHoldModal").on("hidden.bs.modal", function(){
1072 $("#suspendHoldTitle").html("");
1073 $("#suspendHoldReserveId").val("");
1074 suspend_until_date.clear();
1077 $("#suspend_all_submit").on("click", function(e){
1079 var title = _("Are you sure you want to suspend all holds?");
1080 var body = _("All holds will be suspended.");
1081 confirmModal( body, title, _("Yes, suspend all holds"), "", function( result ){
1082 $("#bootstrap-confirm-box-modal").remove()
1084 $("#suspend_all_holds").submit();
1090 $("#resume_all_submit").on("click", function(e){
1092 var title = _("Are you sure you want to resume all suspended holds?");
1093 var body = _("All holds will resume.");
1094 confirmModal( body, title, _("Yes, resume all holds"), _("No, do not resume holds"), function( result ){
1095 $("#bootstrap-confirm-box-modal").remove()
1097 $("#resume_all_holds").submit();
1103 var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table");
1104 dTables.each(function(){
1105 var thIndex = $(this).find("th.psort").index();
1106 $(this).on("init.dt", function() {
1107 tableInit( $(this).attr("id") );
1109 .dataTable($.extend(true, {}, dataTablesDefaults, {
1110 "sorting" : [[ thIndex, 'asc' ]],
1111 "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1113 { "targets": [ "nosort" ],"sortable": false,"searchable": false },
1114 { "type": "anti-the", "targets" : [ "anti-the" ] },
1115 { "visible": false, "targets" : [ "hidden" ] }
1118 "search": "_INPUT_",
1119 "searchPlaceholder": _("Search")
1123 /* Override default button set so that we can extend the options of print and csv */
1124 'clearFilter', 'copy',
1128 /* Print view should show all columns (even invisible ones) unless they are .noExport */
1129 columns: ":not(.noExport)"
1135 /* CSV export should include all columns (even invisible ones) unless they are .noExport */
1136 columns: ":not(.noExport)"
1143 $("body").on("click", "#buttons-ics", function(){
1144 location.href="/cgi-bin/koha/opac-ics.pl";
1147 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1148 [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1149 $("#renewselected").submit(function(){
1151 $("input[type=checkbox]").each(function(){
1152 if($(this).is(':checked')){
1157 alert(_("Nothing has been selected. Check the box for each item you want to renew"));
1161 $("body").on("click","#renewselected_link",function(e){
1163 $("#renewselected").submit();
1165 $("body").on("click","#renewall_link, #renewall_js",function(e){
1167 $("#renewall").submit();
1169 [% END # /IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1171 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
1173 /* If JS enabled, show button, otherwise show link to redirect to a page where note can be submitted */
1174 $(".nonjs_submitnote").hide();
1176 $("input[name='note']").prop('readonly', false);
1177 $("input[name='note']").keypress(function(e){
1178 /* prevent submitting of renewselected form */
1183 $("input[name='note']").keyup(function(e){
1184 var $btn_save = $('#save_'+$(this).data('issue_id'));
1185 var origvalue = $(this).data('origvalue');
1186 var value = $(this).val();
1188 if(origvalue != value) {
1190 $btn_save.text(_("Submit changes"));
1192 $btn_save.text(_("Submit note"));
1201 if ( $('#opac-user-clubs').length ) {
1202 $('#opac-user-clubs-tab-link').on('click', function() {
1203 $('#opac-user-clubs').text(_("Loading..."));
1204 $('#opac-user-clubs').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrowernumber | html %]');
1208 $("#cancel_recall").click(function(e){
1209 return confirmDelete(_("Are you sure you want to remove this recall?"));
1212 $("body").on("click", ".btn-add-note", function(e){
1214 var title = $(this).data("title");
1215 var issue_id = $(this).data("issueid");
1216 var note = $("#note_" + issue_id ).val();
1217 var origvalue = $("#note_" + issue_id ).data("origvalue");
1218 $("#addNote").val( note );
1219 $("#addNoteIssueId").val( issue_id );
1220 $("#addNoteTitle").text( title );
1221 $("#addNoteModal").modal("show");
1224 $("#addNoteForm").on("submit", function(e){
1226 var title = $("#addNoteTitle").text();
1227 var issue_id = $("#addNoteIssueId").val();
1228 var note = $("#addNote").val();
1229 submitNote( title, issue_id, note );
1232 $("#addNoteModal").on("hidden.bs.modal", function(){
1233 $("#addNoteTitle").text("");
1234 $("#addNote").val("");
1238 function submitNote( title, issue_id, note ){
1239 var self = $("#addNoteModal");
1240 var notebutton = $("#save_" + issue_id );
1241 var noteinput = $("#note_" + issue_id );
1244 'action': 'issuenote',
1245 'issue_id': issue_id,
1250 url: '/cgi-bin/koha/svc/checkout_notes/',
1255 .done(function(data) {
1257 if(data.status == 'saved') {
1258 $("#notesaved").removeClass("alert-error");
1259 $("#notesaved").addClass("alert-info");
1260 noteinput.data('origvalue', data.note)
1262 notebutton.text( _("Edit note" ) );
1263 $("#viewnote_" + issue_id ).text( data.note );
1264 message = "<p>" + _("Your note about %s has been saved and sent to the library.").format( em(title) ) + "</p>";
1265 message += "<p class=\"checkout_note\">" + data.note;
1266 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>";
1268 } else if(data.status == 'removed') {
1269 $("#notesaved").removeClass("alert-error");
1270 $("#notesaved").addClass("alert-info");
1271 noteinput.data('origvalue', "")
1273 notebutton.text( _("Add note") );
1274 $("#viewnote_" + issue_id ).text( data.note );
1275 message = "<p>" + _("Your note about %s was removed.").format( em(title) ) + "</p>";
1277 $("#notesaved").removeClass("alert-info");
1278 $("#notesaved").addClass("alert-error");
1279 message = "<p>" + _("Your note about %s could not be saved.").format( em(title) ) + "</p>";
1280 notebutton.text( _("Add note") );
1281 $("#viewnote_" + issue_id ).text( data.note );
1282 message += "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>";
1284 $("#notesaved").html(message);
1286 .fail(function(data) {
1287 $("#notesaved").removeClass("alert-info");
1288 $("#notesaved").addClass("alert-error");
1289 var message = "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>";
1290 $("#notesaved").html(message);
1292 .always(function() {
1294 $("#notesaved").show();
1298 function em( title ){
1299 return "<em>" + title + "</em>";
1302 var borrowernumber = "[% borrowernumber | html %]";
1303 var MSG_YOUR_RATING = _("Your rating: %s, ");
1304 var MSG_AVERAGE_RATING = _("Average rating: %s (%s votes)");
1306 [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
1307 [% Asset.js("lib/jquery/plugins/jquery.barrating.min.js") | $raw %]
1308 [% Asset.js("js/ratings.js") | $raw %]
1310 [% IF Koha.Preference('OverDriveCirculation') %]
1311 [% Asset.js("js/overdrive.js") | $raw %]
1313 var OD_password_required = [% IF Koha.Preference('OverDrivePasswordRequired') %]1[% ELSE %]0[% END %];
1314 $(document).ready(function() {
1315 [% IF ( overdrive_error ) %]
1316 KOHA.OverDriveCirculation.display_error("#opac-user-overdrive", "[% overdrive_error.dquote | html %]");
1319 [% IF ( overdrive_tab ) %]
1320 $("#opac-user-views").tabs("select", "#opac-user-overdrive");
1323 $("#opac-user-overdrive").each( function() {
1324 KOHA.OverDriveCirculation.display_account_details(this);
1329 [% IF RecordedBooksCirculation %]
1330 [% Asset.js("js/recordedbooks.js") | $raw %]
1332 $(document).ready(function() {
1333 [% IF ( recordedbooks_error ) %]
1334 KOHA.RecordedBooks.display_error("#opac-user-recordedbooks", "[% recordedbooks_error.dquote | html %]");
1336 [% IF ( recordedbooks_tab ) %]
1337 $("#opac-user-views").tabs("select", "#opac-user-recordedbooks");
1339 $("#opac-user-recordedbooks").each( function() {
1340 KOHA.RecordedBooks.display_account_details(this);