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