8 [% USE AuthorisedValues %]
9 [% USE AdditionalContents %]
10 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
11 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
12 [% SET OpacMySummaryNote = AdditionalContents.get( location => "OpacMySummaryNote", lang => lang, library => branchcode ) %]
14 [% SET borrower_club_enrollments = logged_in_user.get_club_enrollments %]
15 [% SET borrower_enrollable_clubs = logged_in_user.get_enrollable_clubs(1) %] <!-- 1 => OPAC -->
17 [% INCLUDE 'doc-head-open.inc' %]
18 <title>Your library home › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
19 [% INCLUDE 'doc-head-close.inc' %]
20 [% Asset.css("css/overdrive.css") | $raw %]
21 [% BLOCK cssinclude %][% END %]
23 [% INCLUDE 'bodytag.inc' bodyid='opac-user' bodyclass='scrollto' %]
24 [% INCLUDE 'masthead.inc' %]
26 [% IF Koha.Preference('AmazonAssocTag') %]
27 [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
29 [% AmazonAssocTag = '' %]
33 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
34 <ol class="breadcrumb">
35 <li class="breadcrumb-item">
36 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
38 <li class="breadcrumb-item">
39 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
41 <li class="breadcrumb-item active">
42 <a href="#" aria-current="page">Your summary</a>
45 </nav> <!-- /#breadcrumbs -->
47 <div class="container-fluid">
49 <div class="col col-lg-2 order-2 order-lg-1">
51 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
54 <div class="col-md-12 col-lg-10 order-1 order-lg-2">
55 <div id="userdetails" class="maincontent">
59 [% INCLUDE 'opac-note.inc' %]
61 <p>Hello, [% INCLUDE 'patron-title.inc' patron = logged_in_user %]
63 <a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here if you're not [% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a></p>
65 [% IF ( patronupdate ) %]<div class="alert alert-info"><h2>Thank you!</h2><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
68 <div class="alert alert-info">
70 <p>One or more holds were not placed due to following errors:</p>
72 [% FOREACH fail IN failed_holds.split('\|') %]
76 <span>Item is damaged</span>
77 [% CASE 'ageRestricted' %]
78 <span>The record and its items are age restricted</span>
79 [% CASE 'tooManyHoldsForThisRecord' %]
80 <span>You have exceeded the number of concurrent holds for this record</span>
81 [% CASE 'tooManyReservesToday' %]
82 <span>You've reached your daily holds limit</span>
83 [% CASE 'tooManyReserves' %]
84 <span>You have too many holds already</span>
85 [% CASE 'notReservable' %]
86 <span>Not holdable</span>
87 [% CASE 'cannotReserveFromOtherBranches' %]
88 <span>You are from a different library</span>
89 [% CASE 'branchNotInHoldGroup' %]
90 <span>Holds are not allowed from your library</span>
91 [% CASE 'itemAlreadyOnHold' %]
92 <span>You already have a hold for this item</span>
93 [% CASE 'cannotBeTransferred' %]
94 <span>Cannot be transferred to pickup library</span>
95 [% CASE 'pickupNotInHoldGroup' %]
96 <span>The chosen pickup location is not allowed</span>
97 [% CASE 'noReservesAllowed' %]
98 <span>No holds are allowed on this item</span>
99 [% CASE 'libraryNotPickupLocation' %]
100 <span>Library is not a valid pickup location</span>
101 [% CASE 'no_valid_pickup_location' %]
102 <span>No valid pickup location</span>
103 [% CASE 'notforloan' %]
104 <span>Not for loan</span>
105 [% CASE 'items_available' %]
106 <span>There are items available in the library, please visit to check them out</span>
107 [% CASE 'not_placed' %]
108 <span>Error when placing hold, please report this to the library</span>
110 <span>Error: [% fail | html %]</span>
118 [% IF ( borrower.blockedonfines && Koha.Preference('OPACHoldRequests') ) %]
119 <div class="alert alert-warning" id="blockedonfines">
120 <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>
124 [% IF ( borrower.warndeparture ) %]
125 <div class="alert alert-warning" id="warndeparture">
126 <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>
127 [% IF ( borrower.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your library card expires.</span>[% END %]
131 [% IF ( borrower.warnexpired ) %]
132 <div class="alert alert-warning" id="warnexpired">
133 <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>
137 [% IF ( RENEW_ERROR ) %]
138 <div class="alert alert-warning">
139 <strong>Please note:</strong>
140 Your loan renewal failed because of the following reason(s):
142 [% FOREACH error IN RENEW_ERROR.split('\|') %]
143 [% IF error == 'card_expired' %]
144 <li>Your account has expired. Please contact the library for more information.</li>
145 [% ELSIF error == 'too_many' %]
146 <li>You have renewed this item the maximum number of times allowed.</li>
147 [% ELSIF error == 'too_unseen' %]
148 <li>You have renewed this item the maximum number of consecutive times without it being seen by the library.</li>
149 [% ELSIF error == 'too_soon' %]
150 <li>It is too soon after the checkout date for this item to be renewed.</li>
151 [% ELSIF error == 'on_reserve' %]
152 <li>This item is on hold for another borrower.</li>
153 [% ELSIF error == 'item_denied_renewal' %]
154 <li>Item renewal is not allowed.</li>
155 [% ELSIF error == 'item_issued_to_other_patron'%]
156 <li>Item already issued to other borrower.</li>
157 [% ELSIF error == 'auto_too_soon' %]
158 <li>This item is scheduled for auto renewal.</li>
165 [% IF ( patron_flagged ) %]
166 <div class="alert alert-warning">
168 [% IF ( userdebarred ) %]
169 [% IF ( discharge_available ) %]
171 <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>
174 <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen.
175 [% IF ( borrower.debarredcomment ) %]
177 <span id="userdebarred_comment">
179 [% IF borrower.debarredcomment.search('OVERDUES_PROCESS') %]
180 Restriction added by overdues process [% borrower.debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
182 [% borrower.debarredcomment | html_line_break %]
187 [% IF ( borrower.userdebarreddate && debarred_date != '9999-12-31' ) %]
189 <span id="userdebarred_date">[% borrower.userdebarreddate | $KohaDates %]</span>
192 <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>
195 [% IF ( borrower.gonenoaddress ) %]
196 <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date contact information. Please contact the library.
197 <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>
198 [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %]
201 [% IF ( borrower.lost ) %]
202 <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>
204 [% IF ( renewal_blocked_fines.defined ) && ( OpacRenewalAllowed ) %]
205 <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 %]
209 [% END # / IF patron_flagged %]
212 <div class="alert alert-info" id="savings">
213 Congratulations, you have saved a total of [% savings | $Price with_symbol => 1 %] by using the library.
217 <div class="alert alert-info" id="notesaved" style="display:none;"></div>
218 [% IF ( OpacMySummaryNote ) %]
219 [% PROCESS koha_news_block news => OpacMySummaryNote %]
222 [% IF Koha.Preference('AllowPatronToControlAutorenewal') %]
223 <form id="autorenewal_option" action="/cgi-bin/koha/opac-user.pl" method="post">
224 <legend class="sr-only">Auto-renewal</legend>
225 <label for="yes-autorenew_checkouts">
228 [% IF ( borrower.autorenew_checkouts ) %]
229 <label class="radio inline" for="yes-autorenew_checkouts">
231 <input type="radio" id="yes-autorenew_checkouts" name="borrower_autorenew_checkouts" value="1" checked="checked" />
234 <label class="radio inline" for="no-autorenew_checkouts">
236 <input type="radio" id="no-autorenew_checkouts" name="borrower_autorenew_checkouts" value="0" />
239 <label class="radio inline" for="yes-autorenew_checkouts">
241 <input type="radio" id="yes-autorenew_checkouts" name="borrower_autorenew_checkouts" value="1" />
243 <label class="radio inline" for="no-autorenew_checkouts">
245 <input type="radio" id="no-autorenew_checkouts" name="borrower_autorenew_checkouts" value="0" checked="checked" />
248 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
249 <input type="hidden" name="update_arc" value="1" />
250 <input type="submit" value="Update auto-renewal preference" />
254 <div id="opac-user-views" class="toptabs">
255 <ul class="nav nav-tabs" role="tablist">
256 <li class="nav-item" role="presentation">
257 <a class="nav-link active" id="opac-user-checkouts-tab" data-toggle="tab" role="tab" aria-controls="opac-user-checkouts" aria-selected="true" href="#opac-user-checkouts">Checked out ([% issues_count | html %])</a>
260 <li class="nav-item" role="presentation">
261 <a class="nav-link" id="opac-user-relative-issues-tab" data-toggle="tab" role="tab" aria-controls="opac-user-relative-issues" aria-selected="false" href="#opac-user-relative-issues">Relatives' checkouts</a>
264 [% IF ( overdues_count ) %]
265 <li class="nav-item" role="presentation">
266 <a class="nav-link" id="opac-user-overdues-tab" data-toggle="tab" role="tab" aria-controls="opac-user-overdues" aria-selected="false" href="#opac-user-overdues">Overdue ([% overdues_count | html %])</a>
269 [% IF ( OPACFinesTab ) %]
270 [% IF ( amountoutstanding > 0 ) %]
271 <li class="nav-item" role="presentation">
272 <a class="nav-link" id="opac-user-fines-tab" data-toggle="tab" role="tab" aria-controls="opac-user-fines" aria-selected="false" href="#opac-user-fines">Charges ([% amountoutstanding | $Price %])</a>
275 [% IF ( amountoutstanding < 0 ) %]
276 <li class="nav-item" role="presentation">
277 <a class="nav-link" id="opac-user-fines-tab" data-toggle="tab" role="tab" aria-controls="opac-user-fines" aria-selected="false" href="#opac-user-fines">Credits ([% amountoutstanding * -1 | $Price %])</a>
280 [% IF relatives_with_fines %]
281 <li class="nav-item" role="presentation">
282 <a class="nav-link" id="opac-user-relative-fines-tab" data-toggle="tab" role="tab" aria-controls="opac-user-relative-fines" aria-selected="false" href="#opac-user-relative-fines">Relatives' charges</a>
287 [% IF borrower_club_enrollments.count || borrower_enrollable_clubs.count %]
288 <li class="nav-item" role="presentation">
289 <a class="nav-link" data-toggle="tab" role="tab" aria-controls="opac-user-clubs" aria-selected="false" id="opac-user-clubs-tab-link" href="#opac-user-clubs">
290 Clubs ([% borrower_club_enrollments.count || 0 | html %]/[% borrower_enrollable_clubs.count || 0 | html %])
295 [% IF ( RESERVES.count ) %]
296 <li class="nav-item" role="presentation">
297 <a class="nav-link" id="opac-user-holds-tab" data-toggle="tab" role="tab" aria-controls="opac-user-holds" aria-selected="false" href="#opac-user-holds">Holds ([% RESERVES.count | html %])</a>
300 [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
301 <li class="nav-item" role="presentation">
302 <a class="nav-link" id="opac-user-recalls-tab" data-toggle="tab" role="tab" aria-controls="opac-user-recalls" aria-selected="false" href="#opac-user-recalls">Recalls ([% RECALLS.count | html %])</a>
305 [% IF Koha.Preference('ArticleRequests') %]
306 <li class="nav-item" role="presentation">
307 <a class="nav-link" id="opac-user-article-requests-tab" data-toggle="tab" role="tab" aria-controls="opac-user-article-requests" aria-selected="false" href="#opac-user-article-requests">Article requests ([% current_article_requests.size || 0 | html %])</a>
310 [% IF ( OverDriveCirculation ) %]
311 <li class="nav-item" role="presentation">
312 <a class="nav-link" id="opac-user-overdrive-tab" data-toggle="tab" role="tab" aria-controls="opac-user-overdrive" aria-selected="false" href="#opac-user-overdrive">OverDrive account</a>
316 <div class="tab-content">
318 <div id="opac-user-overdrive" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-overdrive-tab">
320 <div id="opac-user-checkouts" class="tab-pane active" role="tabpanel" aria-labelledby="opac-user-checkouts-tab">
321 [% IF ( issues_count ) %]
322 <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
323 <legend class="sr-only">Renew selected</legend>
324 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]">
325 <input type="hidden" name="from" value="opac_user" />
326 <table id="checkoutst" class="table table-bordered table-striped">
327 <caption>[% issues_count | html %] Item(s) checked out</caption>
330 [% IF ( JacketImages ) %]<th class="nosort"> </th>[% END %]
331 <th class="anti-the">Title</th>
333 <th class="psort">Due</th>
334 [% UNLESS ( item_level_itypes ) %]
337 [% IF ( show_barcode ) %]
341 [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
344 [% IF ( OPACFinesTab ) %]
347 [% IF ( OPACMySummaryHTML ) %]
348 <th class="nosort">Links</th>
350 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
351 <th class="hidden">Checkout note</th>
352 <th id="checkout-notes" class="nosort noExport" title="Use this to report any problems with your currently checked out items">Report a problem</th>
358 [% FOREACH ISSUE IN ISSUES %]
359 [% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
360 [% IF ( JacketImages ) %]
361 <td class="jacketcell">
362 [% IF ( OPACAmazonCoverImages ) %]
363 [% IF ( ISSUE.normalized_isbn ) %]
364 <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>
366 <a href="#"><span class="no-image">No cover image available</span></a>
370 [% IF ( GoogleJackets ) %]
371 [% IF ( ISSUE.normalized_isbn ) %]
372 <div style="display:block;" title="Click to view in Google Books" class="[% ISSUE.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
374 <a href="http://books.google.com/books?q=[% ISSUE.title |url %]"><span class="no-image">No cover image available</span></a>
378 [% IF ( BakerTaylorEnabled ) %]
379 [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %]
381 <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
383 <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
387 [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
388 [% SET custom_cover_image_url = ISSUE.biblio_object.custom_cover_image_url %]
389 [% IF custom_cover_image_url %]
390 <a class="custom_cover_image" href="[% custom_cover_image_url | url %]"><img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a>
394 [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
395 <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" />
398 [% END # / IF JacketImages %]
401 [% INCLUDE 'biblio-title.inc' biblio=ISSUE link=> 1 %]
402 [% IF ( ISSUE.enumchron ) %] [% ISSUE.enumchron | html %][% END %]
404 [% IF ( ISSUE.onsite_checkout ) %] <em class="onsite_checkout">(On-site checkout)</em>[% END %]
406 [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
407 [% INCLUDE 'user-star-ratings.inc' item=ISSUE %]
410 [% IF ( ISSUE.recall ) %]<br><i>This item has been recalled. Please return by the new due date.</i>[% END %]
413 <td class="author">[% ISSUE.author | html %]</td>
414 [% IF ( ISSUE.overdue ) %]
415 <td class="date_due overdue" data-order="[% ISSUE.date_due | html %]">
416 <span class="tdlabel">Date due:</span>
417 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
420 <td class="date_due" data-order="[% ISSUE.date_due | html %]">
421 <span class="tdlabel">Date due:</span>
422 [% ISSUE.date_due | $KohaDates as_due_date => 1 %]
425 [% UNLESS ( item_level_itypes ) %]
427 <span class="tdlabel">Item type:</span>
428 [% IF ( ISSUE.imageurl && !Koha.Preference('OpacNoItemTypeImages') ) %]
429 <img src="[% ISSUE.imageurl | html %]" title="[% ISSUE.description | html %]" alt="[% ISSUE.description | html %]" />
430 [% END %] <span class="itypetext">[% ISSUE.description | html %]</span>
433 [% IF ( show_barcode ) %]
435 <span class="tdlabel">Barcode:</span>
436 [% ISSUE.barcode | html %]
440 <span class="tdlabel">Call number:</span>
441 [% ISSUE.itemcallnumber | html %]
443 [% IF ( OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
444 [% IF ( ISSUE.status && canrenew ) %]
445 <td class="renew" data-order="[% ISSUE.renewsleft | html %]">
447 <td class="renew" data-order="0">
449 [% IF ISSUE.renewed %]<span class="blabel label-success">Renewed!</span><br />[% END %]
450 [% IF ( ISSUE.status ) %]
451 [% IF ( canrenew ) %]
452 <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>
454 [% IF ISSUE.renewalfee > 0 %]
455 <span class="renewalfee label label-warning">Fee for item type '[% ItemTypes.GetDescription( ISSUE.renewalitemtype) | html %]': [% ISSUE.renewalfee | $Price %]</span>
457 [% IF ISSUE.itemtype_object.rentalcharge_daily > 0 %]
458 <span class="renewalfee label label-warning">[% ISSUE.itemtype_object.rentalcharge_daily | $Price %] per day</span>
460 [% IF ISSUE.itemtype_object.rentalcharge_hourly > 0 %]
461 <span class="renewalfee label label-warning">[% ISSUE.itemtype_object.rentalcharge_hourly | $Price %] per hour</span>
463 <span class="renewals">(
464 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
465 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
466 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
469 [% ELSIF ( ISSUE.on_reserve ) %]
470 <span class="usr-msg no-renew-hold">Not renewable <span class="renewals">(on hold)</span></span>
471 [% ELSIF ( ISSUE.too_many ) %]
472 <span class="usr-msg no-renew-too-many">Not renewable</span>
473 [% ELSIF ( ISSUE.too_unseen ) %]
474 <span class="usr-msg no-renew-unseen">Item must be renewed at the library. [% ISSUE.renewsleft | html %] renewals remaining</span>
475 [% ELSIF ( ISSUE.norenew_overdue ) %]
476 <span class="usr-msg no-renew-overdue">Not allowed <span class="renewals">(overdue)</span></span>
477 [% ELSIF ( ISSUE.auto_too_late ) %]
478 <span class="usr-msg no-renew-too-late">No longer renewable</span>
479 [% ELSIF ISSUE.auto_too_much_oweing %]
480 <span class="usr-msg auto-renew-fines">Automatic renewal failed, you have unpaid fines.</span>
481 <span class="renewals">(
482 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
483 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
484 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
487 [% ELSIF ISSUE.auto_account_expired %]
488 <span class="usr-msg auto-renew-expired">Automatic renewal failed, your account is expired.</span>
489 <span class="renewals">(
490 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
491 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
492 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
495 [% ELSIF ( ISSUE.too_soon ) %]
496 <span class="usr-msg no-renewal-before">No renewal before [% ISSUE.soonestrenewdate | $KohaDates as_due_date => 1 %]</span>
497 <span class="renewals">(
498 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
499 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
500 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
503 [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
504 <span class="usr-msg automatic-renewal">Automatic renewal</span>
505 <span class="renewals">(
506 [% ISSUE.renewsleft | html %] of [% ISSUE.renewsallowed | html %] renewals remaining
507 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
508 / [% ISSUE.unseenleft | html %] of [% ISSUE.unseenallowed | html %] renewals left before the item must be seen by the library
511 [% ELSIF ( ISSUE.item_denied_renewal ) %]
516 [% IF ( OPACFinesTab ) %]
518 <span class="tdlabel">Fines:</span>
519 [% IF ( ISSUE.charges ) %]
520 <span>Yes (Item overdue or lost)</span>
521 [% ELSIF ( ISSUE.rentalfines ) %]
522 <span>Yes (Rental fees)</span>
528 [% IF ( OPACMySummaryHTML ) %]
529 <td class="links">[% ISSUE.MySummaryHTML | $raw %]</td>
531 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
533 [% ISSUE.note | html %]
536 <div id="viewnote_[% ISSUE.issue_id | html %]">
537 [% ISSUE.note | html %]
539 <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 %]">
540 [% IF ( ISSUE.note ) -%]
541 <span>Edit note</span>
543 <span>Add note</span>
546 <input type="hidden" id="note_[% ISSUE.issue_id | html %]" name="note" value="[% ISSUE.note | html %]" data-origvalue="[% ISSUE.note | html %]" />
551 [% END # /FOREACH ISSUES %]
554 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
555 <input type="submit" class="btn btn-primary" value="Renew selected" />
556 <button type="button" id="renewall_js" class="btn btn-primary">Renew all</button>
560 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( logged_in_user.is_expired && logged_in_user.category.effective_BlockExpiredPatronOpacActions ) ) %]
561 <form id="renewall" class="js-hide" action="/cgi-bin/koha/opac-renew.pl" method="post">
562 <legend class="sr-only">Renew</legend>
563 <input type="hidden" name="from" value="opac_user" />
564 <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
565 [% FOREACH ISSUE IN ISSUES %]
566 [% IF ISSUE.status %]
567 <input type="hidden" name="item" value="[% ISSUE.itemnumber | html %]" />
570 <input type="submit" class="btn btn-primary" value="Renew all" />
574 <table class="table table-bordered table-striped">
575 <caption class="sr-only">Checked out</caption>
576 <tr><td>You have nothing checked out</td></tr>
578 [% END # IF issues_count %]
580 <!-- Add note modal -->
581 <div class="modal" id="addNoteModal" tabindex="-1" aria-labelledby="addNoteLabel" aria-hidden="true">
582 <div class="modal-dialog">
583 <form action="#" id="addNoteForm">
584 <div class="modal-content">
585 <div class="modal-header">
586 <h5 class="modal-title" id="addNoteLabel">Report a problem</h5>
587 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
588 <span aria-hidden="true">×</span>
591 <div class="modal-body" id="addNoteBody">
592 <h6 id="addNoteTitle"></h6>
593 <input type="hidden" id="addNoteIssueId" name="issue_id" value="" />
594 <textarea name="note" id="addNote" rows="4"></textarea>
595 <div class="hint">Your note will be shown to the librarian when the item is checked in.</div>
597 <div class="modal-footer">
598 <button type="submit" class="btn btn-primary">Submit note</button>
599 <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
606 </div> <!-- / .opac-user-checkouts -->
608 [% IF borrower_club_enrollments.count || borrower_enrollable_clubs.count %]
609 <div id="opac-user-clubs" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-clubs-tab-link">
614 [% IF ( OPACFinesTab ) %]
616 [% IF ( amountoutstanding > 0 ) %]
617 <div id="opac-user-fines" class="tab-pane" id="home" role="tabpanel" aria-labelledby="opac-user-fines-tab">
618 <table class="table table-bordered table-striped">
619 <caption>Charges</caption>
620 <thead><tr><th colspan="2">Amount</th></tr></thead>
623 <td>You currently owe fines and charges amounting to:</td>
624 <td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding | $Price %]</a></td>
631 [% IF ( amountoutstanding < 0 ) %]
632 <div id="opac-user-fines" class="tab-pane" id="home" role="tabpanel" aria-labelledby="opac-user-fines-tab">
633 <table class="table table-bordered table-striped">
634 <caption>Credits</caption>
635 <thead><tr><th colspan="2">Amount</th></tr></thead>
638 <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% amountoutstanding * -1 | $Price %]</a></td>
645 [% IF relatives_with_fines %]
646 <div id="opac-user-relative-fines" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-relative-fines-tab">
647 <table class="table table-bordered table-striped">
648 <caption>Fines and charges</caption>
651 <th colspan="2">Amount</th>
655 [% FOREACH r IN relatives_with_fines %]
657 <td>[% r.firstname | html %] [% r.surname | html %] currently owes fines and charges amounting to:</td>
658 <td><a href="/cgi-bin/koha/opac-account.pl#g[% r.id | uri %]">[% r.account.balance | $Price %]</a></td>
665 [% END # / OPACFinesTab %]
668 <div id="opac-user-relative-issues" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-relative-issues-tab">
669 <table id="opac-user-relative-issues-table" class="table table-bordered table-striped">
670 <caption class="sr-only">Relatives' checkouts</caption>
673 <th class="anti-the">Title</th>
677 <th class="psort">Relative</th>
683 [% FOREACH r IN relatives %]
684 [% FOREACH c IN r.checkouts %]
687 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% c.item.biblio.biblionumber | uri %]">
688 [% c.item.biblio.title | html %][% IF ( c.item.enumchron ) %] [% c.item.enumchron | html %][% END %]
693 [% c.date_due | $KohaDates %]
697 [% c.item.barcode | html %]
701 [% c.item.itemcallnumber | html %]
705 [% r.firstname | html %] [% r.surname | html %]
716 [% IF ( overdues_count ) %]
717 <div id="opac-user-overdues" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-overdues-tab">
718 <table id="overduest" class="table table-bordered table-striped">
719 <caption>Overdues <span class="count">([% overdues_count | html %] total)</span></caption>
720 <!-- OVERDUES TABLE ROWS -->
723 [% IF ( JacketImages ) %]<th class="nosort"> </th>[% END %]
724 <th class="anti-the">Title</th>
725 [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
726 [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
728 <th class="psort">Due</th>
729 [% IF ( OpacRenewalAllowed ) %]
730 <th class="nosort">Renew</th>
732 [% IF ( OPACFinesTab ) %]
739 [% FOREACH OVERDUE IN OVERDUES %]
741 [% IF ( JacketImages ) %]
742 <td class="jacketcell">
743 [% IF ( OPACAmazonCoverImages ) %]
744 [% IF ( OVERDUE.normalized_isbn ) %]
745 <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>
747 <a href="#"><span class="no-image">No cover image available</span></a>
751 [% IF ( GoogleJackets ) %]
752 [% IF ( OVERDUE.normalized_isbn ) %]
753 <div style="display:block;" title="Click to view in Google Books" class="[% OVERDUE.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
755 <a href="http://books.google.com/books?q=[% OVERDUE.title |url %]"><span class="no-image">No cover image available</span></a>
759 [% IF ( BakerTaylorEnabled ) %]
760 [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %]
762 <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
764 <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
768 [% IF ( SyndeticsCoverImages ) %]
769 <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" />
772 [% END # /IF jacketcell %]
775 [% INCLUDE 'biblio-title.inc' biblio=OVERDUE link=> 1 %]
776 <span class="item-details">[% OVERDUE.author | html %]</span>
779 [% UNLESS ( item_level_itypes ) %]
781 [% IF ( OVERDUE.imageurl && !Koha.Preference('OpacNoItemTypeImages') ) %]
782 <img src="[% OVERDUE.imageurl | html %]" title="[% OVERDUE.description | html %]" alt="[% OVERDUE.description | html %]" />
783 [% END %] [% OVERDUE.description | html %]
786 [% IF ( show_barcode ) %]
788 <span class="tdlabel">Barcode:</span>
789 [% OVERDUE.barcode | html %]
793 <span class="tdlabel">Call number:</span>
794 [% OVERDUE.itemcallnumber | html %]
796 <td data-order="[% OVERDUE.date_due | html %]">
797 <span class="tdlabel">Date due:</span>
798 [% OVERDUE.date_due | $KohaDates as_due_date => 1 %]
800 [% IF ( OpacRenewalAllowed ) %]
802 [% IF ( OVERDUE.debarred ) %]
804 [% ELSIF ( OVERDUE.status ) %]
805 [% IF ( canrenew ) %]
806 <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&item=[% OVERDUE.itemnumber | uri %]&bornum=[% OVERDUE.borrowernumber | uri %]">Renew</a>
808 <span class="renewals">(
809 [% OVERDUE.renewsleft | html %] of [% OVERDUE.renewsallowed | html %] renewals remaining
810 [% IF Koha.Preference('UnseenRenewals') && ISSUE.unseenallowed %]
811 / [% OVERDUE.unseenleft | html %] of [% OVERDUE.unseenallowed | html %] renewals left before the item must be seen by the library
814 [% ELSIF ( OVERDUE.norenew_overdue ) %]
815 Not allowed <span class="renewals">(overdue)</span>
816 [% ELSIF ( OVERDUE.onreserve ) %]
819 <span>No renewals left</span>
823 [% IF ( OPACFinesTab ) %]
825 <span class="tdlabel">Fines:</span>
826 [% IF ( OVERDUE.charges ) %]
838 </div> <!-- / #opac-user-overdues -->
839 [% END # /overdues_count %]
841 [% PROCESS 'holds-table.inc' HOLDS = RESERVES, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds %]
843 [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
844 <div id="opac-user-recalls" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-recalls-tab">
845 <table id="recalls-table" class="table table-bordered table-striped">
846 <caption>Recalls <span class="count">([% RECALLS.count | html %])</span></caption>
849 <th class="anti-the">Title</th>
850 <th class="psort">Placed on</th>
852 <th>Pickup location</th>
854 <th class="nosort"> </th>
859 [% FOREACH RECALL IN RECALLS %]
862 [% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio link=> 1 %]
863 [% IF RECALL.item_level %]<p class="hint">Item recalled: [% RECALL.item.barcode | html %]</p>[% END %]
865 <td class="recalldate" data-order="[% RECALL.created_date | html %]">
866 <span title="[% RECALL.created_date | html %]">
867 <span class="tdlabel">Recall date:</span>
868 [% RECALL.created_date | $KohaDates %]
871 <td class="expirationdate" data-order="[% RECALL.expiration_date | html %]">
872 [% IF ( RECALL.expiration_date ) %]
873 <span title="[% RECALL.expiration_date | html %]">
874 <span class="tdlabel">Expiration:</span>
875 [% RECALL.expiration_date | $KohaDates %]
878 <span title="0000-00-00">
879 <span class="tdlabel">Expiration:</span>
885 <span class="tdlabel">Pick up location:</span>
886 [% RECALL.library.branchname | html %]
889 <span class="tdlabel">Status:</span>
890 [% IF ( RECALL.requested ) %]
891 <span>Requested</span>
892 [% ELSIF ( RECALL.overdue ) %]
893 <span>Overdue to be returned</span>
894 [% ELSIF ( RECALL.in_transit ) %]
895 <span>In transit to [% RECALL.library.branchname | html %]</span>
896 [% ELSIF ( RECALL.waiting ) %]
897 <span>Ready for pickup</span>
900 <td class="cancelrecall">
901 [% IF ( RECALL.requested or RECALL.overdue ) %]
902 <form action="/cgi-bin/koha/opac-recall.pl" method="post">
903 <input type="hidden" name="op" value="cancel">
904 <input type="hidden" name="recall_id" value="[% RECALL.id | html %]">
905 <input type="hidden" name="biblionumber" value="[% RECALL.biblio_id | html %]">
906 <button type="submit" name="submit" class="btn btn-sm btn-danger cancel_recall"><i class="fa fa-times" aria-hidden="true"></i> Cancel</button>
916 [% END # / # RECALLS.count %]
918 [% IF Koha.Preference('ArticleRequests') %]
919 <div id="opac-user-article-requests" class="tab-pane" role="tabpanel" aria-labelledby="opac-user-article-requests-tab">
920 [% IF current_article_requests.size %]
921 <table id="article-requests-table" class="table table-bordered table-striped">
922 <caption>Article requests <span class="count"></span></caption>
925 <th class="anti-the article-request-record-title">Record title</th>
926 <th class="psort article-request-created-on">Placed on</th>
927 <th class="anti-the article-request-title">Title</th>
928 <th class="article-request-author">Author</th>
929 <th class="article-request-volume">Volume</th>
930 <th class="article-request-issue">Issue</th>
931 <th class="article-request-date">Date</th>
932 <th class="article-request-toc" title="Table of contents">TOC</th>
933 <th class="article-request-pages">Pages</th>
934 <th class="article-request-chapters">Chapters</th>
935 <th class="article-request-patron-notes">Notes</th>
936 <th class="article-request-format">Format</th>
937 <th class="article-request-status">Status</th>
938 <th class="article-request-branchcode">Pickup library</th>
939 <th class="nosort article-request-cancel"> </th>
945 [% FOREACH ar IN current_article_requests %]
947 <td class="article-request-record-title">
948 [% INCLUDE 'biblio-title.inc' biblio=ar.biblio link=> 1 %]
949 [% ar.item.enumchron | html %]
950 [% ar.biblio.author | html %]
951 [% IF ar.itemnumber %] <em>(only [% ar.item.barcode | html %])</em>[% END %]
954 <td class="article-request-created_on">
955 [% ar.created_on | $KohaDates %]
958 <td class="article-request-title">
959 [% ar.title | html %]
962 <td class="article-request-author">
963 [% ar.author | html %]
966 <td class="article-request-volume">
967 [% ar.volume | html %]
970 <td class="article-request-issue">
971 [% ar.issue | html %]
974 <td class="article-request-date">
978 <td class="article-request-toc">
979 [% IF ar.toc_request %]Yes[% END %]
982 <td class="article-request-pages">
983 [% ar.pages | html %]
986 <td class="article-request-chapters">
987 [% ar.chapters | html %]
990 <td class="article-request-patron-notes">
991 [% ar.patron_notes | html %]
994 <td class="article-request-format">[% IF ar.format == 'PHOTOCOPY' %]<span>Copy</span>[% ELSIF ar.format == 'SCAN' %]<span>Scan</span>[% END %]</td>
996 <td class="article-request-status">
997 [% IF ar.status == 'PENDING' %]
999 [% ELSIF ar.status == 'PROCESSING' %]
1000 <span>Processing</span>
1001 [% ELSIF ar.status == 'REQUESTED' %]
1003 [% ELSIF ar.status == 'COMPLETED' %]
1004 <span>Completed</span>
1005 [% ELSIF ar.status == 'CANCELED' %]
1006 <span>Canceled</span>
1010 <td class="article-request-branchcode">
1011 [% ar.branch.branchname | html %]
1014 <td class="article-request-cancel">
1015 <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>
1023 <table class="table table-bordered table-striped">
1024 <caption class="sr-only">Article requests</caption>
1025 <tr><td>You have no article requests currently.</td></tr>
1027 [% END # IF current_article_requests.size %]
1028 </div> <!-- / #opac-user-article-requests -->
1030 </div> <!-- /.tab-content -->
1031 </div> <!-- /#opac-user-views -->
1032 </div> <!-- /#userdetails -->
1033 </div> <!-- /.col-10 -->
1034 </div> <!-- /.row -->
1035 </div> <!-- /.container-fluid -->
1036 </div> <!-- /#main -->
1038 [% # hold suspend modal form %]
1039 <div id="suspendHoldModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="suspendModalLabel" aria-hidden="true" data-focus="false">
1040 <div class="modal-dialog">
1041 <div class="modal-content">
1042 <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
1043 <div class="modal-header">
1044 [% IF HOLD.suspend %]
1045 <h5 class="modal-title" id="suspendModalLabel">Resume hold</h5>
1047 <h5 class="modal-title" id="suspendModalLabel">Suspend hold</h5>
1049 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
1050 <span aria-hidden="true">x</span>
1053 <div class="modal-body">
1054 <h6 id="suspendHoldTitle"></h6>
1055 <input type="hidden" name="reserve_id" id="suspendHoldReserveId" value="" />
1056 <label for="suspend_untilDate">Suspend until:</label>
1057 <input type="text" name="suspend_until" id="suspend_untilDate" size="10" />
1058 [% INCLUDE 'date-format.inc' %]
1059 <p><a href="#" class="clear-flatpickr" data-fp="suspend_untilDate">Clear date to suspend indefinitely</a></p>
1061 <div class="modal-footer">
1062 <button class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Suspend</button>
1063 <button data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-times" aria-hidden="true"></i> Do not suspend</button>
1066 </div> <!-- /.modal-content -->
1067 </div> <!-- /.modal-dialog -->
1068 </div> <!-- /#suspendModal -->
1070 [% IF ( OverDriveCirculation ) %]
1071 [% INCLUDE 'overdrive-checkout.inc' %]
1072 [% IF ( Koha.Preference('OverDrivePasswordRequired') ) %]
1073 [% INCLUDE 'overdrive-login.inc' %]
1077 [% INCLUDE 'opac-bottom.inc' %]
1078 [% BLOCK jsinclude %]
1079 [% INCLUDE 'calendar.inc' %]
1080 [% INCLUDE 'datatables.inc' %]
1082 var AR_CAPTION_COUNT = _("(%s total)");
1085 function tableInit( tableId ){
1086 if( tableId == "checkoutst" ){
1087 $(".dt-buttons").append("<button type=\"button\" class=\"dt-button buttons-ical\" id=\"buttons-ics\">iCal</button> ");
1088 [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1089 $(".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>");
1093 $(document).ready(function(){
1094 $('#opac-user-article-requests caption .count').html(AR_CAPTION_COUNT.format('[% current_article_requests.size | html %]'));
1096 $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
1098 $(".btn-delete-hold").on("click", function(e){
1100 var hold_title = $(this).data("title");
1101 var reserve_id = $(this).data("reserve_id");
1102 confirmModal( hold_title, _("Are you sure you want to cancel this hold?"), _("Yes, cancel hold"), _("No, do not cancel hold"), function( result ){
1103 $("#bootstrap-confirm-box-modal").remove()
1105 $("#delete_hold_" + reserve_id ).submit();
1111 $(".btn-req-delete-hold").on("click", function(e){
1113 var hold_title = $(this).data("title");
1114 var reserve_id = $(this).data("reserve_id");
1115 confirmModal( hold_title, _("Are you sure you want to request cancelling this hold?"), _("Yes"), _("No"), function( result ){
1116 $("#bootstrap-confirm-box-modal").remove()
1118 $("#req_cancel_hold_" + reserve_id ).submit();
1124 $(".btn-delete-article-request").on("click", function(e){
1126 var article_request = $(this).data("title");
1127 var article_request_id = $(this).data("article-request_id");
1129 var doCancel = function( result ){
1130 $("#bootstrap-confirm-box-modal").remove();
1134 url: '/api/v1/public/patrons/'+borrowernumber+'/article_requests/'+article_request_id+'?cancellation_reason=OPAC',
1135 success: function( data ) {
1136 row.parents('tr').hide({
1138 complete: function() {
1139 var ar_tab = $('a[href="#opac-user-article-requests"');
1140 var ar_table = $('#article-requests-table');
1141 var ar_length = $('tbody tr:visible', ar_table).length;
1142 var ar_count = $('caption .count', ar_table);
1144 ar_tab.html(ar_tab.html().replace(/\(\d+\)/, '('+ar_length+')'));
1145 ar_count.html(AR_CAPTION_COUNT.format(ar_length));
1152 confirmModal( article_request, _("Are you sure you want to cancel this article request?"), _("Yes, cancel article request"), _("No, do not cancel article request"), doCancel);
1156 /* We initiate this flatpickr instance here so that we can use the variable later */
1157 var suspend_until_date = $("#suspend_untilDate").flatpickr({
1161 $(document).on("click", ".suspend_hold", function(e){
1163 var title = $(this).data("title");
1164 var reserve_id = $(this).data("reserve_id");
1165 $("#suspendHoldReserveId").val( reserve_id );
1166 $("#suspendHoldTitle").html( "<em>" + title + "</em>" );
1167 $("#suspendHoldModal").modal("show");
1170 $("#suspendHoldModal").on("hidden.bs.modal", function(){
1171 $("#suspendHoldTitle").html("");
1172 $("#suspendHoldReserveId").val("");
1173 suspend_until_date.clear();
1176 $("#suspend_all_submit").on("click", function(e){
1178 var title = _("Are you sure you want to suspend all holds?");
1179 var body = _("All holds will be suspended.");
1180 confirmModal( body, title, _("Yes, suspend all holds"), "", function( result ){
1181 $("#bootstrap-confirm-box-modal").remove()
1183 $("#suspend_all_holds").submit();
1189 $("#resume_all_submit").on("click", function(e){
1191 var title = _("Are you sure you want to resume all suspended holds?");
1192 var body = _("All holds will resume.");
1193 confirmModal( body, title, _("Yes, resume all holds"), _("No, do not resume holds"), function( result ){
1194 $("#bootstrap-confirm-box-modal").remove()
1196 $("#resume_all_holds").submit();
1202 var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table");
1203 dTables.each(function(){
1204 var thIndex = $(this).find("th.psort").index();
1205 $(this).on("init.dt", function() {
1206 tableInit( $(this).attr("id") );
1208 .dataTable($.extend(true, {}, dataTablesDefaults, {
1209 "sorting" : [[ thIndex, 'asc' ]],
1210 "dom": '<"top"<"table_entries"><"table_controls"fB>>t',
1212 { "targets": [ "nosort" ],"sortable": false,"searchable": false },
1213 { "type": "anti-the", "targets" : [ "anti-the" ] },
1214 { "visible": false, "targets" : [ "hidden" ] },
1215 { "className": 'dtr-control', "orderable": false, "targets": -1 }
1218 "search": "_INPUT_",
1219 "searchPlaceholder": _("Search")
1229 /* Override default button set so that we can extend the options of print and csv */
1230 'clearFilter', 'copy',
1234 /* Print view should show all columns (even invisible ones) unless they are .noExport */
1235 columns: ":not(.noExport)"
1241 /* CSV export should include all columns (even invisible ones) unless they are .noExport */
1242 columns: ":not(.noExport)"
1249 var dataTables = $("#recalls-table,#article-requests-table");
1250 dataTables.each(function(){
1251 $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
1257 "details": { "type": 'column',"target": -1 }
1260 { "className": 'dtr-control', "orderable": false, "targets": -1 }
1264 $('a[data-toggle="tab"]').on('shown.bs.tab', function (event) {
1265 dTables.DataTable().responsive.recalc();
1266 dataTables.DataTable().responsive.recalc();
1269 $("body").on("click", "#buttons-ics", function(){
1270 location.href="/cgi-bin/koha/opac-ics.pl";
1273 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1274 [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1275 $("#renewselected").submit(function(){
1277 $("input[type=checkbox]").each(function(){
1278 if($(this).is(':checked')){
1283 alert(_("Nothing has been selected. Check the box for each item you want to renew"));
1287 $("body").on("click","#renewselected_link",function(e){
1289 $("#renewselected").submit();
1291 $("body").on("click","#renewall_link, #renewall_js",function(e){
1293 $("#renewall").submit();
1295 [% END # /IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
1297 [% IF ( Koha.Preference('AllowCheckoutNotes') ) %]
1299 /* If JS enabled, show button, otherwise show link to redirect to a page where note can be submitted */
1300 $(".nonjs_submitnote").hide();
1302 $("input[name='note']").prop('readonly', false);
1303 $("input[name='note']").keypress(function(e){
1304 /* prevent submitting of renewselected form */
1309 $("input[name='note']").keyup(function(e){
1310 var $btn_save = $('#save_'+$(this).data('issue_id'));
1311 var origvalue = $(this).data('origvalue');
1312 var value = $(this).val();
1314 if(origvalue != value) {
1316 $btn_save.text(_("Submit changes"));
1318 $btn_save.text(_("Submit note"));
1327 $(".change_pickup").on("click", function(){
1328 var hold_id = $(this).data("hold-id");
1330 $("#change-pickup-location" + hold_id ).show();
1333 if ( $('#opac-user-clubs').length ) {
1334 $('#opac-user-clubs-tab-link').on('click', function() {
1335 $('#opac-user-clubs').text(_("Loading..."));
1336 $('#opac-user-clubs').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrowernumber | html %]');
1340 $(".cancel_recall").click(function(e){
1341 return confirmDelete(_("Are you sure you want to remove this recall?"));
1344 $("body").on("click", ".btn-add-note", function(e){
1346 var title = $(this).data("title");
1347 var issue_id = $(this).data("issueid");
1348 var note = $("#note_" + issue_id ).val();
1349 var origvalue = $("#note_" + issue_id ).data("origvalue");
1350 $("#addNote").val( note );
1351 $("#addNoteIssueId").val( issue_id );
1352 $("#addNoteTitle").text( title );
1353 $("#addNoteModal").modal("show");
1356 $("#addNoteForm").on("submit", function(e){
1358 var title = $("#addNoteTitle").text();
1359 var issue_id = $("#addNoteIssueId").val();
1360 var note = $("#addNote").val();
1361 submitNote( title, issue_id, note );
1364 $("#addNoteModal").on("hidden.bs.modal", function(){
1365 $("#addNoteTitle").text("");
1366 $("#addNote").val("");
1369 $(".dismiss-message-button").click(function(e){
1370 return confirmDelete(_("Are you sure you want to dismiss this message?"));
1374 function submitNote( title, issue_id, note ){
1375 var self = $("#addNoteModal");
1376 var notebutton = $("#save_" + issue_id );
1377 var noteinput = $("#note_" + issue_id );
1380 'action': 'issuenote',
1381 'issue_id': issue_id,
1386 url: '/cgi-bin/koha/svc/checkout_notes/',
1391 .done(function(data) {
1393 if(data.status == 'saved') {
1394 $("#notesaved").removeClass("alert-error");
1395 $("#notesaved").addClass("alert-info");
1396 noteinput.data('origvalue', data.note)
1398 notebutton.text( _("Edit note" ) );
1399 $("#viewnote_" + issue_id ).text( data.note );
1400 message = "<p>" + _("Your note about %s has been saved and sent to the library.").format( em(title) ) + "</p>";
1401 message += "<p class=\"checkout_note\">" + data.note;
1402 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>";
1404 } else if(data.status == 'removed') {
1405 $("#notesaved").removeClass("alert-error");
1406 $("#notesaved").addClass("alert-info");
1407 noteinput.data('origvalue', "")
1409 notebutton.text( _("Add note") );
1410 $("#viewnote_" + issue_id ).text( data.note );
1411 message = "<p>" + _("Your note about %s was removed.").format( em(title) ) + "</p>";
1413 $("#notesaved").removeClass("alert-info");
1414 $("#notesaved").addClass("alert-error");
1415 message = "<p>" + _("Your note about %s could not be saved.").format( em(title) ) + "</p>";
1416 notebutton.text( _("Add note") );
1417 $("#viewnote_" + issue_id ).text( data.note );
1418 message += "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>";
1420 $("#notesaved").html(message);
1422 .fail(function(data) {
1423 $("#notesaved").removeClass("alert-info");
1424 $("#notesaved").addClass("alert-error");
1425 var message = "<p style=\"font-weight:bold;\">" + _("Something went wrong. The note has not been saved") + "</p>";
1426 $("#notesaved").html(message);
1428 .always(function() {
1430 $("#notesaved").show();
1434 function em( title ){
1435 return "<em>" + title + "</em>";
1438 var borrowernumber = "[% borrowernumber | html %]";
1440 [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
1441 [% Asset.js("lib/jquery/plugins/jquery.barrating.min.js") | $raw %]
1442 [% Asset.js("js/ratings.js") | $raw %]
1444 [% IF Koha.Preference('OverDriveCirculation') %]
1445 [% Asset.js("js/overdrive.js") | $raw %]
1447 [%- IF Koha.Preference('OverDrivePasswordRequired') -%]
1448 var OD_password_required = 1;
1450 var OD_password_required = 0;
1452 $(document).ready(function() {
1453 [% IF ( overdrive_error ) %]
1454 KOHA.OverDriveCirculation.display_error("#opac-user-overdrive", "[% overdrive_error.dquote | html %]");
1457 [% IF ( overdrive_tab ) %]
1458 $("#opac-user-views a[href='#opac-user-overdrive']").tab("show");
1461 $("#opac-user-overdrive").each( function() {
1462 KOHA.OverDriveCirculation.display_account_details(this);