8 [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
9 [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
11 [% SET borrower_club_enrollments = logged_in_user.get_club_enrollments(1) %]
12 [% SET borrower_enrollable_clubs = logged_in_user.get_enrollable_clubs(1,1) %]
14 [% INCLUDE 'doc-head-open.inc' %]
15 <title>Your library home › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
16 [% INCLUDE 'doc-head-close.inc' %]
17 [% BLOCK cssinclude %]
25 border: 1px dashed #999;
32 [% INCLUDE 'bodytag.inc' bodyid='opac-user' bodyclass='scrollto' %]
33 [% INCLUDE 'masthead.inc' %]
35 [% IF Koha.Preference('AmazonAssocTag') %]
36 [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
38 [% AmazonAssocTag = '' %]
42 <nav aria-label="breadcrumb">
43 <ul class="breadcrumb">
44 <li class="breadcrumb-item">
45 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
47 <li class="breadcrumb-item">
48 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
50 <li class="breadcrumb-item active" aria-current="page">
51 <a href="#">Your summary</a>
56 <div class="container-fluid">
58 <div class="col col-lg-2 order-2 order-lg-1">
60 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
63 <div class="col-md-12 col-lg-10 order-1 order-lg-2">
64 <div id="userdetails" class="maincontent">
68 [% INCLUDE 'opac-note.inc' %]
70 <p>Hello, [% INCLUDE 'patron-title.inc' patron = logged_in_user %]
72 <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>
74 [% 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 %]
77 <div class="alert alert-info">
79 <p>One or more holds were not placed due to existing holds.</p>
83 [% IF ( borrower.blockedonfines ) %]
84 <div class="alert alert-warning" id="blockedonfines">
85 <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>
89 [% IF ( borrower.warndeparture ) %]
90 <div class="alert alert-warning" id="warndeparture">
91 <strong>Please note:</strong><span> Your card will expire on <span id="warndeparture_date">[% borrower.warndeparture | $KohaDates %]</span>. Please contact the library for more information.</span>
92 [% IF ( borrower.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your card expires.</span>[% END %]
96 [% IF ( borrower.warnexpired ) %]
97 <div class="alert alert-warning" id="warnexpired">
98 <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>
102 [% IF ( RENEW_ERROR ) %]
103 <div class="alert alert-warning">
104 <strong>Please note:</strong>
105 Your loan renewal failed because of the following reason(s):
107 [% FOREACH error IN RENEW_ERROR.split('\|') %]
108 [% IF error == 'card_expired' %]
109 <li>Your account has expired. Please contact the library for more information.</li>
110 [% ELSIF error == 'too_many' %]
111 <li>You have renewed this item the maximum number of times allowed.</li>
112 [% ELSIF error == 'too_unseen' %]
113 <li>You have renewed this item the maximum number of consecutive times without it being seen by the library.</li>
114 [% ELSIF error == 'too_soon' %]
115 <li>It is too soon after the checkout date for this item to be renewed.</li>
116 [% ELSIF error == 'on_reserve' %]
117 <li>This item is on hold for another borrower.</li>
118 [% ELSIF error == 'item_denied_renewal' %]
119 <li>Item renewal is not allowed.</li>
120 [% ELSIF error == 'auto_too_soon' %]
121 <li>This item is scheduled for auto renewal.</li>
128 [% IF ( patron_flagged ) %]
129 <div class="alert alert-warning">
131 [% IF ( userdebarred ) %]
132 [% IF ( discharge_available ) %]
134 <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>
137 <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen.
138 [% IF ( borrower.debarredcomment ) %]
140 <span id="userdebarred_comment">
142 [% IF borrower.debarredcomment.search('OVERDUES_PROCESS') %]
143 Restriction added by overdues process [% borrower.debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
145 [% borrower.debarredcomment | html_line_break %]
150 [% IF ( borrower.userdebarreddate && debarred_date != '9999-12-31' ) %]
152 <span id="userdebarred_date">[% borrower.userdebarreddate | $KohaDates %]</span>
155 <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>
158 [% IF ( borrower.gonenoaddress ) %]
159 <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date contact information. Please contact the library.
160 <a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]Update your contact information[% ELSE %]Go to your contact information[% END %]</a>
161 [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %]
164 [% IF ( borrower.lost ) %]
165 <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>
167 [% IF ( renewal_blocked_fines.defined ) && ( OpacRenewalAllowed ) %]
168 <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 %]
172 [% END # / IF patron_flagged %]
174 <div class="alert alert-info" id="notesaved" style="display:none;"></div>
176 [% IF Koha.Preference('OPACMySummaryNote') %]
177 <div id="opac-my-summary-note">[% Koha.Preference('OPACMySummaryNote') | $raw %]</div>
180 [% IF Koha.Preference('AllowPatronToControlAutorenewal') %]
181 <form id="autorenewal_option" action="/cgi-bin/koha/opac-user.pl" method="post">
182 <legend class="sr-only">Auto-renewal</legend>
183 <label for="yes-autorenew_checkouts">
186 [% IF ( borrower.autorenew_checkouts ) %]
187 <label class="radio inline" for="yes-autorenew_checkouts">
189 <input type="radio" id="yes-autorenew_checkouts" name="borrower_autorenew_checkouts" value="1" checked="checked" />
192 <label class="radio inline" for="no-autorenew_checkouts">
194 <input type="radio" id="no-autorenew_checkouts" name="borrower_autorenew_checkouts" value="0" />
197 <label class="radio inline" for="yes-autorenew_checkouts">
199 <input type="radio" id="yes-autorenew_checkouts" name="borrower_autorenew_checkouts" value="1" />
201 <label class="radio inline" for="no-autorenew_checkouts">
203 <input type="radio" id="no-autorenew_checkouts" name="borrower_autorenew_checkouts" value="0" checked="checked" />
206 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
207 <input type="hidden" name="update_arc" value="1" />
208 <input type="submit" value="Update auto-renewal preference" />
212 <div id="opac-user-views" class="toptabs">
214 <li><a href="#opac-user-checkouts">Checked out ([% issues_count | html %])</a></li>
215 [% IF relatives %]<li><a href="#opac-user-relative-issues">Relatives' checkouts</a></li>[% END %]
216 [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue ([% overdues_count | html %])</a></li>[% END %]
217 [% IF ( OPACFinesTab ) %]
218 [% IF ( amountoutstanding > 0 ) %]<li><a href="#opac-user-fines">Charges ([% amountoutstanding | $Price %])</a></li>[% END %]
219 [% IF ( amountoutstanding < 0 ) %]<li><a href="#opac-user-fines">Credits ([% amountoutstanding * -1 | $Price %])</a></li>[% END %]
220 [% IF relatives_with_fines %]<li><a href="#opac-user-relative-fines">Relatives' charges</a></li>[% END %]
223 [% IF borrower_club_enrollments.count || borrower_enrollable_clubs.count %]
225 <a id="opac-user-clubs-tab-link" href="#opac-user-clubs">
226 Clubs ([% borrower_club_enrollments.count || 0 | html %]/[% borrower_enrollable_clubs.count || 0 | html %])
231 [% IF ( RESERVES.count ) %]<li><a href="#opac-user-holds">Holds ([% RESERVES.count | html %])</a></li>[% END %]
232 [% IF Koha.Preference('ArticleRequests') && logged_in_user.article_requests_current %]<li><a href="#opac-user-article-requests">Article requests ([% logged_in_user.article_requests_current.count | html %])</a></li>[% END %]
233 [% IF ( OverDriveCirculation ) %]
234 <li><a href="#opac-user-overdrive">OverDrive account</a></li>
236 [% IF ( RecordedBooksCirculation ) %]
237 <li><a href="#opac-user-recordedbooks">RecordedBooks account</a></li>
241 <div id="opac-user-overdrive">
243 <div id="opac-user-recordedbooks">
245 <div id="opac-user-checkouts">
246 [% IF ( issues_count ) %]
247 <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
248 <legend class="sr-only">Renew selected</legend>
249 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]">
250 <input type="hidden" name="from" value="opac_user" />
251 <table id="checkoutst" class="table table-bordered table-striped">
252 <caption>[% issues_count | html %] Item(s) checked out</caption>
255 [% IF ( JacketImages || AdlibrisEnabled ) %]<th class="nosort"> </th>[% END %]
256 <th class="anti-the">Title</th>
258 <th class="psort">Due</th>
259 [% UNLESS ( item_level_itypes ) %]
262 [% IF ( show_barcode ) %]
266 [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
269 [% IF ( OPACFinesTab ) %]
272 [% IF ( OPACMySummaryHTML ) %]
273 <th class="nosort">Links</th>
275 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
276 <th id="checkout-notes" class="nosort" title="Use this to report any problems with your currently checked out items">Report a problem</th>
281 [% FOREACH ISSUE IN ISSUES %]
282 [% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
283 [% IF ( JacketImages || AdlibrisEnabled ) %]<td class="jacketcell">
284 [% IF ( AdlibrisEnabled && ISSUE.normalized_isbn ) %]
285 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber | uri %]"><img src="[% AdlibrisURL | url %]?isbn=[% ISSUE.normalized_isbn | uri %]" class="adlibris-cover" alt="Adlibris cover image" /></a>
287 [% IF ( OPACAmazonCoverImages ) %]
288 [% IF ( ISSUE.normalized_isbn ) %]
289 <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>
291 <a href="#"><span class="no-image">No cover image available</span></a>
295 [% IF ( GoogleJackets ) %]
296 [% IF ( ISSUE.normalized_isbn ) %]
297 <div style="display:block;" title="Click to view in Google Books" class="[% ISSUE.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
299 <a href="http://books.google.com/books?q=[% ISSUE.title |url %]"><span class="no-image">No cover image available</span></a>
303 [% IF ( BakerTaylorEnabled ) %]
304 [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %]
306 <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
308 <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
312 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
313 [% SET custom_cover_image_url = ISSUE.biblio_object.custom_cover_image_url %]
314 [% IF custom_cover_image_url %]
315 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
319 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
320 <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" />
323 </td>[% END # / IF JacketImages %]
326 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber | html %]">[% INCLUDE 'biblio-title.inc' biblio=ISSUE %]</a>
327 [% IF ( ISSUE.enumchron ) %] [% ISSUE.enumchron | html %][% END %]
329 [% IF ( ISSUE.onsite_checkout ) %] <em class="onsite_checkout">(On-site checkout)</em>[% END %]
331 [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
332 [% INCLUDE 'user-star-ratings.inc' item=ISSUE %]
336 <td class="author">[% ISSUE.author | html %]</td>
337 [% IF ( ISSUE.overdue ) %]
338 <td class="date_due overdue" data-order="[% ISSUE.date_due | html %]">
339 <span class="tdlabel">Date due:</span>
340 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
343 <td class="date_due" data-order="[% ISSUE.date_due | html %]">
344 <span class="tdlabel">Date due:</span>
345 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
348 [% UNLESS ( item_level_itypes ) %]
350 <span class="tdlabel">Item type:</span>
351 [% IF ( ISSUE.imageurl && !Koha.Preference('OpacNoItemTypeImages') ) %]
352 <img src="[% ISSUE.imageurl | html %]" title="[% ISSUE.description | html %]" alt="[% ISSUE.description | html %]" />
353 [% END %] [% ISSUE.description | html %]
356 [% IF ( show_barcode ) %]
358 <span class="tdlabel">Barcode:</span>
359 [% ISSUE.barcode | html %]
363 <span class="tdlabel">Call number:</span>
364 [% ISSUE.itemcallnumber | html %]
366 [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
367 [% IF ( ISSUE.status && canrenew ) %]
368 <td class="renew" data-order="[% ISSUE.renewsleft | html %]">
370 <td class="renew" data-order="0">
372 [% IF ISSUE.renewed %]<span class="blabel label-success">Renewed!</span><br />[% END %]
373 [% IF ( ISSUE.status ) %]
374 [% IF ( canrenew ) %]
375 <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>
377 [% IF ISSUE.renewalfee > 0 %]
378 <span class="renewalfee label label-warning">Fee for item type '[% ItemTypes.GetDescription( ISSUE.renewalitemtype) | html %]': [% ISSUE.renewalfee | $Price %]</span>
380 [% IF ISSUE.itemtype_object.rentalcharge_daily > 0 %]
381 <span class="renewalfee label label-warning">[% ISSUE.itemtype_object.rentalcharge_daily | $Price %] per day</span>
383 [% IF ISSUE.itemtype_object.rentalcharge_hourly > 0 %]
384 <span class="renewalfee label label-warning">[% ISSUE.itemtype_object.rentalcharge_hourly | $Price %] per hour</span>
386 <span class="renewals">(
387 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
388 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
389 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
392 [% ELSIF ( ISSUE.on_reserve ) %]
393 Not renewable <span class="renewals">(on hold)</span>
394 [% ELSIF ( ISSUE.too_many ) %]
396 [% ELSIF ( ISSUE.too_unseen ) %]
397 Item must be renewed at the library. [% ISSUE.renewsleft | html %] renewals remaining
398 [% ELSIF ( ISSUE.norenew_overdue ) %]
399 Not allowed <span class="renewals">(overdue)</span>
400 [% ELSIF ( ISSUE.auto_too_late ) %]
402 [% ELSIF ISSUE.auto_too_much_oweing %]
403 Automatic renewal failed, you have unpaid fines.
404 <span class="renewals">(
405 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
406 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
407 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
410 [% ELSIF ISSUE.auto_account_expired %]
411 Automatic renewal failed, your account is expired.
412 <span class="renewals">(
413 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
414 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
415 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
418 [% ELSIF ( ISSUE.too_soon ) %]
419 No renewal before [% ISSUE.soonestrenewdate | html %]
420 <span class="renewals">(
421 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
422 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
423 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
426 [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
428 <span class="renewals">(
429 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
430 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
431 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
434 [% ELSIF ( ISSUE.item_denied_renewal ) %]
439 [% IF ( OPACFinesTab ) %]
441 <span class="tdlabel">Fines:</span>
442 [% IF ( ISSUE.charges ) %]
443 Yes (Item overdue or lost)
444 [% ELSIF ( ISSUE.rentalfines ) %]
451 [% IF ( OPACMySummaryHTML ) %]
452 <td class="links">[% ISSUE.MySummaryHTML | $raw %]</td>
454 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
456 [% IF ( ISSUE.note ) -%]
457 [% SET note_action = "Edit note" %]
459 [% SET note_action = "Add note" %]
461 <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" 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 %]" data-note="[% ISSUE.note | html %]" data-origvalue="[% ISSUE.note | html %]">
462 [% note_action | html %]
464 <input type="hidden" name="note" value="[% ISSUE.note | html %]" data-origvalue="[% ISSUE.note | html %]" />
468 [% END # /FOREACH ISSUES %]
471 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
472 <input type="submit" class="btn btn-primary" value="Renew selected" />
473 <button type="button" id="renewall_js" class="btn btn-primary">Renew all</button>
477 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
478 <form id="renewall" class="js-hide" action="/cgi-bin/koha/opac-renew.pl" method="post">
479 <legend class="sr-only">Renew</legend>
480 <input type="hidden" name="from" value="opac_user" />
481 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
482 [% FOREACH ISSUE IN ISSUES %]
483 [% IF ISSUE.status %]
484 <input type="hidden" name="item" value="[% ISSUE.itemnumber | html %]" />
487 <input type="submit" class="btn btn-primary" value="Renew all" />
491 <table class="table table-bordered table-striped">
492 <caption class="sr-only">Checked out</caption>
493 <tr><td>You have nothing checked out</td></tr>
495 [% END # IF issues_count %]
497 <!-- Add note modal -->
498 <div class="modal" id="addNoteModal" tabindex="-1" aria-labelledby="addNoteLabel" aria-hidden="true">
499 <div class="modal-dialog">
500 <form action="#" id="addNoteForm">
501 <div class="modal-content">
502 <div class="modal-header">
503 <h5 class="modal-title" id="addNoteLabel">Report a problem</h5>
504 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
505 <span aria-hidden="true">×</span>
508 <div class="modal-body" id="addNoteBody">
509 <h6 id="addNoteTitle"></h6>
510 <input type="hidden" id="addNoteIssueId" name="issue_id" value="" />
511 <textarea name="note" id="addNote" rows="4"></textarea>
512 <div class="hint">Your note will be shown to the librarian when the item is checked in.</div>
514 <div class="modal-footer">
515 <button type="submit" class="btn btn-primary">Submit note</button>
516 <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
523 </div> <!-- / .opac-user-checkouts -->
525 [% IF borrower_club_enrollments.count || borrower_enrollable_clubs.count %]
526 <div id="opac-user-clubs">
531 [% IF ( OPACFinesTab ) %]
533 [% IF ( amountoutstanding > 0 ) %]
534 <div id="opac-user-fines">
535 <table class="table table-bordered table-striped">
536 <caption>Charges</caption>
537 <thead><tr><th colspan="2">Amount</th></tr></thead>
540 <td>You currently owe fines and charges amounting to:</td>
541 <td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding | $Price %]</a></td>
548 [% IF ( amountoutstanding < 0 ) %]
549 <div id="opac-user-fines">
550 <table class="table table-bordered table-striped">
551 <caption>Credits</caption>
552 <thead><tr><th colspan="2">Amount</th></tr></thead>
555 <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding * -1 | $Price %]</a></td>
562 [% IF relatives_with_fines %]
563 <div id="opac-user-relative-fines">
564 <table class="table table-bordered table-striped">
565 <caption>Fines and charges</caption>
568 <th colspan="2">Amount</th>
572 [% FOREACH r IN relatives_with_fines %]
574 <td>[% r.firstname | html %] [% r.surname | html %] currently owes fines and charges amounting to:</td>
575 <td><a href="/cgi-bin/koha/opac-account.pl#g[% r.id | uri %]">[% r.account.balance | $Price %]</a></td>
582 [% END # / OPACFinesTab %]
585 <div id="opac-user-relative-issues">
586 <table id="opac-user-relative-issues-table" class="table table-bordered table-striped">
587 <caption class="sr-only">Relative issues</caption>
590 <th class="anti-the">Title</th>
594 <th class="psort">Relative</th>
599 [% FOREACH r IN relatives %]
600 [% FOREACH c IN r.checkouts %]
603 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% c.item.biblio.biblionumber | uri %]">
604 [% c.item.biblio.title | html %][% IF ( c.item.enumchron ) %] [% c.item.enumchron | html %][% END %]
609 [% c.date_due | $KohaDates %]
613 [% c.item.barcode | html %]
617 [% c.item.itemcallnumber | html %]
621 [% r.firstname | html %] [% r.surname | html %]
631 [% IF ( overdues_count ) %]
632 <div id="opac-user-overdues">
633 <table id="overduest" class="table table-bordered table-striped">
634 <caption>Overdues <span class="count">([% overdues_count | html %] total)</span></caption>
635 <!-- OVERDUES TABLE ROWS -->
638 [% IF ( JacketImages || AdlibrisEnabled ) %]<th class="nosort"> </th>[% END %]
639 <th class="anti-the">Title</th>
640 [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
641 [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
643 <th class="psort">Due</th>
644 [% IF ( OpacRenewalAllowed ) %]
645 <th class="nosort">Renew</th>
647 [% IF ( OPACFinesTab ) %]
653 [% FOREACH OVERDUE IN OVERDUES %]
655 [% IF ( JacketImages || AdlibrisEnabled ) %]
656 <td class="jacketcell">
657 [% IF ( AdlibrisEnabled && OVERDUE.normalized_isbn ) %]
658 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% OVERDUE.biblionumber | uri %]"><img src="[% AdlibrisURL | url %]?isbn=[% OVERDUE.normalized_isbn | uri %]" class="adlibris-cover" alt="Adlibris cover image" /></a>
660 [% IF ( OPACAmazonCoverImages ) %]
661 [% IF ( OVERDUE.normalized_isbn ) %]
662 <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>
664 <a href="#"><span class="no-image">No cover image available</span></a>
668 [% IF ( GoogleJackets ) %]
669 [% IF ( OVERDUE.normalized_isbn ) %]
670 <div style="display:block;" title="Click to view in Google Books" class="[% OVERDUE.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
672 <a href="http://books.google.com/books?q=[% OVERDUE.title |url %]"><span class="no-image">No cover image available</span></a>
676 [% IF ( BakerTaylorEnabled ) %]
677 [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %]
679 <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
681 <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
685 [% IF ( SyndeticsCoverImages ) %]
686 <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" />
689 [% END # /IF jacketcell %]
692 <a class="title" href="/cgi-bin/koha/opac-detail.pl?bib=[% OVERDUE.biblionumber | html %]">[% INCLUDE 'biblio-title.inc' biblio=OVERDUE %]</a>
693 <span class="item-details">[% OVERDUE.author | html %]</span>
696 [% UNLESS ( item_level_itypes ) %]
698 [% IF ( OVERDUE.imageurl && !Koha.Preference('OpacNoItemTypeImages') ) %]
699 <img src="[% OVERDUE.imageurl | html %]" title="[% OVERDUE.description | html %]" alt="[% OVERDUE.description | html %]" />
700 [% END %] [% OVERDUE.description | html %]
703 [% IF ( show_barcode ) %]
705 <span class="tdlabel">Barcode:</span>
706 [% OVERDUE.barcode | html %]
710 <span class="tdlabel">Call number:</span>
711 [% OVERDUE.itemcallnumber | html %]
713 <td data-order="[% OVERDUE.date_due | html %]">
714 <span class="tdlabel">Date due:</span>
715 [% OVERDUE.date_due | $KohaDates as_due_date => 1 %]
717 [% IF ( OpacRenewalAllowed ) %]
719 [% IF ( OVERDUE.debarred ) %]
721 [% ELSIF ( OVERDUE.status ) %]
722 [% IF ( canrenew ) %]
723 <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&item=[% OVERDUE.itemnumber | uri %]&bornum=[% OVERDUE.borrowernumber | uri %]">Renew</a>
725 <span class="renewals">(
726 [% OVERDUE.renewsleft | html %] of [% OVERDUE.renewsallowed | html %] renewals remaining
727 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
728 / [% OVERDUE.unseenleft | html %] of [% OVERDUE.unseenallowed | html %] renewals left before the item must be seen by the library
731 [% ELSIF ( OVERDUE.norenew_overdue ) %]
732 Not allowed<span class="renewals">(overdue)</span>
733 [% ELSIF ( OVERDUE.onreserve ) %]
740 [% IF ( OPACFinesTab ) %]
742 <span class="tdlabel">Fines:</span>
743 [% IF ( OVERDUE.charges ) %]
754 </div> <!-- / #opac-user-overdues -->
755 [% END # /overdues_count %]
757 [% PROCESS 'holds-table.inc' HOLDS = RESERVES, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds %]
759 [% IF Koha.Preference('ArticleRequests') %]
760 <div id="opac-user-article-requests">
761 [% IF logged_in_user.article_requests_current.count %]
762 <table id="article-requests-table" class="table table-bordered table-striped">
763 <caption>Article requests <span class="count">([% logged_in_user.article_requests_current.count | html %] total)</span></caption>
766 <th class="anti-the article-request-record-title">Record title</th>
767 <th class="psort article-request-created-on">Placed on</th>
768 <th class="anti-the article-request-title">Title</th>
769 <th class="article-request-author">Author</th>
770 <th class="article-request-volume">Volume</th>
771 <th class="article-request-issue">Issue</th>
772 <th class="article-request-date">Date</th>
773 <th class="article-request-pages">Pages</th>
774 <th class="article-request-chapters">Chapters</th>
775 <th class="article-request-patron-notes">Notes</th>
776 <th class="article-request-format">Format</th>
777 <th class="article-request-status">Status</th>
778 <th class="article-request-branchcode">Pickup library</th>
779 <th class="nosort article-request-cancel"> </th>
784 [% FOREACH ar IN logged_in_user.article_requests_current %]
785 <td class="article-request-record-title">
786 <a class="article-request-title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ar.biblionumber | html %]">
787 [% INCLUDE 'biblio-title.inc' biblio=ar.biblio %]
788 [% ar.item.enumchron | html %]
790 [% ar.biblio.author | html %]
791 [% IF ar.itemnumber %] <em>(only [% ar.item.barcode | html %])</em>[% END %]
794 <td class="article-request-created_on">
795 [% ar.created_on | $KohaDates %]
798 <td class="article-request-title">
799 [% ar.title | html %]
802 <td class="article-request-author">
803 [% ar.author | html %]
806 <td class="article-request-volume">
807 [% ar.volume | html %]
810 <td class="article-request-issue">
811 [% ar.issue | html %]
814 <td class="article-request-date">
818 <td class="article-request-pages">
819 [% ar.pages | html %]
822 <td class="article-request-chapters">
823 [% ar.chapters | html %]
826 <td class="article-request-patron-notes">
827 [% ar.patron_notes | html %]
830 <td class="article-request-format">[% IF ar.format == 'PHOTOCOPY' %]Copy[% ELSIF ar.format == 'SCAN' %]Scan[% END %]</td>
832 <td class="article-request-status">
833 [% IF ar.status == 'PENDING' %]
835 [% ELSIF ar.status == 'PROCESSING' %]
837 [% ELSIF ar.status == 'COMPLETED' %]
839 [% ELSIF ar.status == 'CANCELED' %]
844 <td class="article-request-branchcode">
845 [% ar.branch.branchname | html %]
848 <td class="article-request-cancel">
849 <span class="tdlabel">Cancel:</span>
850 <form action="/cgi-bin/koha/opac-article-request-cancel.pl" id="delete_article_request_[% ar.id | html %]">
851 <legend class="sr-only">Cancel article request</legend>
852 <input type="hidden" name="id" value="[% ar.id | html %]" />
853 <button data-title="[% ar.biblio.title | html %] [% ar.item.enumchron | html %]" data-article-request_id="[% ar.id | html %]" type="submit" class="btn btn-sm btn-danger btn-delete-article-request"><i class="fa fa-remove" aria-hidden="true"></i> Cancel</button>
861 <table class="table table-bordered table-striped">
862 <caption class="sr-only">Article requests</caption>
863 <tr><td>You have no article requests currently.</td></tr>
865 [% END # IF article_requests_current.count %]
866 </div> <!-- / #opac-user-article-requests -->
869 </div> <!-- /#opac-user-views -->
870 </div> <!-- /#userdetails -->
871 </div> <!-- /.col-10 -->
872 </div> <!-- /.row -->
873 </div> <!-- /.container-fluid -->
874 </div> <!-- /#main -->
876 [% IF ( OverDriveCirculation ) %]
877 [% INCLUDE 'overdrive-checkout.inc' %]
878 [% IF ( Koha.Preference('OverDrivePasswordRequired') ) %]
879 [% INCLUDE 'overdrive-login.inc' %]
882 [% IF ( RecordedBooksCirculation ) %]
883 [% INCLUDE 'recordedbooks-checkout.inc' %]
886 [% INCLUDE 'opac-bottom.inc' %]
887 [% BLOCK jsinclude %]
888 [% INCLUDE 'calendar.inc' %]
889 [% INCLUDE 'datatables.inc' %]
891 function tableInit( tableId ){
892 if( tableId == "checkoutst" ){
893 $(".dt-buttons").append("<button type=\"button\" class=\"dt-button buttons-ical\" id=\"buttons-ics\">iCal</button> ");
894 [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
895 $(".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>");
899 $(document).ready(function(){
900 $('#opac-user-views').tabs();
901 $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
902 $(".suspend-until").prop("readonly",1);
904 $(".btn-delete-hold").on("click", function(e){
906 var hold_title = $(this).data("title");
907 var reserve_id = $(this).data("reserve_id");
908 confirmModal( hold_title, _("Are you sure you want to cancel this hold?"), _("Yes, cancel hold"), _("No, do not cancel hold"), function( result ){
910 $("#delete_hold_" + reserve_id ).submit();
916 $(".btn-delete-article-request").on("click", function(e){
918 var article_request = $(this).data("title");
919 var article_request_id = $(this).data("article-request_id");
920 confirmModal( article_request, _("Are you sure you want to cancel this article request?"), _("Yes, cancel article request"), _("No, do not cancel article request"), function( result ){
922 $("#delete_article_request_" + article_request_id ).submit();
928 $("#suspend_all_submit").on("click", function(e){
930 var title = _("Are you sure you want to suspend all holds?");
931 var body = _("All holds will be suspended.");
932 confirmModal( body, title, _("Yes, suspend all holds"), "", function( result ){
934 $("#suspend_all_holds").submit();
940 $("#resume_all_submit").on("click", function(e){
942 var title = _("Are you sure you want to resume all suspended holds?");
943 var body = _("All holds will resume.");
944 confirmModal( body, title, _("Yes, resume all holds"), _("No, do not resume holds"), function( result ){
946 $("#resume_all_holds").submit();
952 var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table");
953 dTables.each(function(){
954 var thIndex = $(this).find("th.psort").index();
955 $(this).on("init.dt", function() {
956 tableInit( $(this).attr("id") );
958 .dataTable($.extend(true, {}, dataTablesDefaults, {
959 "sorting" : [[ thIndex, 'asc' ]],
960 "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
962 { "targets": [ "nosort" ],"sortable": false,"searchable": false },
963 { "type": "anti-the", "targets" : [ "anti-the" ] }
967 "searchPlaceholder": _("Search")
973 $("body").on("click", "#buttons-ics", function(){
974 location.href="/cgi-bin/koha/opac-ics.pl";
977 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
978 [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
979 $("#renewselected").submit(function(){
981 $("input[type=checkbox]").each(function(){
982 if($(this).is(':checked')){
987 alert(_("Nothing has been selected. Check the box for each item you want to renew"));
991 $("body").on("click","#renewselected_link",function(e){
993 $("#renewselected").submit();
995 $("body").on("click","#renewall_link, #renewall_js",function(e){
997 $("#renewall").submit();
999 [% END # /IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1001 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
1003 /* If JS enabled, show button, otherwise show link to redirect to a page where note can be submitted */
1004 $(".nonjs_submitnote").hide();
1006 $("input[name='note']").prop('readonly', false);
1007 $("input[name='note']").keypress(function(e){
1008 /* prevent submitting of renewselected form */
1013 $("input[name='note']").keyup(function(e){
1014 var $btn_save = $('#save_'+$(this).data('issue_id'));
1015 var origvalue = $(this).data('origvalue');
1016 var value = $(this).val();
1018 if(origvalue != value) {
1020 $btn_save.text(_("Submit changes"));
1022 $btn_save.text(_("Submit note"));
1031 $(".suspend-until").datepicker({
1032 beforeShow: function(input, inst) {
1033 // https://stackoverflow.com/questions/662220/how-to-change-the-pop-up-position-of-the-jquery-datepicker-control#answer-10598178
1034 var calendar = inst.dpDiv;
1035 setTimeout(function() {
1047 if ( $('#opac-user-clubs').length ) {
1048 $('#opac-user-clubs-tab-link').on('click', function() {
1049 $('#opac-user-clubs').text(_("Loading..."));
1050 $('#opac-user-clubs').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrowernumber | html %]');
1054 $("body").on("click", ".btn-add-note", function(e){
1056 var title = $(this).data("title");
1057 var issue_id = $(this).data("issueid");
1058 var note = $(this).data("note");
1059 var origvalue = $(this).data("origvalue");
1060 $("#addNote").val( note );
1061 $("#addNoteIssueId").val( issue_id );
1062 $("#addNoteTitle").text( title );
1063 $("#addNoteModal").modal("show");
1066 $("#addNoteForm").on("submit", function(e){
1068 var title = $("#addNoteTitle").text();
1069 var issue_id = $("#addNoteIssueId").val();
1070 var note = $("#addNote").val();
1071 submitNote( title, issue_id, note );
1074 $("#addNoteModal").on("hidden.bs.modal", function(){
1075 $("#addNoteTitle").text("");
1076 $("#addNote").val("");
1080 function submitNote( title, issue_id, note ){
1081 var self = $("#addNoteModal");
1082 var noteinput = $("#save_" + issue_id );
1085 'action': 'issuenote',
1086 'issue_id': issue_id,
1091 url: '/cgi-bin/koha/svc/checkout_notes/',
1096 .done(function(data) {
1098 if(data.status == 'saved') {
1099 $("#notesaved").removeClass("alert-error");
1100 $("#notesaved").addClass("alert-info");
1101 noteinput.data('origvalue', data.note)
1102 .data('note', data.note)
1103 .text( _("Edit note" ) );
1104 message = "<p>" + _("Your note about %s has been saved and sent to the library.").format( em(title) ) + "</p>";
1105 message += "<p class=\"checkout_note\">" + data.note;
1106 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 + "\" data-note=\"" + data.note + "\" data-origvalue=\"" + data.note + "\"><i class=\"fa fa-pencil\" aria-hidden=\"true\"></i> " + _("Edit note") + "</a>";
1108 } else if(data.status == 'removed') {
1109 $("#notesaved").removeClass("alert-error");
1110 $("#notesaved").addClass("alert-info");
1111 noteinput.data('origvalue', "")
1113 .text( _("Add note") );
1114 message = "<p>" + _("Your note about %s was removed.").format( em(title) ) + "</p>";
1116 $("#notesaved").removeClass("alert-info");
1117 $("#notesaved").addClass("alert-error");
1118 message = "<p>" + _("Your note about %s could not be saved.").format( em(title) ) + "</p>";
1119 noteinput.text( _("Add note") );
1120 message += "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>";
1123 $("#notesaved").html(message);
1125 .fail(function(data) {
1126 $("#notesaved").removeClass("alert-info");
1127 $("#notesaved").addClass("alert-error");
1128 var message = "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>";
1129 $("#notesaved").html(message);
1131 .always(function() {
1132 $("#notesaved").show();
1136 function em( title ){
1137 return "<em>" + title + "</em>";
1140 var borrowernumber = "[% borrowernumber | html %]";
1141 var MSG_YOUR_RATING = _("Your rating: %s, ");
1142 var MSG_AVERAGE_RATING = _("Average rating: %s (%s votes)");
1144 [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
1145 [% Asset.js("lib/jquery/plugins/jquery.barrating.min.js") | $raw %]
1146 [% Asset.js("js/ratings.js") | $raw %]
1148 [% IF Koha.Preference('OverDriveCirculation') %]
1149 [% Asset.js("js/overdrive.js") | $raw %]
1151 var OD_password_required = [% IF Koha.Preference('OverDrivePasswordRequired') %]1[% ELSE %]0[% END %];
1152 $(document).ready(function() {
1153 [% IF ( overdrive_error ) %]
1154 KOHA.OverDriveCirculation.display_error("#opac-user-overdrive", "[% overdrive_error.dquote | html %]");
1157 [% IF ( overdrive_tab ) %]
1158 $("#opac-user-views").tabs("select", "#opac-user-overdrive");
1161 $("#opac-user-overdrive").each( function() {
1162 KOHA.OverDriveCirculation.display_account_details(this);
1167 [% IF RecordedBooksCirculation %]
1168 [% Asset.js("js/recordedbooks.js") | $raw %]
1170 $(document).ready(function() {
1171 [% IF ( recordedbooks_error ) %]
1172 KOHA.RecordedBooks.display_error("#opac-user-recordedbooks", "[% recordedbooks_error.dquote | html %]");
1174 [% IF ( recordedbooks_tab ) %]
1175 $("#opac-user-views").tabs("select", "#opac-user-recordedbooks");
1177 $("#opac-user-recordedbooks").each( function() {
1178 KOHA.RecordedBooks.display_account_details(this);