Bug 15344: follow-up specific to 3.20
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-user.tt
blobd7b4019eb1e4d8d5a3eb8f42b797c8e14610e248
1 [% USE Koha %]
2 [% USE KohaDates %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% BLOCK cssinclude %][% END %]
8 </head>
9 [% INCLUDE 'bodytag.inc' bodyid='opac-user' bodyclass='scrollto' %]
10 [% INCLUDE 'masthead.inc' %]
12 <div class="main">
13     <ul class="breadcrumb">
14         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
15         <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' category_type = BORROWER_INFO.category_type firstname = BORROWER_INFO.firstname surname = BORROWER_INFO.surname othernames = BORROWER_INFO.othernames cardnumber = BORROWER_INFO.cardnumber %]</a> <span class="divider">&rsaquo;</span></li>
16         <li><a href="#">Your summary</a></li>
17     </ul>
19     <div class="container-fluid">
20         <div class="row-fluid">
21             <div class="span2">
22                 <div id="navigation">
23                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
24                 </div>
25             </div>
26             <div class="span10">
27                 <div id="userdetails" class="maincontent">
28                     [% IF ( bor_messages ) %]
29                         <div class="alert alert-info">
30                             <h3>Messages for you</h3>
31                                 <ul>
32                                     [% FOREACH bor_messages_loo IN bor_messages_loop %]
33                                         <li>
34                                         <strong>[% bor_messages_loo.message %]</strong><br>
35                                         &nbsp;&nbsp;&nbsp;<i>Written on [% bor_messages_loo.message_date | $KohaDates %] by [% bor_messages_loo.branchname %]</i>
36                                         </li>
37                                     [% END %]
39                                     [% IF ( opacnote ) %]<li>[% opacnote %]</li>[% END %]
40                                 </ul>
41                         </div>
42                     [% END # / IF bor_messages %]
43                     <h2>Hello, [% INCLUDE 'patron-title.inc' category_type = BORROWER_INFO.category_type firstname = BORROWER_INFO.firstname surname = BORROWER_INFO.surname othernames = BORROWER_INFO.othernames cardnumber = BORROWER_INFO.cardnumber %]
44                     </h2>
46                     <p><a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here if you're not [% BORROWER_INFO.title %] [% INCLUDE 'patron-title.inc' category_type = BORROWER_INFO.category_type firstname = BORROWER_INFO.firstname surname = BORROWER_INFO.surname othernames = BORROWER_INFO.othernames cardnumber = BORROWER_INFO.cardnumber %]</a></p>
48                     [% IF ( patronupdate ) %]<div class="alert alert-info"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
50                     [% IF ( BORROWER_INFO.warndeparture ) %]
51                         <div class="alert" id="warndeparture">
52                             <strong>Please note:</strong><span> Your card will expire on <span id="warndeparture_date">[% BORROWER_INFO.warndeparture | $KohaDates %]</span>. Please contact the library for more information.</span>
53                                 [% IF ( BORROWER_INFO.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your card expires.</span>[% END %]
54                         </div>
55                     [% END %]
57                     [% IF ( BORROWER_INFO.warnexpired ) %]
58                         <div class="alert" id="warnexpired">
59                             <strong>Please note: </strong><span>Your account has expired as of [% BORROWER_INFO.warnexpired | $KohaDates %]. Please contact the library if you wish to renew your account.</span>
60                         </div>
61                     [% END %]
63                     [% IF ( RENEW_ERROR ) %]
64                         <div class="dialog alert">
65                             <strong>Please note:</strong>
66                             <span>
67                                 Your loan renewal failed because of the following reason(s):
68                                 [% FOREACH error IN RENEW_ERROR.split('\|') %]
69                                     [% IF error == 'card_expired' %]
70                                         Your account has expired. Please contact the library for more information.
71                                     [% ELSIF error == 'too_many' %]
72                                         You have renewed this item the maximum number of times allowed.
73                                     [% ELSIF error == 'on_reserve' %]
74                                         This item is on hold for another patron.
75                                     [% END %]
76                                 [% END %]
77                             </span>
78                         </div>
79                     [% END %]
81                     [% IF ( patron_flagged ) %]
82                         <div class="alert">
83                             <ul>
84                                 [% IF ( userdebarred ) %]
85                                     <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INFO.userdebarreddate ) %] until <span id="userdebarred_date">[% BORROWER_INFO.userdebarreddate | $KohaDates %]</span>[% END %][% IF ( BORROWER_INFO.debarredcomment ) %] with the comment <span id="userdebarred_comment">"[% BORROWER_INFO.debarredcomment %]"</span>[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li>
86                                 [% END %]
87                                 [% IF ( BORROWER_INFO.gonenoaddress ) %]
88                                     <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date [% UNLESS OPACPatronDetails %]<a href="/cgi-bin/koha/opac-userupdate.pl">contact information</a>[% ELSE %]contact information[% END %] on file.  Please contact the library[% IF OPACPatronDetails %] or use the <a href="/cgi-bin/koha/opac-userupdate.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li>
89                                 [% END %]
90                                 [% IF ( BORROWER_INFO.lost ) %]
91                                     <li id="lost"><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please contact the library.</li>
92                                 [% END %]
93                                 [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
94                                     <li id="renewal_blocked_fines"><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">[% IF renewal_blocked_fines != "0.00" %] more than <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines %]</span> in [% END %] fines</a>, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li>
95                                 [% END %]
96                             </ul>
97                         </div>
98                     [% END # / IF patron_flagged %]
100                     [% SET OPACMySummaryNote = Koha.Preference('OPACMySummaryNote') %]
101                     [% IF OPACMySummaryNote %][% OPACMySummaryNote %][% END %]
103                     <div id="opac-user-views" class="toptabs">
104                         <ul>
105                             <li><a href="#opac-user-checkouts">Checked out ([% issues_count %])</a></li>
106                             [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue ([% overdues_count %])</a></li>[% END %]
107                             [% IF ( OPACFinesTab ) %]
108                                 [% IF ( BORROWER_INFO.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INFO.amountoutstanding %])</a></li>[% END %]
109                                 [% IF ( BORROWER_INFO.amountoverzero ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INFO.amountoutstanding %])</a></li>[% END %]
110                                 [% IF ( BORROWER_INFO.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits ([% BORROWER_INFO.amountoutstanding %])</a></li>[% END %]
111                             [% END %]
112                             [% IF ( waiting_count ) %][% IF ( BORROWER_INFO.atdestination ) %]<li><a href="#opac-user-waiting">Waiting ([% waiting_count %])</a></li>[% END %][% END %]
113                             [% IF ( reserves_count ) %]<li><a href="#opac-user-holds">Holds ([% reserves_count %])</a></li>[% END %]
114                         </ul>
116                         <div id="opac-user-checkouts">
117                             [% IF ( issues_count ) %]
118                                 <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
119                                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]">
120                                     <input type="hidden" name="from" value="opac_user" />
121                                     <table id="checkoutst" class="table table-bordered table-striped">
122                                         <caption>[% issues_count %] Item(s) checked out</caption>
123                                         <thead>
124                                             <tr>
125                                                 [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
126                                                 <th class="anti-the">Title</th>
127                                                 <th class="title-string psort">Due</th>
128                                                 [% UNLESS ( item_level_itypes ) %]
129                                                     <th>Item type</th>
130                                                 [% END %]
131                                                 [% IF ( show_barcode ) %]
132                                                     <th>Barcode</th>
133                                                 [% END %]
134                                                     <th>Call No.</th>
135                                                 [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
136                                                     <th class="nosort">Renew</th>
137                                                 [% END %]
138                                                 [% IF ( OPACFinesTab ) %]
139                                                     <th>Fines</th>
140                                                 [% END %]
141                                                 [% IF ( OPACMySummaryHTML ) %]
142                                                     <th class="nosort">Links</th>
143                                                 [% END %]
144                                             </tr>
145                                         </thead>
146                                         <tbody>
147                                             [% FOREACH ISSUE IN ISSUES %]
148                                                 [% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
149                                                 [% IF ( JacketImages ) %]<td class="jacketcell">
151                                                     [% IF ( OPACAmazonCoverImages ) %]
152                                                         [% IF ( ISSUE.normalized_isbn ) %]
153                                                             <a href="http://www.amazon.com/gp/reader/[% ISSUE.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View on Amazon.com"><img src="https://images-na.ssl-images-amazon.com/images/P/[% ISSUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="View on Amazon.com" class="item-thumbnail"/></a>
154                                                         [% ELSE %]
155                                                             <a href="#"><span class="no-image">No cover image available</span></a>
156                                                         [% END %]
157                                                     [% END %]
159                                                     [% IF ( GoogleJackets ) %]
160                                                         [% IF ( ISSUE.normalized_isbn ) %]
161                                                             <div style="display:block;" title="Click to view in Google Books" class="[% ISSUE.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
162                                                         [% ELSE %]
163                                                             <a href="http://books.google.com/books?q=[% ISSUE.title |url %]"><span class="no-image">No cover image available</span></a>
164                                                         [% END %]
165                                                     [% END %]
167                                                     [% IF ( BakerTaylorEnabled ) %]
168                                                         [% IF ( ISSUE.normalized_isbn ) %]
169                                                             <a href="https://[% BakerTaylorBookstoreURL |html %][% ISSUE.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% ISSUE.normalized_isbn %]" /></a>
170                                                         [% ELSE %]
171                                                             <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_isbn! -->
172                                                         [% END %]
173                                                     [% END %]
175                                                     [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
176                                                         [% IF ( using_https ) %]
177                                                             <img src="https://secure.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% ISSUE.normalized_upc %]&amp;oclc=[% ISSUE.normalized_oclc %]" alt="" class="item-thumbnail" />
178                                                         [% ELSE %]
179                                                             <img src="http://www.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% ISSUE.normalized_upc %]&amp;oclc=[% ISSUE.normalized_oclc %]" alt="" class="item-thumbnail" />
180                                                         [% END %]
181                                                     [% END %]
183                                                 </td>[% END # / IF JacketImages %]
185                                                 <td class="title">
186                                                     <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %] [% FOREACH subtitl IN ISSUE.subtitle %] [% subtitl.subfield %][% END %]</a>
187                                                     <span class="item-details">[% ISSUE.author %]</span>
188                                                 </td>
189                                                 [% IF ( ISSUE.overdue ) %]
190                                                     <td class="date_due overdue">
191                                                         <span title="[% ISSUE.date_due %]">
192                                                             <span class="tdlabel">Date due:</span>
193                                                             [% ISSUE.date_due_sql | $KohaDates as_due_date => 1 %]
194                                                         </span>
195                                                     </td>
196                                                 [% ELSE %]
197                                                     <td class="date_due">
198                                                         <span title="[% ISSUE.date_due %]">
199                                                             <span class="tdlabel">Date due:</span>
200                                                             [% ISSUE.date_due_sql | $KohaDates as_due_date => 1 %]
201                                                         </span>
202                                                     </td>
203                                                 [% END %]
204                                                 [% UNLESS ( item_level_itypes ) %]
205                                                     <td class="itype">
206                                                         <span class="tdlabel">Item type:</span>
207                                                         [% IF ( ISSUE.imageurl ) %]
208                                                             <img src="[% ISSUE.imageurl %]" title="[% ISSUE.description %]" alt="[% ISSUE.description %]" />
209                                                         [% END %] [% ISSUE.description %]
210                                                     </td>
211                                                 [% END %]
212                                                 [% IF ( show_barcode ) %]
213                                                     <td class="barcode">
214                                                         <span class="tdlabel">Barcode:</span>
215                                                         [% ISSUE.barcode %]
216                                                     </td>
217                                                 [% END %]
218                                                 <td class="call_no">
219                                                     <span class="tdlabel">Call number:</span>
220                                                     [% ISSUE.itemcallnumber %]
221                                                 </td>
222                                                 [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
223                                                     <td class="renew">
224                                                     [% IF ISSUE.renewed %]<span class="blabel label-success">Renewed!</span><br />[% END %]
225                                                     [% IF ( ISSUE.status ) %]
226                                                         [% IF ( canrenew ) %]
227                                                             <input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% ISSUE.itemnumber %]&amp;borrowernumber=[% ISSUE.borrowernumber %]">Renew</a>
228                                                         [% END %]
229                                                         <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
230                                                     [% ELSIF ( ISSUE.too_many ) %]
231                                                         Not renewable
232                                                     [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %]
233                                                         Automatic renewal
234                                                         <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
235                                                     [% ELSIF ( ISSUE.too_soon ) %]
236                                                         No renewal before [% ISSUE.soonestrenewdate %]
237                                                         <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
238                                                     [% ELSIF ( ISSUE.on_reserve ) %]
239                                                         <span class="renewals">(On hold)</span>
240                                                     [% END %]
241                                                     </td>
242                                                 [% END %]
243                                                 [% IF ( OPACFinesTab ) %]
244                                                     <td class="fines">
245                                                         <span class="tdlabel">Fines:</span>
246                                                         [% IF ( ISSUE.charges ) %]
247                                                             Yes
248                                                         [% ELSE %]
249                                                             No
250                                                         [% END %]
251                                                     </td>
252                                                 [% END %]
253                                                 [% IF ( OPACMySummaryHTML ) %]
254                                                     <td class="links">[% ISSUE.MySummaryHTML %]</td>
255                                                 [% END %]
256                                             </tr>
257                                         [% END # /FOREACH ISSUES %]
258                                     </tbody>
259                                 </table>
260                                 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
261                                     <input type="submit" class="btn" value="Renew selected" />
262                                 [% END %]
263                                 </form>
265                                 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
266                                 <form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
267                                     <input type="hidden" name="from" value="opac_user" />
268                                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
269                                     [% FOREACH ISSUE IN ISSUES %]
270                                         <input type="hidden" name="item" value="[% ISSUE.itemnumber %]" />
271                                     [% END %]
272                                     <input type="submit" class="btn" value="Renew all" />
273                                 </form>
274                                 [% END %]
275                             [% ELSE %]
276                                 <table class="table table-bordered table-striped">
277                                     <tr><td>You have nothing checked out</td></tr>
278                                 </table>
279                             [% END # IF issues_count %]
280                         </div> <!-- / .opac-user-checkouts -->
282                         [% IF ( OPACFinesTab ) %]
283                             <!-- FINES BOX -->
284                             [% IF BORROWER_INFO.amountoverfive %]
285                                 <div id="opac-user-fines"> <h3>Fines and charges</h3>
286                                     <table class="table table-bordered table-striped">
287                                         <thead><tr><th colspan="2">Amount</th></tr></thead>
288                                         <tbody>
289                                             <tr>
290                                                 <td>You currently owe fines and charges amounting to:</td>
291                                                 <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td>
292                                             </tr>
293                                         </tbody>
294                                     </table>
295                                 </div>
296                             [% END %]
298                             [% IF BORROWER_INFO.amountoverzero %]
299                                <div id="opac-user-fines"> <h3>Fines and charges</h3>
300                                     <table class="table table-bordered table-striped">
301                                         <thead><tr><th colspan="2">Amount</th></tr></thead>
302                                         <tbody>
303                                             <tr>
304                                                 <td>You currently owe fines and charges amounting to:</td>
305                                                 <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td>
306                                             </tr>
307                                         </tbody>
308                                     </table>
309                                 </div>
310                             [% END %]
312                             [% IF BORROWER_INFO.amountlessthanzero %]
313                                 <div id="opac-user-fines">  <h3>Credits</h3>
314                                     <table class="table table-bordered table-striped">
315                                         <thead><tr><th colspan="2">Amount</th></tr></thead>
316                                         <tbody>
317                                             <tr>
318                                                 <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td>
319                                             </tr>
320                                         </tbody>
321                                     </table>
322                                 </div>
323                             [% END %]
324                         [% END # / OPACFinesTab %]
326                         [% IF ( waiting_count && atdestination ) %]
327                             <div id="opac-user-waiting">
328                                 <table id="waitingt" class="table table-bordered table-striped">
329                                     <caption>Holds waiting</caption>
330                                     <thead>
331                                         <tr>
332                                             <th class="anti-the">Title</th>
333                                             <th>Hold date</th>
334                                             <th>Pick up library</th>
335                                         </tr>
336                                     </thead>
337                                     <tbody>
338                                         [% FOREACH WAITIN IN WAITING %]
339                                             <tr>
340                                                 <td><img src="[% themelang %]/images/[% WAITIN.itemtype %].gif" alt="[% WAITIN.itemtype %]" title="[% WAITIN.itemtype %]" /></td>
341                                                 <td>
342                                                     <a class="title" href="opac-detail.pl?biblionumber=[% WAITIN.biblionumber %]">
343                                                         [% WAITIN.waiting_title %] [% FOREACH subtitl IN WAITIN.subtitle %] [% subtitl.subfield %][% END %]
344                                                     </a>
345                                                     <span class="item-details">
346                                                         [% WAITIN.author %]
347                                                     </span></td>
348                                                 <td>
349                                                     <span class="tdlabel">Hold date:</span>
350                                                     [% WAITIN.reservedate | $KohaDates %]</td>
351                                                 <td>
352                                                     [% IF ( WAITIN.atdestination ) %]
353                                                         <strong>Waiting</strong> at [% WAITIN.branch %]
354                                                     [% ELSE %]
355                                                         In transit from [% WAITIN.holdingbranch %] to [% WAITIN.branch %]
356                                                     [% END %]
357                                                 </td>
358                                             </tr>
359                                         [% END %]
360                                     </tbody>
361                                 </table>
362                             </div> <!-- /#opac-user-waiting -->
363                         [% END # waiting_count && atdestination %]
366                         [% IF ( overdues_count ) %]
367                             <div id="opac-user-overdues">
368                                 <table id="overduest" class="table table-bordered table-striped">
369                                     <caption>Overdues <span class="count">([% overdues_count %] total)</span></caption>
370                                     <!-- OVERDUES TABLE ROWS -->
371                                     <thead>
372                                         <tr>
373                                             [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
374                                             <th class="anti-the">Title</th>
375                                             [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
376                                             [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
377                                             <th>Call no.</th>
378                                             <th class="title-string psort">Due</th>
379                                             [% IF ( OpacRenewalAllowed ) %]
380                                                 <th class="nosort">Renew</th>
381                                             [% END %]
382                                             [% IF ( OPACFinesTab ) %]
383                                                 <th>Fines</th>
384                                             [% END %]
385                                         </tr>
386                                     </thead>
387                                     <tbody>
388                                         [% FOREACH OVERDUE IN OVERDUES %]
389                                             <tr>
390                                                 [% IF ( JacketImages ) %]
391                                                     <td class="jacketcell">
392                                                     [% IF ( OPACAmazonCoverImages ) %]
393                                                         [% IF ( OVERDUE.normalized_isbn ) %]
394                                                             <a href="http://www.amazon.com/gp/reader/[% OVERDUE.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View on Amazon.com"><img src="https://images-na.ssl-images-amazon.com/images/P/[% OVERDUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="View on Amazon.com" class="item-thumbnail" /></a>
395                                                         [% ELSE %]
396                                                             <a href="#"><span class="no-image">No cover image available</span></a>
397                                                         [% END %]
398                                                     [% END %]
400                                                     [% IF ( GoogleJackets ) %]
401                                                         [% IF ( OVERDUE.normalized_isbn ) %]
402                                                             <div style="display:block;" title="Click to view in Google Books" class="[% OVERDUE.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
403                                                         [% ELSE %]
404                                                             <a href="http://books.google.com/books?q=[% OVERDUE.title |url %]"><span class="no-image">No cover image available</span></a>
405                                                         [% END %]
406                                                     [% END %]
408                                                     [% IF ( BakerTaylorEnabled ) %]
409                                                         [% IF ( OVERDUE.normalized_isbn ) %]
410                                                             <a href="https://[% BakerTaylorBookstoreURL |html %][% OVERDUE.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% OVERDUE.normalized_isbn %]" /></a>
411                                                         [% ELSE %]
412                                                             <!-- BakerTaylor needs normalized_isbn! --><span class="no-image">No cover image available</span>
413                                                         [% END %]
414                                                     [% END %]
416                                                     [% IF ( SyndeticsCoverImages ) %]
417                                                         [% IF ( using_https ) %]
418                                                             <img src="https://secure.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;upc=[% OVERDUE.normalized_upc %]&amp;oclc=[% OVERDUE.normalized_oclc %]&amp;type=xw10" alt="" class="item-thumbnail" />
419                                                         [% ELSE %]
420                                                             <img src="http://www.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;upc=[% OVERDUE.normalized_upc %]&amp;oclc=[% OVERDUE.normalized_oclc %]&amp;type=xw10" alt="" class="item-thumbnail" />
421                                                         [% END %]
422                                                     [% END %]
423                                                     </td>
424                                                 [% END # /IF jacketcell %]
426                                                 <td>
427                                                     <a class="title" href="/cgi-bin/koha/opac-detail.pl?bib=[% OVERDUE.biblionumber %]">[% OVERDUE.title |html %] [% FOREACH subtitl IN OVERDUE.subtitle %] [% subtitl.subfield %][% END %]
428                                                     </a>
429                                                     <span class="item-details">[% OVERDUE.author %]</span></td>
431                                                 [% UNLESS ( item_level_itypes ) %]
432                                                     <td>
433                                                         [% IF ( OVERDUE.imageurl ) %]
434                                                             <img src="[% OVERDUE.imageurl %]" title="[% OVERDUE.description %]" alt="[% OVERDUE.description %]" />
435                                                         [% END %] [% OVERDUE.description %]
436                                                     </td>
437                                                 [% END %]
438                                                 [% IF ( show_barcode ) %]
439                                                     <td>
440                                                         <span class="tdlabel">Barcode:</span>
441                                                         [% OVERDUE.barcode %]
442                                                     </td>
443                                                 [% END %]
444                                                 <td>
445                                                     <span class="tdlabel">Call number:</span>
446                                                     [% OVERDUE.itemcallnumber %]
447                                                 </td>
448                                                 <td>
449                                                     <span title="[% OVERDUE.date_due %]">
450                                                         <span class="tdlabel">Date due:</span>
451                                                         [% OVERDUE.date_due_sql | $KohaDates as_due_date => 1 %]
452                                                     </span>
453                                                 </td>
454                                                 [% IF ( OpacRenewalAllowed ) %]
455                                                     <td>
456                                                         [% IF ( OVERDUE.debarred ) %]
457                                                             Account frozen
458                                                         [% ELSIF ( OVERDUE.status ) %]
459                                                             [% IF ( canrenew ) %]
460                                                                 <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber %]&amp;bornum=[% OVERDUE.borrowernumber %]">Renew</a>
461                                                             [% END %]
462                                                                 <span class="renewals">([% OVERDUE.renewsleft %] of [% OVERDUE.renewsallowed %] renewals remaining)</span>
463                                                         [% ELSIF ( OVERDUE.onreserve ) %]
464                                                             On hold
465                                                         [% ELSE %]
466                                                             No renewals left
467                                                         [% END %]
468                                                     </td>
469                                                 [% END %]
470                                                 [% IF ( OPACFinesTab ) %]
471                                                     <td>
472                                                         <span class="tdlabel">Fines:</span>
473                                                         [% IF ( OVERDUE.charges ) %]
474                                                             Yes
475                                                         [% ELSE %]
476                                                             No
477                                                         [% END %]
478                                                     </td>
479                                                 [% END %]
480                                             </tr>
481                                         [% END %]
482                                     </tbody>
483                                 </table>
484                             </div> <!-- / #opac-user-overdues -->
485                         [% END # /overdues_count %]
488                         [% IF ( reserves_count ) %]
489                             <div id="opac-user-holds">
490                                 <table id="holdst" class="table table-bordered table-striped">
491                                     <caption>Holds <span class="count">([% reserves_count %] total)</span></caption>
492                                     <!-- RESERVES TABLE ROWS -->
493                                     <thead>
494                                         <tr>
495                                             <th class="anti-the">Title</th>
496                                             <th class="psort">Placed on</th>
497                                             <th>Expires on</th>
498                                             <th>Pick up location</th>
499                                             [% IF ( showpriority ) %]
500                                                 <th>Priority</th>
501                                             [% END %]
502                                             <th>Status</th>
503                                             [% IF SuspendHoldsOpac %]
504                                                  <th class="nosort" >Suspend</th>
505                                             [% END %]
506                                             <th class="nosort">Modify</th>
507                                         </tr>
508                                     </thead>
509                                     <tbody>
510                                     [% FOREACH RESERVE IN RESERVES %]
511                                         [% IF ( RESERVE.wait ) %]
512                                             [% IF ( RESERVE.atdestination ) %]
513                                                 [% IF ( RESERVE.found ) %]
514                                                     <tr class="reserved">
515                                                 [% ELSE %]
516                                                     <tr>
517                                                 [% END %]
518                                             [% ELSE %]
519                                                 <tr class="transfered">
520                                             [% END %]
521                                         [% ELSE %]
522                                             <tr>
523                                         [% END %]
524                                             <td class="title">
525                                                 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">
526                                                     [% RESERVE.reserves_title %]
527                                                     [% FOREACH subtitl IN RESERVE.subtitle %]
528                                                         [% subtitl.subfield %]
529                                                     [% END %]
530                                                     [% RESERVE.enumchron %]
531                                                 </a>
532                                                 [% RESERVE.author %]
533                                             </td>
534                                             <td class="reservedate">
535                                                 <span title="[% RESERVE.reservedate %]">
536                                                     <span class="tdlabel">Hold date:</span>
537                                                     [% RESERVE.reservedate | $KohaDates %]
538                                                 </span>
539                                             </td>
540                                             <td class="expirationdate">
541                                                 [% IF ( RESERVE.expirationdate ) %]
542                                                     <span>
543                                                         <span class="tdlabel">Expiration:</span>
544                                                         [% RESERVE.expirationdate | $KohaDates %]
545                                                     </span>
546                                                 [% ELSE %]
547                                                     <span class="tdlabel">Expiration:</span>
548                                                     Never expires
549                                                 [% END %]
550                                             </td>
551                                             <td class="branch">
552                                                 <span class="tdlabel">Pick up location:</span>
553                                                 [% RESERVE.branch %]
554                                             </td>
555                                             [% IF ( showpriority ) %]
556                                                  <td class="priority">
557                                                     <span class="tdlabel">Priority:</span>
558                                                     [% RESERVE.priority %]
559                                                 </td>
560                                             [% END %]
561                                             <td class="status">
562                                                 <span class="tdlabel">Status:</span>
563                                                 [% IF ( RESERVE.wait ) %]
564                                                     [% IF ( RESERVE.atdestination ) %]
565                                                         [% IF ( RESERVE.found ) %]
566                                                             Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.waitingdate ) %] since [% RESERVE.waitingdate | $KohaDates %][% END %]
567                                                             <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
568                                                         [% ELSE %]
569                                                             Item waiting to be pulled from <b> [% RESERVE.wbrname %]</b>
570                                                         [% END %]
571                                                     [% ELSE %]
572                                                         Item in transit to <b> [% RESERVE.wbrname %]</b> <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
573                                                     [% END %]
574                                                 [% ELSE %]
575                                                     [% IF ( RESERVE.intransit ) %]
576                                                         Item in transit from <b> [% RESERVE.frombranch %]</b> since
577                                                         [% RESERVE.datesent | $KohaDates %]
578                                                     [% ELSIF ( RESERVE.suspend ) %]
579                                                         Suspended [% IF ( RESERVE.suspend_until ) %] until [% RESERVE.suspend_until %] [% END %]
580                                                     [% ELSE %]
581                                                         Pending
582                                                     [% END %]
583                                                 [% END %]
584                                             </td>
585                                             [% IF SuspendHoldsOpac %]
586                                                 <td>
587                                                     [% IF ( RESERVE.cancelable ) %]
588                                                         [% IF RESERVE.suspend %]
589                                                             <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
590                                                                 <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
591                                                                 <button class="btn btn-link" type="submit" name="submit"><i class="icon-play"></i> Resume</button>
592                                                             </form>
593                                                         [% ELSE %]
594                                                             [% IF AutoResumeSuspendedHolds %]
595                                                                 <a class="btn btn-link js-show" href="#suspendModal[% RESERVE.reserve_id %]" role="button" data-toggle="modal"><i class="icon-pause"></i> Suspend</a>
596                                                                 [% # hold suspend modal form %]
597                                                                 <div id="suspendModal[% RESERVE.reserve_id %]" class="modal-nojs" tabindex="-1" role="dialog" aria-labelledby="suspendModal[% RESERVE.reserve_id %]Label" aria-hidden="true">
598                                                                     <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
599                                                                         <div class="modal-header">
600                                                                             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
601                                                                             [% IF RESERVE.suspend %]
602                                                                                 <h3 id="suspendModal[% RESERVE.reserve_id %]Label">Resume your hold on <i>[% RESERVE.reserves_title %]</i></h3>
603                                                                             [% ELSE %]
604                                                                                 <h3 id="suspendModal[% RESERVE.reserve_id %]Label">Suspend your hold on <i>[% RESERVE.reserves_title %]</i></h3>
605                                                                             [% END %]
606                                                                         </div>
607                                                                         <div class="modal-body">
608                                                                             <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
609                                                                             <label for="suspend_until_[% RESERVE.reserve_id %]">Suspend until:</label>
610                                                                             <input name="suspend_until" id="suspend_until_[% RESERVE.reserve_id %]" class="suspend-until" size="10" />
611                                                                             [% INCLUDE 'date-format.inc' %]
612                                                                             <p class="js-show"><a href="#" onclick="document.getElementById('suspend_until_[% RESERVE.reserve_id %]').value='';return false;">Clear date to suspend indefinitely</a></p>
613                                                                             <button class="btn btn-mini js-hide" type="submit" name="submit">Suspend</button>
614                                                                         </div>
615                                                                         <div class="modal-footer">
616                                                                             <button class="btn btn-primary" type="submit" name="submit">Suspend</button>
617                                                                             <a href="#" data-dismiss="modal" aria-hidden="true" class="cancel">Cancel</a>
618                                                                         </div>
619                                                                     </form>
620                                                                 </div>  <!-- /#suspendModal[% RESERVE.reserve_id %] -->
621                                                             [% ELSE %]
622                                                                 <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
623                                                                     <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
624                                                                     <button class="btn btn-link" type="submit" name="submit"><i class="icon-pause"></i> Suspend</button>
625                                                                 </form>
626                                                             [% END # / IF AutoResumeSuspendedHolds %]
627                                                         [% END # / IF RESERVE.suspend %]
628                                                     [% END # / IF ( RESERVE.cancelable )%]
629                                                 </td>
630                                             [% END # / IF SuspendHoldsOpac %]
631                                             <td class="modify">
632                                                 [% IF ( RESERVE.cancelable ) %]
633                                                     <form action="/cgi-bin/koha/opac-modrequest.pl" method="post">
634                                                     <input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber %]" />
635                                                     <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
636                                                     <button type="submit" name="submit" class="btn btn-mini btn-danger" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);"><i class="icon-remove icon-white"></i> Cancel</button></form>
637                                                 [% END %]
638                                             </td>
639                                         </tr>
640                                     [% END # /FOREACH RESERVES %]
641                                 </tbody>
642                             </table>
644                             [% IF SuspendHoldsOpac %]
645                                 <div>
646                                     <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
647                                         <button type="submit" name="submit" class="btn" onclick="return confirmDelete(MSG_CONFIRM_SUSPEND_HOLDS);"><i class="icon-pause"></i> Suspend all holds</button>
648                                         <input type="hidden" name="suspend" value="1" />
650                                         [% IF AutoResumeSuspendedHolds %]
651                                             <label for="suspend_until"> until </label>
652                                             <input name="suspend_until" id="suspend_until" class="suspend-until" readonly="readonly" size="10" />
653                                             <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date to suspend indefinitely</a>
654                                         [% END %]
655                                     </form>
656                                 </div>
657                                 <br/>
658                                 <div>
659                                     <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
660                                         <button type="submit" name="submit" class="btn" onclick="return confirmDelete(MSG_CONFIRM_RESUME_HOLDS);"><i class="icon-play"></i> Resume all suspended holds</button>
661                                         <input type="hidden" name="suspend" value="0" />
662                                     </form>
663                                 </div>
664                             [% END %]
665                         </div> <!-- / #opac-user-holds -->
666                         [% END # / #reserves_count %]
667                     </div> <!-- /#opac-user-views -->
668                 </div> <!-- /#userdetails -->
669             </div> <!-- /.span10 -->
670         </div> <!-- /.row-fluid -->
671     </div> <!-- /.container-fluid -->
672 </div> <!-- /#main -->
674 [% INCLUDE 'opac-bottom.inc' %]
677 [% BLOCK jsinclude %]
678     [% INCLUDE 'calendar.inc' %]
679     [% INCLUDE 'datatables.inc' %]
680     <script type="text/JavaScript">
681         //<![CDATA[
682         var MSG_CONFIRM_DELETE_HOLD   = _("Are you sure you want to cancel this hold?");
683         var MSG_CONFIRM_SUSPEND_HOLDS = _("Are you sure you want to suspend all holds?");
684         var MSG_CONFIRM_RESUME_HOLDS  = _("Are you sure you want to resume all suspended holds?");
686         $(document).ready(function(){
687             $('#opac-user-views').tabs();
688             $(".js-show").show();
689             $(".js-hide").hide();
690             $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
691             $(".suspend-until").prop("readonly",1);
692             var dTables = $("#checkoutst,#holdst,#overduest");
693             dTables.each(function(){
694                 var thIndex = $(this).find("th.psort").index();
695                 $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
696                     "aaSorting" : [[ thIndex, 'asc' ]],
697                     "aoColumnDefs": [
698                         { "aTargets": [ "nosort" ],"bSortable": false,"bSearchable": false },
699                         { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
700                         { "sType": "title-string", "aTargets" : [ "title-string" ] }
701                     ]
702                 }));
703             });
705             [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
706             [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
707                 $("#renewselected").submit(function(){
708                     valid = false;
709                     $("input[type=checkbox]").each(function(){
710                         if($(this).is(':checked')){
711                             valid = true;
712                         }
713                     });
714                     if(!valid){
715                         alert(_("Nothing has been selected. Check the box for each item you want to renew"));
716                     }
717                     return valid;
718                 });
719                 $("body").on("click","#renewselected_link",function(e){
720                     e.preventDefault();
721                     $("#renewselected").submit();
722                 });
723                 $("body").on("click","#renewall_link",function(e){
724                     e.preventDefault();
725                     $("#renewall").submit();
726                 });
727                 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
728                     $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");
729                 [% END %]
730             [% END %]
732             $( ".suspend-until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
733         });
734         //]]>
735     </script>
736 [% END %]