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 [% WRAPPER breadcrumbs %]
34 [% WRAPPER breadcrumb_item %]
35 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
37 [% WRAPPER breadcrumb_item bc_active= 1 %]
38 <span>Your summary</span>
40 [% END #/ WRAPPER breadcrumbs %]
42 <div class="container-fluid">
44 <div class="col col-lg-2 order-2 order-lg-1">
46 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
49 <div class="col-md-12 col-lg-10 order-1 order-lg-2">
50 <div id="userdetails" class="maincontent">
54 [% INCLUDE 'opac-note.inc' %]
56 <p>Hello, [% INCLUDE 'patron-title.inc' patron = logged_in_user %]
58 <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>
60 [% 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 %]
63 <div class="alert alert-info">
65 <p>One or more holds were not placed due to following errors:</p>
67 [% FOREACH fail IN failed_holds.split('\|') %]
71 <span>Item is damaged</span>
72 [% CASE 'ageRestricted' %]
73 <span>The record and its items are age restricted</span>
74 [% CASE 'tooManyHoldsForThisRecord' %]
75 <span>You have exceeded the number of concurrent holds for this record</span>
76 [% CASE 'tooManyReservesToday' %]
77 <span>You've reached your daily holds limit</span>
78 [% CASE 'tooManyReserves' %]
79 <span>You have too many holds already</span>
80 [% CASE 'notReservable' %]
81 <span>Not holdable</span>
82 [% CASE 'cannotReserveFromOtherBranches' %]
83 <span>You are from a different library</span>
84 [% CASE 'branchNotInHoldGroup' %]
85 <span>Holds are not allowed from your library</span>
86 [% CASE 'itemAlreadyOnHold' %]
87 <span>You already have a hold for this item</span>
88 [% CASE 'cannotBeTransferred' %]
89 <span>Cannot be transferred to pickup library</span>
90 [% CASE 'pickupNotInHoldGroup' %]
91 <span>The chosen pickup location is not allowed</span>
92 [% CASE 'noReservesAllowed' %]
93 <span>No holds are allowed on this item</span>
94 [% CASE 'libraryNotPickupLocation' %]
95 <span>Library is not a valid pickup location</span>
96 [% CASE 'no_valid_pickup_location' %]
97 <span>No valid pickup location</span>
98 [% CASE 'notforloan' %]
99 <span>Not for loan</span>
100 [% CASE 'items_available' %]
101 <span>There are items available in the library, please visit to check them out</span>
102 [% CASE 'not_placed' %]
103 <span>Error when placing hold, please report this to the library</span>
105 <span>Error: [% fail | html %]</span>
113 [% IF ( borrower.blockedonfines && Koha.Preference('OPACHoldRequests') ) %]
114 <div class="alert alert-warning" id="blockedonfines">
115 <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>
119 [% IF ( borrower.warndeparture ) %]
120 <div class="alert alert-warning" id="warndeparture">
121 <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>
122 [% IF ( borrower.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your library card expires.</span>[% END %]
126 [% IF ( borrower.warnexpired ) %]
127 <div class="alert alert-warning" id="warnexpired">
128 <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>
132 [% IF ( RENEW_ERROR ) %]
133 <div class="alert alert-warning">
134 <strong>Please note:</strong>
135 Your loan renewal failed because of the following reason(s):
137 [% FOREACH error IN RENEW_ERROR.split('\|') %]
138 [% IF error == 'card_expired' %]
139 <li>Your account has expired. Please contact the library for more information.</li>
140 [% ELSIF error == 'too_many' %]
141 <li>You have renewed this item the maximum number of times allowed.</li>
142 [% ELSIF error == 'too_unseen' %]
143 <li>You have renewed this item the maximum number of consecutive times without it being seen by the library.</li>
144 [% ELSIF error == 'too_soon' %]
145 <li>It is too soon after the checkout date for this item to be renewed.</li>
146 [% ELSIF error == 'on_reserve' %]
147 <li>This item is on hold for another patron.</li>
148 [% ELSIF error == 'item_denied_renewal' %]
149 <li>Item renewal is not allowed.</li>
150 [% ELSIF error == 'item_issued_to_other_patron'%]
151 <li>This item is already checked out to another patron.</li>
152 [% ELSIF error == 'auto_too_soon' %]
153 <li>This item is scheduled for auto renewal.</li>
160 [% IF ( patron_flagged ) %]
161 <div class="alert alert-warning">
163 [% IF ( userdebarred ) %]
164 [% IF ( discharge_available ) %]
166 <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>
169 <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen.
170 [% IF ( borrower.debarredcomment ) %]
172 <span id="userdebarred_comment">
174 [% IF borrower.debarredcomment.search('OVERDUES_PROCESS') %]
175 Restriction added by overdues process [% borrower.debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
177 [% FOR restriction IN logged_in_user.restrictions %]
178 [% IF restriction.comment %]
179 [% restriction.type.display_text | html %]: [% restriction.comment | html_line_break %], frozen until:
180 [% IF restriction.expiration %]
181 [% restriction.expiration | $KohaDates %]
183 <strong>Indefinite</strong>
187 [% restriction.type.display_text | html %], frozen until:
188 [% IF restriction.expiration %]
189 [% restriction.expiration | $KohaDates %]
191 <strong>Indefinite</strong>
200 [% IF ( borrower.userdebarreddate && debarred_date != '9999-12-31' ) %]
202 <span id="userdebarred_date">[% borrower.userdebarreddate | $KohaDates %]</span>
205 <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>
208 [% IF ( borrower.gonenoaddress ) %]
209 <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date contact information. Please contact the library.
210 <a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]<span>Update your contact information</span>[% ELSE %]<span>Go to your contact information</span>[% END %]</a>
211 [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %]
214 [% IF ( borrower.lost ) %]
215 <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>
217 [% IF ( renewal_blocked_fines.defined ) && ( OpacRenewalAllowed ) %]
218 <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 %]
222 [% END # / IF patron_flagged %]
225 <div class="alert alert-info" id="savings">
226 Congratulations, you have saved a total of [% savings | $Price with_symbol => 1 %] by using the library.
230 <div class="alert alert-info" id="notesaved" style="display:none;"></div>
231 [% IF ( OpacMySummaryNote ) %]
232 [% PROCESS koha_news_block news => OpacMySummaryNote %]
235 [% IF Koha.Preference('AllowPatronToControlAutorenewal') %]
236 <form id="autorenewal_option" action="/cgi-bin/koha/opac-user.pl" method="post">
237 [% INCLUDE 'csrf-token.inc' %]
238 <legend class="sr-only">Auto-renewal</legend>
239 <label for="yes-autorenew_checkouts">
242 [% IF ( borrower.autorenew_checkouts ) %]
243 <label class="radio inline" for="yes-autorenew_checkouts">
245 <input type="radio" id="yes-autorenew_checkouts" name="borrower_autorenew_checkouts" value="1" checked="checked" />
248 <label class="radio inline" for="no-autorenew_checkouts">
250 <input type="radio" id="no-autorenew_checkouts" name="borrower_autorenew_checkouts" value="0" />
253 <label class="radio inline" for="yes-autorenew_checkouts">
255 <input type="radio" id="yes-autorenew_checkouts" name="borrower_autorenew_checkouts" value="1" />
257 <label class="radio inline" for="no-autorenew_checkouts">
259 <input type="radio" id="no-autorenew_checkouts" name="borrower_autorenew_checkouts" value="0" checked="checked" />
262 <input type="hidden" name="op" value="cud-update_arc" />
263 <input type="submit" value="Update auto-renewal preference" />
267 [% WRAPPER tabs id= "opac-user-views" %]
268 [% WRAPPER tabs_nav %]
269 [% WRAPPER tab_item tabname= "opac-user-checkouts" %]
270 <span>Checked out ([% issues_count | html %])</span>
273 [% WRAPPER tab_item tabname= "opac-user-relative-issues" %]
274 <span>Relatives' checkouts</span>
277 [% IF ( overdues_count ) %]
278 [% WRAPPER tab_item tabname= "opac-user-overdues" %]
279 <span>Overdue ([% overdues_count | html %])</span>
282 [% IF ( OPACFinesTab ) %]
283 [% IF ( amountoutstanding > 0 ) %]
284 [% WRAPPER tab_item tabname= "opac-user-fines" %]
285 <span>Charges ([% amountoutstanding | $Price %])</span>
288 [% IF ( amountoutstanding < 0 ) %]
289 [% WRAPPER tab_item tabname= "opac-user-fines" %]
290 <span>Credits ([% amountoutstanding * -1 | $Price %])</span>
293 [% IF relatives_with_fines %]
294 [% WRAPPER tab_item tabname= "opac-user-relative-fines" %]
295 <span>Relatives' charges</span>
300 [% IF borrower_club_enrollments.count || borrower_enrollable_clubs.count %]
301 [% WRAPPER tab_item tabname= "opac-user-clubs" %]
302 <span>Clubs ([% borrower_club_enrollments.count || 0 | html %]/[% borrower_enrollable_clubs.count || 0 | html %])</span>
306 [% IF ( RESERVES.count ) %]
307 [% WRAPPER tab_item tabname= "opac-user-holds" %]
308 <span>Holds ([% RESERVES.count | html %])</span>
311 [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
312 [% WRAPPER tab_item tabname= "opac-user-recalls" %]
313 <span>Recalls ([% RECALLS.count | html %])</span>
316 [% IF Koha.Preference('ArticleRequests') %]
317 [% WRAPPER tab_item tabname= "opac-user-article-requests" %]
318 <span>Article requests ([% current_article_requests.size || 0 | html %])</span>
321 [% IF ( OverDriveCirculation ) %]
322 [% WRAPPER tab_item tabname= "opac-user-overdrive" %]
323 <span>OverDrive account</span>
326 [% END # /WRAPPER tabs_nav %]
328 [% WRAPPER tab_panels %]
329 [% IF ( OverDriveCirculation ) %]
330 [% WRAPPER tab_panel tabname="opac-user-overdrive" %]
331 [% END # /tab_panel#opac-user-overdrive %]
333 [% WRAPPER tab_panel tabname="opac-user-checkouts" %]
334 [% IF ( issues_count ) %]
335 <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
336 [% INCLUDE 'csrf-token.inc' %]
337 <legend class="sr-only">Renew selected</legend>
338 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]">
339 <input type="hidden" name="from" value="opac_user" />
340 <table id="checkoutst" class="table table-bordered table-striped">
341 <caption>[% issues_count | html %] Item(s) checked out</caption>
344 [% IF ( JacketImages ) %]<th class="nosort"> </th>[% END %]
345 <th class="all anti-the">Title</th>
347 <th class="psort">Due</th>
348 [% UNLESS ( item_level_itypes ) %]
351 [% IF ( show_barcode ) %]
355 [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
358 [% IF ( OPACFinesTab ) %]
361 [% IF Koha.Preference('OPACMySummaryHTML') %]
362 <th class="nosort">Links</th>
364 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
365 <th class="hidden">Checkout note</th>
366 <th id="checkout-notes" class="nosort noExport" title="Use this to report any problems with your currently checked out items">Report a problem</th>
372 [% FOREACH ISSUE IN ISSUES %]
373 [% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
374 [% IF ( JacketImages ) %]
375 <td class="jacketcell">
376 [% IF ( OPACAmazonCoverImages ) %]
377 [% IF ( ISSUE.normalized_isbn ) %]
378 <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>
380 <a href="#"><span class="no-image">No cover image available</span></a>
384 [% IF ( GoogleJackets ) %]
385 [% IF ( ISSUE.normalized_isbn ) %]
386 <div style="display:block;" title="Click to view in Google Books" class="[% ISSUE.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
388 <a href="http://books.google.com/books?q=[% ISSUE.title |url %]"><span class="no-image">No cover image available</span></a>
392 [% IF ( BakerTaylorEnabled ) %]
393 [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %]
395 <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
397 <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
401 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
402 [% SET custom_cover_image_url = ISSUE.biblio_object.custom_cover_image_url %]
403 [% IF custom_cover_image_url %]
404 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
408 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
409 <img src="https://secure.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn | html %]/[% SyndeticsCoverImageSize | uri %].GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% ISSUE.normalized_upc | html %]&oclc=[% ISSUE.normalized_oclc | html %]" alt="" class="item-thumbnail" />
412 [% END # / IF JacketImages %]
415 [% INCLUDE 'biblio-title.inc' biblio=ISSUE link=> 1 %]
416 [% IF ( ISSUE.enumchron ) %] [% ISSUE.enumchron | html %][% END %]
418 [% IF ( ISSUE.onsite_checkout ) %] <em class="onsite_checkout">(On-site checkout)</em>[% END %]
420 [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
421 [% INCLUDE 'user-star-ratings.inc' item=ISSUE %]
424 [% IF ( ISSUE.recall ) %]<br><i>This item has been recalled. Please return by the new due date.</i>[% END %]
427 <td class="author">[% ISSUE.author | html %]</td>
428 [% IF ( ISSUE.overdue ) %]
429 <td class="date_due overdue" data-order="[% ISSUE.date_due | html %]">
430 <span class="tdlabel">Date due:</span>
431 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
434 <td class="date_due" data-order="[% ISSUE.date_due | html %]">
435 <span class="tdlabel">Date due:</span>
436 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
439 [% UNLESS ( item_level_itypes ) %]
441 <span class="tdlabel">Item type:</span>
442 [% IF ( ISSUE.imageurl && !Koha.Preference('OpacNoItemTypeImages') ) %]
443 <img src="[% ISSUE.imageurl | html %]" title="[% ISSUE.description | html %]" alt="[% ISSUE.description | html %]" />
444 [% END %] <span class="itypetext">[% ISSUE.description | html %]</span>
447 [% IF ( show_barcode ) %]
449 <span class="tdlabel">Barcode:</span>
450 [% ISSUE.barcode | html %]
454 <span class="tdlabel">Call number:</span>
455 [% ISSUE.itemcallnumber | html %]
457 [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
458 [% IF ( ISSUE.status && canrenew ) %]
459 <td class="renew" data-order="[% ISSUE.renewsleft | html %]">
461 <td class="renew" data-order="0">
463 [% IF ISSUE.renewed %]<span class="blabel label-success">Renewed!</span><br />[% END %]
464 [% IF ( ISSUE.status ) %]
465 [% IF ( canrenew ) %]
466 <input type="checkbox" name="issue" value="[% ISSUE.issue_id | uri %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&issue=[% ISSUE.issue_id | uri %]&borrowernumber=[% ISSUE.borrowernumber | uri %]">Renew</a>
468 [% IF ISSUE.renewalfee > 0 %]
469 <span class="renewalfee label label-warning">Fee for item type '[% ItemTypes.GetDescription( ISSUE.renewalitemtype) | html %]': [% ISSUE.renewalfee | $Price %]</span>
471 [% IF ISSUE.itemtype_object.rentalcharge_daily > 0 %]
472 <span class="renewalfee label label-warning">[% ISSUE.itemtype_object.rentalcharge_daily | $Price %] per day</span>
474 [% IF ISSUE.itemtype_object.rentalcharge_hourly > 0 %]
475 <span class="renewalfee label label-warning">[% ISSUE.itemtype_object.rentalcharge_hourly | $Price %] per hour</span>
477 <span class="renewals">(
478 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
479 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
480 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
483 [% ELSIF ( ISSUE.on_reserve ) %]
484 <span class="usr-msg no-renew-hold">Not renewable <span class="renewals">(on hold)</span></span>
485 [% ELSIF ( ISSUE.too_many ) %]
486 <span class="usr-msg no-renew-too-many">Not renewable</span>
487 [% ELSIF ( ISSUE.too_unseen ) %]
488 <span class="usr-msg no-renew-unseen">Item must be renewed at the library. [% ISSUE.renewsleft | html %] renewals remaining</span>
489 [% ELSIF ( ISSUE.norenew_overdue ) %]
490 <span class="usr-msg no-renew-overdue">Not allowed <span class="renewals">(overdue)</span></span>
491 [% ELSIF ( ISSUE.auto_too_late ) %]
492 <span class="usr-msg no-renew-too-late">No longer renewable</span>
493 [% ELSIF ISSUE.auto_too_much_oweing %]
494 <span class="usr-msg auto-renew-fines">Automatic renewal failed, you have unpaid fines.</span>
495 <span class="renewals">(
496 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
497 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
498 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
501 [% ELSIF ISSUE.auto_account_expired %]
502 <span class="usr-msg auto-renew-expired">Automatic renewal failed, your account is expired.</span>
503 <span class="renewals">(
504 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
505 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
506 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
509 [% ELSIF ( ISSUE.too_soon ) %]
510 <span class="usr-msg no-renewal-before">No renewal before [% ISSUE.soonestrenewdate | $KohaDates as_due_date => 1 %]</span>
511 <span class="renewals">(
512 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
513 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
514 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
517 [% ELSIF ( ISSUE.item_denied_renewal ) %]
520 [% IF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
521 <br><span class="usr-msg automatic-renewal">This item is scheduled for auto renewal.</span>
525 [% IF ( OPACFinesTab ) %]
527 <span class="tdlabel">Fines:</span>
528 [% IF ( ISSUE.charges ) %]
529 <span>Yes (Item overdue or lost)</span>
530 [% ELSIF ( ISSUE.rentalfines ) %]
531 <span>Yes (Rental fees)</span>
537 [% IF Koha.Preference('OPACMySummaryHTML') %]
538 <td class="links">[% ISSUE.biblio_object.opac_summary_html| $raw %]</td>
540 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
542 [% ISSUE.note | html %]
545 <div id="viewnote_[% ISSUE.issue_id | html %]">
546 [% ISSUE.note | html %]
548 <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 %]">
549 [% IF ( ISSUE.note ) -%]
550 <span>Edit note</span>
552 <span>Add note</span>
555 <input type="hidden" id="note_[% ISSUE.issue_id | html %]" name="note" value="[% ISSUE.note | html %]" data-origvalue="[% ISSUE.note | html %]" />
560 [% END # /FOREACH ISSUES %]
563 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
564 <input type="submit" class="btn btn-primary" value="Renew selected" />
565 <input type="hidden" name="op" value="cud-renew" />
566 <button type="button" id="renewall_js" class="btn btn-primary">Renew all</button>
570 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
571 <form id="renewall" class="js-hide" action="/cgi-bin/koha/opac-renew.pl" method="post">
572 [% INCLUDE 'csrf-token.inc' %]
573 <legend class="sr-only">Renew</legend>
574 <input type="hidden" name="from" value="opac_user" />
575 <input type="hidden" name="op" value="cud-renew" />
576 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
577 [% FOREACH ISSUE IN ISSUES %]
578 [% IF ISSUE.status %]
579 <input type="hidden" name="issue" value="[% ISSUE.issue_id | html %]" />
582 <input type="submit" class="btn btn-primary" value="Renew all" />
586 <table class="table table-bordered table-striped">
587 <caption class="sr-only">Checked out</caption>
588 <tr><td>You have nothing checked out</td></tr>
590 [% END # IF issues_count %]
592 <!-- Add note modal -->
593 <div class="modal" id="addNoteModal" tabindex="-1" aria-labelledby="addNoteLabel" aria-hidden="true">
594 <div class="modal-dialog">
595 <form method="get" action="#" id="addNoteForm">
596 <div class="modal-content">
597 <div class="modal-header">
598 <h5 class="modal-title" id="addNoteLabel">Report a problem</h5>
599 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
600 <span aria-hidden="true">×</span>
603 <div class="modal-body" id="addNoteBody">
604 <h6 id="addNoteTitle"></h6>
605 <input type="hidden" id="addNoteIssueId" name="issue_id" value="" />
606 <textarea name="note" id="addNote" rows="4"></textarea>
607 <div class="hint">Your note will be shown to the librarian when the item is checked in.</div>
609 <div class="modal-footer">
610 <button type="submit" class="btn btn-primary">Submit note</button>
611 <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
617 [% END # /tab_panel#opac-user-checkouts %]
619 [% IF borrower_club_enrollments.count || borrower_enrollable_clubs.count %]
620 [% WRAPPER tab_panel tabname="opac-user-clubs" %]
622 [% END # /tab_panel#opac-user-clubs %]
625 [% IF ( OPACFinesTab ) %]
627 [% IF ( amountoutstanding > 0 ) %]
628 [% WRAPPER tab_panel tabname="opac-user-fines" %]
629 <table class="table table-bordered table-striped">
630 <caption>Charges</caption>
631 <thead><tr><th colspan="2">Amount</th></tr></thead>
634 <td>You currently owe fines and charges amounting to:</td>
635 <td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding | $Price %]</a></td>
639 [% END # /tab_panel#opac-user-fines %]
642 [% IF ( amountoutstanding < 0 ) %]
643 [% WRAPPER tab_panel tabname="opac-user-fines" %]
644 <table class="table table-bordered table-striped">
645 <caption>Credits</caption>
646 <thead><tr><th colspan="2">Amount</th></tr></thead>
649 <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding * -1 | $Price %]</a></td>
653 [% END # /tab_panel#opac-user-fines %]
656 [% IF relatives_with_fines %]
657 [% WRAPPER tab_panel tabname="opac-user-relative-fines" %]
658 <table class="table table-bordered table-striped">
659 <caption>Fines and charges</caption>
662 <th colspan="2">Amount</th>
666 [% FOREACH r IN relatives_with_fines %]
668 <td>[% r.firstname | html %] [% r.surname | html %] currently owes fines and charges amounting to:</td>
669 <td><a href="/cgi-bin/koha/opac-account.pl#g[% r.id | uri %]">[% r.account.balance | $Price %]</a></td>
674 [% END # /tab_panel#opac-user-relative-fines %]
676 [% END # / OPACFinesTab %]
679 [% WRAPPER tab_panel tabname="opac-user-relative-issues" %]
680 <table id="opac-user-relative-issues-table" class="table table-bordered table-striped">
681 <caption class="sr-only">Relatives' checkouts</caption>
684 <th class="all anti-the">Title</th>
688 <th class="psort">Relative</th>
694 [% FOREACH r IN relatives %]
695 [% FOREACH c IN r.checkouts %]
698 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% c.item.biblio.biblionumber | uri %]">
699 [% c.item.biblio.title | html %][% IF ( c.item.enumchron ) %] [% c.item.enumchron | html %][% END %]
704 [% c.date_due | $KohaDates %]
708 [% c.item.barcode | html %]
712 [% c.item.itemcallnumber | html %]
716 [% r.firstname | html %] [% r.surname | html %]
724 [% END # /tab_panel#opac-user-relative-issues %]
727 [% IF ( overdues_count ) %]
728 [% WRAPPER tab_panel tabname="opac-user-overdues" %]
729 <table id="overduest" class="table table-bordered table-striped">
730 <caption>Overdues <span class="count">([% overdues_count | html %] total)</span></caption>
731 <!-- OVERDUES TABLE ROWS -->
734 [% IF ( JacketImages ) %]<th class="nosort"> </th>[% END %]
735 <th class="all anti-the">Title</th>
736 [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
737 [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
739 <th class="psort">Due</th>
740 [% IF ( OpacRenewalAllowed ) %]
741 <th class="nosort">Renew</th>
743 [% IF ( OPACFinesTab ) %]
750 [% FOREACH OVERDUE IN OVERDUES %]
752 [% IF ( JacketImages ) %]
753 <td class="jacketcell">
754 [% IF ( OPACAmazonCoverImages ) %]
755 [% IF ( OVERDUE.normalized_isbn ) %]
756 <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>
758 <a href="#"><span class="no-image">No cover image available</span></a>
762 [% IF ( GoogleJackets ) %]
763 [% IF ( OVERDUE.normalized_isbn ) %]
764 <div style="display:block;" title="Click to view in Google Books" class="[% OVERDUE.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
766 <a href="http://books.google.com/books?q=[% OVERDUE.title |url %]"><span class="no-image">No cover image available</span></a>
770 [% IF ( BakerTaylorEnabled ) %]
771 [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %]
773 <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
775 <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
779 [% IF ( SyndeticsCoverImages ) %]
780 <img src="https://secure.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn | html %]/[% SyndeticsCoverImageSize | uri %].GIF&client=[% SyndeticsClientCode | html %]&upc=[% OVERDUE.normalized_upc | html %]&oclc=[% OVERDUE.normalized_oclc | html %]&type=xw10" alt="" class="item-thumbnail" />
783 [% END # /IF jacketcell %]
786 [% INCLUDE 'biblio-title.inc' biblio=OVERDUE link=> 1 %]
787 <span class="item-details">[% OVERDUE.author | html %]</span>
790 [% UNLESS ( item_level_itypes ) %]
792 [% IF ( OVERDUE.imageurl && !Koha.Preference('OpacNoItemTypeImages') ) %]
793 <img src="[% OVERDUE.imageurl | html %]" title="[% OVERDUE.description | html %]" alt="[% OVERDUE.description | html %]" />
794 [% END %] [% OVERDUE.description | html %]
797 [% IF ( show_barcode ) %]
799 <span class="tdlabel">Barcode:</span>
800 [% OVERDUE.barcode | html %]
804 <span class="tdlabel">Call number:</span>
805 [% OVERDUE.itemcallnumber | html %]
807 <td data-order="[% OVERDUE.date_due | html %]">
808 <span class="tdlabel">Date due:</span>
809 [% OVERDUE.date_due | $KohaDates as_due_date => 1 %]
811 [% IF ( OpacRenewalAllowed ) %]
813 [% IF ( OVERDUE.debarred ) %]
815 [% ELSIF ( OVERDUE.status ) %]
816 [% IF ( canrenew ) %]
817 <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&item=[% OVERDUE.itemnumber | uri %]&bornum=[% OVERDUE.borrowernumber | uri %]">Renew</a>
819 <span class="renewals">(
820 [% OVERDUE.renewsleft | html %] of [% OVERDUE.renewsallowed | html %] renewals remaining
821 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
822 / [% OVERDUE.unseenleft | html %] of [% OVERDUE.unseenallowed | html %] renewals left before the item must be seen by the library
825 [% ELSIF ( OVERDUE.norenew_overdue ) %]
826 Not allowed <span class="renewals">(overdue)</span>
827 [% ELSIF ( OVERDUE.onreserve ) %]
830 <span>No renewals left</span>
834 [% IF ( OPACFinesTab ) %]
836 <span class="tdlabel">Fines:</span>
837 [% IF ( OVERDUE.charges ) %]
849 [% END # /tab_panel#opac-user-overdues %]
850 [% END # /overdues_count %]
852 [% IF ( RESERVES.count ) %]
853 [% WRAPPER tab_panel tabname="opac-user-holds" %]
854 [% PROCESS 'holds-table.inc' HOLDS = RESERVES, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds %]
855 [% END # /tab_panel#opac-user-holds %]
856 [% END # / #RESERVES.count %]
858 [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
859 [% WRAPPER tab_panel tabname="opac-user-recalls" %]
860 <table id="recalls-table" class="table table-bordered table-striped">
861 <caption>Recalls <span class="count">([% RECALLS.count | html %])</span></caption>
864 <th class="all anti-the">Title</th>
865 <th class="psort">Placed on</th>
867 <th>Pickup location</th>
869 <th class="nosort"> </th>
874 [% FOREACH RECALL IN RECALLS %]
877 [% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio link=> 1 %]
878 [% IF RECALL.item_level %]<p class="hint">Item recalled: [% RECALL.item.barcode | html %]</p>[% END %]
880 <td class="recalldate" data-order="[% RECALL.created_date | html %]">
881 <span title="[% RECALL.created_date | html %]">
882 <span class="tdlabel">Recall date:</span>
883 [% RECALL.created_date | $KohaDates %]
886 <td class="expirationdate" data-order="[% RECALL.expiration_date | html %]">
887 [% IF ( RECALL.expiration_date ) %]
888 <span title="[% RECALL.expiration_date | html %]">
889 <span class="tdlabel">Expiration:</span>
890 [% RECALL.expiration_date | $KohaDates %]
893 <span title="0000-00-00">
894 <span class="tdlabel">Expiration:</span>
900 <span class="tdlabel">Pick up location:</span>
901 [% RECALL.library.branchname | html %]
904 <span class="tdlabel">Status:</span>
905 [% IF ( RECALL.requested ) %]
906 <span>Requested</span>
907 [% ELSIF ( RECALL.overdue ) %]
908 <span>Overdue to be returned</span>
909 [% ELSIF ( RECALL.in_transit ) %]
910 <span>In transit to [% RECALL.library.branchname | html %]</span>
911 [% ELSIF ( RECALL.waiting ) %]
912 <span>Ready for pickup</span>
915 <td class="cancelrecall">
916 [% IF ( RECALL.requested or RECALL.overdue ) %]
917 <form action="/cgi-bin/koha/opac-recall.pl" method="post">
918 [% INCLUDE 'csrf-token.inc' %]
919 <input type="hidden" name="op" value="cud-cancel">
920 <input type="hidden" name="recall_id" value="[% RECALL.id | html %]">
921 <input type="hidden" name="biblionumber" value="[% RECALL.biblio_id | html %]">
922 <button type="submit" name="submit" class="btn btn-sm btn-danger cancel_recall"><i class="fa fa-times" aria-hidden="true"></i> Cancel</button>
931 [% END # /tab_panel#opac-user-recalls %]
932 [% END # / # RECALLS.count %]
934 [% IF Koha.Preference('ArticleRequests') %]
935 [% WRAPPER tab_panel tabname="opac-user-article-requests" %]
936 [% IF current_article_requests.size %]
937 <table id="article-requests-table" class="table table-bordered table-striped">
938 <caption>Article requests <span class="count"></span></caption>
941 <th class="all anti-the article-request-record-title">Record title</th>
942 <th class="psort article-request-created-on">Placed on</th>
943 <th class="anti-the article-request-title">Title</th>
944 <th class="article-request-author">Author</th>
945 <th class="article-request-volume">Volume</th>
946 <th class="article-request-issue">Issue</th>
947 <th class="article-request-date">Date</th>
948 <th class="article-request-toc" title="Table of contents">TOC</th>
949 <th class="article-request-pages">Pages</th>
950 <th class="article-request-chapters">Chapters</th>
951 <th class="article-request-patron-notes">Notes</th>
952 <th class="article-request-format">Format</th>
953 <th class="article-request-status">Status</th>
954 <th class="article-request-branchcode">Pickup library</th>
955 <th class="nosort article-request-cancel"> </th>
961 [% FOREACH ar IN current_article_requests %]
963 <td class="article-request-record-title">
964 [% INCLUDE 'biblio-title.inc' biblio=ar.biblio link=> 1 %]
965 [% ar.item.enumchron | html %]
966 [% ar.biblio.author | html %]
967 [% IF ar.itemnumber %] <em>(only [% ar.item.barcode | html %])</em>[% END %]
970 <td class="article-request-created_on">
971 [% ar.created_on | $KohaDates %]
974 <td class="article-request-title">
975 [% ar.title | html %]
978 <td class="article-request-author">
979 [% ar.author | html %]
982 <td class="article-request-volume">
983 [% ar.volume | html %]
986 <td class="article-request-issue">
987 [% ar.issue | html %]
990 <td class="article-request-date">
994 <td class="article-request-toc">
995 [% IF ar.toc_request %]Yes[% END %]
998 <td class="article-request-pages">
999 [% ar.pages | html %]
1002 <td class="article-request-chapters">
1003 [% ar.chapters | html %]
1006 <td class="article-request-patron-notes">
1007 [% ar.patron_notes | html %]
1010 <td class="article-request-format">[% IF ar.format == 'PHOTOCOPY' %]<span>Copy</span>[% ELSIF ar.format == 'SCAN' %]<span>Scan</span>[% END %]</td>
1012 <td class="article-request-status">
1013 [% IF ar.status == 'PENDING' %]
1014 <span>Pending</span>
1015 [% ELSIF ar.status == 'PROCESSING' %]
1016 <span>Processing</span>
1017 [% ELSIF ar.status == 'REQUESTED' %]
1019 [% ELSIF ar.status == 'COMPLETED' %]
1020 <span>Completed</span>
1021 [% ELSIF ar.status == 'CANCELED' %]
1022 <span>Canceled</span>
1026 <td class="article-request-branchcode">
1027 [% ar.branch.branchname | html %]
1030 <td class="article-request-cancel">
1031 <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-times" aria-hidden="true"></i> Cancel</button>
1039 <table class="table table-bordered table-striped">
1040 <caption class="sr-only">Article requests</caption>
1041 <tr><td>You have no article requests currently.</td></tr>
1043 [% END # IF current_article_requests.size %]
1044 [% END # /tab_panel#opac-user-article-requests %]
1046 [% END # /WRAPPER tab_panels %]
1047 [% END # /WRAPPER tabs#opac-user-views %]
1048 </div> <!-- /#userdetails -->
1049 </div> <!-- /.col-10 -->
1050 </div> <!-- /.row -->
1051 </div> <!-- /.container-fluid -->
1052 </div> <!-- /#main -->
1054 [% # hold suspend modal form %]
1055 <div id="suspendHoldModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="suspendModalLabel" aria-hidden="true" data-focus="false">
1056 <div class="modal-dialog">
1057 <div class="modal-content">
1058 <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
1059 [% INCLUDE 'csrf-token.inc' %]
1060 <div class="modal-header">
1061 [% IF HOLD.suspend %]
1062 <h5 class="modal-title" id="suspendModalLabel">Resume hold</h5>
1063 <input type="hidden" name="op" value="cud-unsuspend" />
1065 <h5 class="modal-title" id="suspendModalLabel">Suspend hold</h5>
1066 <input type="hidden" name="op" value="cud-suspend" />
1068 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
1069 <span aria-hidden="true">x</span>
1072 <div class="modal-body">
1073 <h6 id="suspendHoldTitle"></h6>
1074 <input type="hidden" name="reserve_id" id="suspendHoldReserveId" value="" />
1075 <label for="suspend_untilDate">Suspend until:</label>
1076 <input type="text" name="suspend_until" id="suspend_untilDate" size="10" />
1077 [% INCLUDE 'date-format.inc' %]
1078 <p><a href="#" class="clear-flatpickr" data-fp="suspend_untilDate">Clear date to suspend indefinitely</a></p>
1080 <div class="modal-footer">
1081 <button class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Suspend</button>
1082 <button data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-times" aria-hidden="true"></i> Do not suspend</button>
1085 </div> <!-- /.modal-content -->
1086 </div> <!-- /.modal-dialog -->
1087 </div> <!-- /#suspendModal -->
1089 [% IF ( OverDriveCirculation ) %]
1090 [% INCLUDE 'overdrive-checkout.inc' %]
1091 [% IF ( Koha.Preference('OverDrivePasswordRequired') ) %]
1092 [% INCLUDE 'overdrive-login.inc' %]
1096 [% INCLUDE 'opac-bottom.inc' %]
1097 [% BLOCK jsinclude %]
1098 [% INCLUDE 'calendar.inc' %]
1099 [% INCLUDE 'datatables.inc' %]
1101 var AR_CAPTION_COUNT = _("(%s total)");
1104 function tableInit( tableId ){
1105 if( tableId == "checkoutst" ){
1106 $(".dt-buttons").append("<button type=\"button\" class=\"dt-button buttons-ical\" id=\"buttons-ics\">iCal</button> ");
1107 [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1108 $(".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>");
1112 $(document).ready(function(){
1113 [% IF ( opac_user_holds ) %]
1114 $("#opac-user-views a[href='#opac-user-holds_panel']").tab("show");
1116 [% IF ( opac_user_article_requests ) %]
1117 $("#opac-user-views a[href='#opac-user-article-requests_panel']").tab("show");
1119 $('#opac-user-article-requests caption .count').html(AR_CAPTION_COUNT.format('[% current_article_requests.size | html %]'));
1121 $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
1123 $(".btn-delete-hold").on("click", function(e){
1125 var hold_title = $(this).data("title");
1126 var reserve_id = $(this).data("reserve_id");
1127 confirmModal( hold_title, _("Are you sure you want to cancel this hold?"), _("Yes, cancel hold"), _("No, do not cancel hold"), function( result ){
1128 $("#bootstrap-confirm-box-modal").remove()
1130 $("#delete_hold_" + reserve_id ).submit();
1136 $(".btn-req-delete-hold").on("click", function(e){
1138 var hold_title = $(this).data("title");
1139 var reserve_id = $(this).data("reserve_id");
1140 confirmModal( hold_title, _("Are you sure you want to request cancelling this hold?"), _("Yes"), _("No"), function( result ){
1141 $("#bootstrap-confirm-box-modal").remove()
1143 $("#req_cancel_hold_" + reserve_id ).submit();
1149 $(".btn-delete-article-request").on("click", function(e){
1151 var article_request = $(this).data("title");
1152 var article_request_id = $(this).data("article-request_id");
1154 var doCancel = function( result ){
1155 $("#bootstrap-confirm-box-modal").remove();
1159 url: '/api/v1/public/patrons/'+borrowernumber+'/article_requests/'+article_request_id+'?cancellation_reason=OPAC',
1160 success: function( data ) {
1161 row.parents('tr').hide({
1163 complete: function() {
1164 var ar_tab = $('a[href="#opac-user-article-requests"');
1165 var ar_table = $('#article-requests-table');
1166 var ar_length = $('tbody tr:visible', ar_table).length;
1167 var ar_count = $('caption .count', ar_table);
1169 ar_tab.html(ar_tab.html().replace(/\(\d+\)/, '('+ar_length+')'));
1170 ar_count.html(AR_CAPTION_COUNT.format(ar_length));
1177 confirmModal( article_request, _("Are you sure you want to cancel this article request?"), _("Yes, cancel article request"), _("No, do not cancel article request"), doCancel);
1181 /* We initiate this flatpickr instance here so that we can use the variable later */
1182 var suspend_until_date = $("#suspend_untilDate").flatpickr({
1186 $(document).on("click", ".suspend_hold", function(e){
1188 var title = $(this).data("title");
1189 var reserve_id = $(this).data("reserve_id");
1190 $("#suspendHoldReserveId").val( reserve_id );
1191 $("#suspendHoldTitle").html( "<em>" + title + "</em>" );
1192 $("#suspendHoldModal").modal("show");
1195 $("#suspendHoldModal").on("hidden.bs.modal", function(){
1196 $("#suspendHoldTitle").html("");
1197 $("#suspendHoldReserveId").val("");
1198 suspend_until_date.clear();
1201 $("#suspend_all_submit").on("click", function(e){
1203 var title = _("Are you sure you want to suspend all holds?");
1204 var body = _("All holds will be suspended.");
1205 confirmModal( body, title, _("Yes, suspend all holds"), "", function( result ){
1206 $("#bootstrap-confirm-box-modal").remove()
1208 $("#suspend_all_holds").submit();
1214 $("#resume_all_submit").on("click", function(e){
1216 var title = _("Are you sure you want to resume all suspended holds?");
1217 var body = _("All holds will resume.");
1218 confirmModal( body, title, _("Yes, resume all holds"), _("No, do not resume holds"), function( result ){
1219 $("#bootstrap-confirm-box-modal").remove()
1221 $("#resume_all_holds").submit();
1227 var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table");
1228 dTables.each(function(){
1229 var thIndex = $(this).find("th.psort").index();
1230 $(this).on("init.dt", function() {
1231 tableInit( $(this).attr("id") );
1233 .dataTable($.extend(true, {}, dataTablesDefaults, {
1234 "sorting" : [[ thIndex, 'asc' ]],
1235 "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1237 { "targets": [ "nosort" ],"sortable": false,"searchable": false },
1238 { "type": "anti-the", "targets" : [ "anti-the" ] },
1239 { "visible": false, "targets" : [ "hidden" ] },
1240 { "className": 'dtr-control', "orderable": false, "targets": -1 }
1243 "search": "_INPUT_",
1244 "searchPlaceholder": _("Search")
1254 /* Override default button set so that we can extend the options of print and csv */
1255 'clearFilter', 'copy',
1259 /* Print view should show all columns (even invisible ones) unless they are .noExport */
1260 columns: ":not(.noExport)"
1266 /* CSV export should include all columns (even invisible ones) unless they are .noExport */
1267 columns: ":not(.noExport)"
1274 var dataTables = $("#recalls-table,#article-requests-table");
1275 dataTables.each(function(){
1276 $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
1282 "details": { "type": 'column',"target": -1 }
1285 { "className": 'dtr-control', "orderable": false, "targets": -1 }
1289 $('a[data-toggle="tab"]').on('shown.bs.tab', function (event) {
1290 dTables.DataTable().responsive.recalc();
1291 dataTables.DataTable().responsive.recalc();
1294 $("body").on("click", "#buttons-ics", function(){
1295 location.href="/cgi-bin/koha/opac-ics.pl";
1298 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1299 [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1300 $("#renewselected").submit(function(){
1302 $("input[type=checkbox]").each(function(){
1303 if($(this).is(':checked')){
1308 alert(_("Nothing has been selected. Check the box for each item you want to renew"));
1312 $("body").on("click","#renewselected_link",function(e){
1314 $("#renewselected").submit();
1316 $("body").on("click","#renewall_link, #renewall_js",function(e){
1318 $("#renewall").submit();
1320 [% END # /IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1322 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
1324 /* If JS enabled, show button, otherwise show link to redirect to a page where note can be submitted */
1325 $(".nonjs_submitnote").hide();
1327 $("input[name='note']").prop('readonly', false);
1328 $("input[name='note']").keypress(function(e){
1329 /* prevent submitting of renewselected form */
1334 $("input[name='note']").keyup(function(e){
1335 var $btn_save = $('#save_'+$(this).data('issue_id'));
1336 var origvalue = $(this).data('origvalue');
1337 var value = $(this).val();
1339 if(origvalue != value) {
1341 $btn_save.text(_("Submit changes"));
1343 $btn_save.text(_("Submit note"));
1352 $(".change_pickup").on("click", function(){
1353 var hold_id = $(this).data("hold-id");
1355 $("#change-pickup-location" + hold_id ).show();
1358 if ( $('#opac-user-clubs_panel').length ) {
1359 $('#opac-user-clubs-tab').on('click', function() {
1360 $('#opac-user-clubs_panel').text(_("Loading..."));
1361 $('#opac-user-clubs_panel').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrowernumber | html %]');
1365 $(".cancel_recall").click(function(e){
1366 return confirmDelete(_("Are you sure you want to remove this recall?"));
1369 $("body").on("click", ".btn-add-note", function(e){
1371 var title = $(this).data("title");
1372 var issue_id = $(this).data("issueid");
1373 var note = $("#note_" + issue_id ).val();
1374 var origvalue = $("#note_" + issue_id ).data("origvalue");
1375 $("#addNote").val( note );
1376 $("#addNoteIssueId").val( issue_id );
1377 $("#addNoteTitle").text( title );
1378 $("#addNoteModal").modal("show");
1381 $("#addNoteForm").on("submit", function(e){
1383 var title = $("#addNoteTitle").text();
1384 var issue_id = $("#addNoteIssueId").val();
1385 var note = $("#addNote").val();
1386 submitNote( title, issue_id, note );
1389 $("#addNoteModal").on("hidden.bs.modal", function(){
1390 $("#addNoteTitle").text("");
1391 $("#addNote").val("");
1394 $(".dismiss-message-button").click(function(e){
1395 return confirmDelete(_("Are you sure you want to dismiss this message?"));
1398 if( $("#opac-user-views .tab-pane.active").length < 1 ){
1399 $("#opac-user-views a:first").tab("show");
1403 function submitNote( title, issue_id, note ){
1404 var self = $("#addNoteModal");
1405 var notebutton = $("#save_" + issue_id );
1406 var noteinput = $("#note_" + issue_id );
1409 'action': 'issuenote',
1410 'issue_id': issue_id,
1412 csrf_token: $('meta[name="csrf-token"]').attr('content'),
1417 url: '/cgi-bin/koha/svc/checkout_notes/',
1422 .done(function(data) {
1424 if(data.status == 'saved') {
1425 $("#notesaved").removeClass("alert-error");
1426 $("#notesaved").addClass("alert-info");
1427 noteinput.data('origvalue', data.note)
1429 notebutton.text( _("Edit note" ) );
1430 $("#viewnote_" + issue_id ).text( data.note );
1431 message = "<p>" + _("Your note about %s has been saved and sent to the library.").format( em(title) ) + "</p>";
1432 message += "<p class=\"checkout_note\">" + data.note;
1433 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>";
1435 } else if(data.status == 'removed') {
1436 $("#notesaved").removeClass("alert-error");
1437 $("#notesaved").addClass("alert-info");
1438 noteinput.data('origvalue', "")
1440 notebutton.text( _("Add note") );
1441 $("#viewnote_" + issue_id ).text( data.note );
1442 message = "<p>" + _("Your note about %s was removed.").format( em(title) ) + "</p>";
1444 $("#notesaved").removeClass("alert-info");
1445 $("#notesaved").addClass("alert-error");
1446 message = "<p>" + _("Your note about %s could not be saved.").format( em(title) ) + "</p>";
1447 notebutton.text( _("Add note") );
1448 $("#viewnote_" + issue_id ).text( data.note );
1449 message += "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>";
1451 $("#notesaved").html(message);
1453 .fail(function(data) {
1454 $("#notesaved").removeClass("alert-info");
1455 $("#notesaved").addClass("alert-error");
1456 var message = "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>";
1457 $("#notesaved").html(message);
1459 .always(function() {
1461 $("#notesaved").show();
1465 function em( title ){
1466 return "<em>" + title + "</em>";
1469 var borrowernumber = "[% borrowernumber | html %]";
1471 [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
1472 [% Asset.js("lib/jquery/plugins/jquery.barrating.min.js") | $raw %]
1473 [% Asset.js("js/ratings.js") | $raw %]
1475 [% IF Koha.Preference('OverDriveCirculation') %]
1476 [% Asset.js("js/overdrive.js") | $raw %]
1478 [%- IF Koha.Preference('OverDrivePasswordRequired') -%]
1479 var OD_password_required = 1;
1481 var OD_password_required = 0;
1483 $(document).ready(function() {
1484 [% IF ( overdrive_error ) %]
1485 KOHA.OverDriveCirculation.display_error("#opac-user-overdrive_panel", "[% overdrive_error.dquote | html %]");
1488 [% IF ( overdrive_tab ) %]
1489 $("#opac-user-views a[href='#opac-user-overdrive_panel']").tab("show");
1492 $("#opac-user-overdrive_panel").each( function() {
1493 KOHA.OverDriveCirculation.display_account_details(this);