Bug 14607: (QA followup) Fix one missing occurence, incorrect calls to GetNormalizedUPC
[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.auto_renew || ISSUE.auto_too_soon ) %]
242                                                         Automatic renewal
243                                                         <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
244                                                     [% ELSIF ( ISSUE.too_soon ) %]
245                                                         No renewal before [% ISSUE.soonestrenewdate %]
246                                                         <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
247                                                     [% ELSIF ( ISSUE.on_reserve ) %]
248                                                         <span class="renewals">(On hold)</span>
249                                                     [% END %]
250                                                     </td>
251                                                 [% END %]
252                                                 [% IF ( OPACFinesTab ) %]
253                                                     <td class="fines">
254                                                         <span class="tdlabel">Fines:</span>
255                                                         [% IF ( ISSUE.charges ) %]
256                                                             Yes
257                                                         [% ELSE %]
258                                                             No
259                                                         [% END %]
260                                                     </td>
261                                                 [% END %]
262                                                 [% IF ( OPACMySummaryHTML ) %]
263                                                     <td class="links">[% ISSUE.MySummaryHTML %]</td>
264                                                 [% END %]
265                                             </tr>
266                                         [% END # /FOREACH ISSUES %]
267                                     </tbody>
268                                 </table>
269                                 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
270                                     <input type="submit" class="btn" value="Renew selected" />
271                                 [% END %]
272                                 </form>
273
274                                 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
275                                 <form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
276                                     <input type="hidden" name="from" value="opac_user" />
277                                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
278                                     [% FOREACH ISSUE IN ISSUES %]
279                                         <input type="hidden" name="item" value="[% ISSUE.itemnumber %]" />
280                                     [% END %]
281                                     <input type="submit" class="btn" value="Renew all" />
282                                 </form>
283                                 [% END %]
284                             [% ELSE %]
285                                 <table class="table table-bordered table-striped">
286                                     <tr><td>You have nothing checked out</td></tr>
287                                 </table>
288                             [% END # IF issues_count %]
289                         </div> <!-- / .opac-user-checkouts -->
290
291                         [% IF ( OPACFinesTab ) %]
292                             <!-- FINES BOX -->
293                             [% IF ( BORROWER_INF.amountoverfive ) %]
294                                 <div id="opac-user-fines"> <h3>Fines and charges</h3>
295                                     <table class="table table-bordered table-striped">
296                                         <thead><tr><th colspan="2">Amount</th></tr></thead>
297                                         <tbody>
298                                             <tr>
299                                                 <td>You currently owe fines and charges amounting to:</td>
300                                                 <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
301                                             </tr>
302                                         </tbody>
303                                     </table>
304                                 </div>
305                             [% END %]
306
307                             [% IF ( BORROWER_INF.amountoverzero ) %]
308                                <div id="opac-user-fines"> <h3>Fines and charges</h3>
309                                     <table class="table table-bordered table-striped">
310                                         <thead><tr><th colspan="2">Amount</th></tr></thead>
311                                         <tbody>
312                                             <tr>
313                                                 <td>You currently owe fines and charges amounting to:</td>
314                                                 <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
315                                             </tr>
316                                         </tbody>
317                                     </table>
318                                 </div>
319                             [% END %]
320
321                             [% IF ( BORROWER_INF.amountlessthanzero ) %]
322                                 <div id="opac-user-fines">  <h3>Credits</h3>
323                                     <table class="table table-bordered table-striped">
324                                         <thead><tr><th colspan="2">Amount</th></tr></thead>
325                                         <tbody>
326                                             <tr>
327                                                 <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
328                                             </tr>
329                                         </tbody>
330                                     </table>
331                                 </div>
332                             [% END %]
333                         [% END # / OPACFinesTab %]
334
335                     [% END # / FOREACH BORROWER_INFO %]
336
337                         [% IF ( waiting_count && atdestination ) %]
338                             <div id="opac-user-waiting">
339                                 <table id="waitingt" class="table table-bordered table-striped">
340                                     <caption>Holds waiting</caption>
341                                     <thead>
342                                         <tr>
343                                             <th class="anti-the">Title</th>
344                                             <th>Hold date</th>
345                                             <th>Pick up library</th>
346                                         </tr>
347                                     </thead>
348                                     <tbody>
349                                         [% FOREACH WAITIN IN WAITING %]
350                                             <tr>
351                                                 <td><img src="[% themelang %]/images/[% WAITIN.itemtype %].gif" alt="[% WAITIN.itemtype %]" title="[% WAITIN.itemtype %]" /></td>
352                                                 <td>
353                                                     <a class="title" href="opac-detail.pl?biblionumber=[% WAITIN.biblionumber %]">
354                                                         [% WAITIN.waiting_title %] [% FOREACH subtitl IN WAITIN.subtitle %] [% subtitl.subfield %][% END %]
355                                                     </a>
356                                                     <span class="item-details">
357                                                         [% WAITIN.author %]
358                                                     </span></td>
359                                                 <td>
360                                                     <span class="tdlabel">Hold date:</span>
361                                                     [% WAITIN.reservedate | $KohaDates %]</td>
362                                                 <td>
363                                                     [% IF ( WAITIN.atdestination ) %]
364                                                         <strong>Waiting</strong> at [% WAITIN.branch %]
365                                                     [% ELSE %]
366                                                         In transit from [% WAITIN.holdingbranch %] to [% WAITIN.branch %]
367                                                     [% END %]
368                                                 </td>
369                                             </tr>
370                                         [% END %]
371                                     </tbody>
372                                 </table>
373                             </div> <!-- /#opac-user-waiting -->
374                         [% END # waiting_count && atdestination %]
375
376
377                         [% IF ( overdues_count ) %]
378                             <div id="opac-user-overdues">
379                                 <table id="overduest" class="table table-bordered table-striped">
380                                     <caption>Overdues <span class="count">([% overdues_count %] total)</span></caption>
381                                     <!-- OVERDUES TABLE ROWS -->
382                                     <thead>
383                                         <tr>
384                                             [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
385                                             <th class="anti-the">Title</th>
386                                             [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
387                                             [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
388                                             <th>Call no.</th>
389                                             <th class="title-string psort">Due</th>
390                                             [% IF ( OpacRenewalAllowed ) %]
391                                                 <th class="nosort">Renew</th>
392                                             [% END %]
393                                             [% IF ( OPACFinesTab ) %]
394                                                 <th>Fines</th>
395                                             [% END %]
396                                         </tr>
397                                     </thead>
398                                     <tbody>
399                                         [% FOREACH OVERDUE IN OVERDUES %]
400                                             <tr>
401                                                 [% IF ( JacketImages ) %]
402                                                     <td class="jacketcell">
403                                                     [% IF ( OPACAmazonCoverImages ) %]
404                                                         [% IF ( OVERDUE.normalized_isbn ) %]
405                                                             <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>
406                                                         [% ELSE %]
407                                                             <a href="#"><span class="no-image">No cover image available</span></a>
408                                                         [% END %]
409                                                     [% END %]
410
411                                                     [% IF ( GoogleJackets ) %]
412                                                         [% IF ( OVERDUE.normalized_isbn ) %]
413                                                             <div style="display:block;" title="Click to view in Google Books" class="[% OVERDUE.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
414                                                         [% ELSE %]
415                                                             <a href="http://books.google.com/books?q=[% OVERDUE.title |url %]"><span class="no-image">No cover image available</span></a>
416                                                         [% END %]
417                                                     [% END %]
418
419                                                     [% IF ( BakerTaylorEnabled ) %]
420                                                         [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %]
421                                                         [% IF ( bt_id ) %]
422                                                             <a href="https://[% BakerTaylorBookstoreURL |html %][% bt_id %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /></a>
423                                                         [% ELSE %]
424                                                             <span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
425                                                         [% END %]
426                                                     [% END %]
427
428                                                     [% IF ( SyndeticsCoverImages ) %]
429                                                         [% IF ( using_https ) %]
430                                                             <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" />
431                                                         [% ELSE %]
432                                                             <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" />
433                                                         [% END %]
434                                                     [% END %]
435                                                     </td>
436                                                 [% END # /IF jacketcell %]
437
438                                                 <td>
439                                                     <a class="title" href="/cgi-bin/koha/opac-detail.pl?bib=[% OVERDUE.biblionumber %]">[% OVERDUE.title |html %] [% FOREACH subtitl IN OVERDUE.subtitle %] [% subtitl.subfield %][% END %]
440                                                     </a>
441                                                     <span class="item-details">[% OVERDUE.author %]</span></td>
442
443                                                 [% UNLESS ( item_level_itypes ) %]
444                                                     <td>
445                                                         [% IF ( OVERDUE.imageurl ) %]
446                                                             <img src="[% OVERDUE.imageurl %]" title="[% OVERDUE.description %]" alt="[% OVERDUE.description %]" />
447                                                         [% END %] [% OVERDUE.description %]
448                                                     </td>
449                                                 [% END %]
450                                                 [% IF ( show_barcode ) %]
451                                                     <td>
452                                                         <span class="tdlabel">Barcode:</span>
453                                                         [% OVERDUE.barcode %]
454                                                     </td>
455                                                 [% END %]
456                                                 <td>
457                                                     <span class="tdlabel">Call number:</span>
458                                                     [% OVERDUE.itemcallnumber %]
459                                                 </td>
460                                                 <td>
461                                                     <span title="[% OVERDUE.date_due %]">
462                                                         <span class="tdlabel">Date due:</span>
463                                                         [% OVERDUE.date_due_sql | $KohaDates as_due_date => 1 %]
464                                                     </span>
465                                                 </td>
466                                                 [% IF ( OpacRenewalAllowed ) %]
467                                                     <td>
468                                                         [% IF ( OVERDUE.debarred ) %]
469                                                             Account frozen
470                                                         [% ELSIF ( OVERDUE.status ) %]
471                                                             [% IF ( canrenew ) %]
472                                                                 <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber %]&amp;bornum=[% OVERDUE.borrowernumber %]">Renew</a>
473                                                             [% END %]
474                                                                 <span class="renewals">([% OVERDUE.renewsleft %] of [% OVERDUE.renewsallowed %] renewals remaining)</span>
475                                                         [% ELSIF ( OVERDUE.onreserve ) %]
476                                                             On hold
477                                                         [% ELSE %]
478                                                             No renewals left
479                                                         [% END %]
480                                                     </td>
481                                                 [% END %]
482                                                 [% IF ( OPACFinesTab ) %]
483                                                     <td>
484                                                         <span class="tdlabel">Fines:</span>
485                                                         [% IF ( OVERDUE.charges ) %]
486                                                             Yes
487                                                         [% ELSE %]
488                                                             No
489                                                         [% END %]
490                                                     </td>
491                                                 [% END %]
492                                             </tr>
493                                         [% END %]
494                                     </tbody>
495                                 </table>
496                             </div> <!-- / #opac-user-overdues -->
497                         [% END # /overdues_count %]
498
499
500                         [% IF ( reserves_count ) %]
501                             <div id="opac-user-holds">
502                                 <table id="holdst" class="table table-bordered table-striped">
503                                     <caption>Holds <span class="count">([% reserves_count %] total)</span></caption>
504                                     <!-- RESERVES TABLE ROWS -->
505                                     <thead>
506                                         <tr>
507                                             <th class="anti-the">Title</th>
508                                             <th class="psort">Placed on</th>
509                                             <th>Expires on</th>
510                                             <th>Pick up location</th>
511                                             [% IF ( showpriority ) %]
512                                                 <th>Priority</th>
513                                             [% END %]
514                                             <th>Status</th>
515                                             [% IF SuspendHoldsOpac %]
516                                                  <th class="nosort" >Suspend</th>
517                                             [% END %]
518                                             <th class="nosort">Modify</th>
519                                         </tr>
520                                     </thead>
521                                     <tbody>
522                                     [% FOREACH RESERVE IN RESERVES %]
523                                         [% IF ( RESERVE.wait ) %]
524                                             [% IF ( RESERVE.atdestination ) %]
525                                                 [% IF ( RESERVE.found ) %]
526                                                     <tr class="reserved">
527                                                 [% ELSE %]
528                                                     <tr>
529                                                 [% END %]
530                                             [% ELSE %]
531                                                 <tr class="transfered">
532                                             [% END %]
533                                         [% ELSE %]
534                                             <tr>
535                                         [% END %]
536                                             <td class="title">
537                                                 <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">
538                                                     [% RESERVE.reserves_title %]
539                                                     [% FOREACH subtitl IN RESERVE.subtitle %]
540                                                         [% subtitl.subfield %]
541                                                     [% END %]
542                                                     [% RESERVE.enumchron %]
543                                                 </a>
544                                                 [% RESERVE.author %]
545                                             </td>
546                                             <td class="reservedate">
547                                                 <span title="[% RESERVE.reservedate %]">
548                                                     <span class="tdlabel">Hold date:</span>
549                                                     [% RESERVE.reservedate | $KohaDates %]
550                                                 </span>
551                                             </td>
552                                             <td class="expirationdate">
553                                                 [% IF ( RESERVE.expirationdate ) %]
554                                                     <span>
555                                                         <span class="tdlabel">Expiration:</span>
556                                                         [% RESERVE.expirationdate | $KohaDates %]
557                                                     </span>
558                                                 [% ELSE %]
559                                                     <span class="tdlabel">Expiration:</span>
560                                                     Never expires
561                                                 [% END %]
562                                             </td>
563                                             <td class="branch">
564                                                 <span class="tdlabel">Pick up location:</span>
565                                                 [% RESERVE.branch %]
566                                             </td>
567                                             [% IF ( showpriority ) %]
568                                                  <td class="priority">
569                                                     <span class="tdlabel">Priority:</span>
570                                                     [% RESERVE.priority %]
571                                                 </td>
572                                             [% END %]
573                                             <td class="status">
574                                                 <span class="tdlabel">Status:</span>
575                                                 [% IF ( RESERVE.wait ) %]
576                                                     [% IF ( RESERVE.atdestination ) %]
577                                                         [% IF ( RESERVE.found ) %]
578                                                             Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.waitingdate ) %] since [% RESERVE.waitingdate | $KohaDates %][% END %]
579                                                             <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
580                                                         [% ELSE %]
581                                                             Item waiting to be pulled from <b> [% RESERVE.wbrname %]</b>
582                                                         [% END %]
583                                                     [% ELSE %]
584                                                         Item in transit to <b> [% RESERVE.wbrname %]</b> <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
585                                                     [% END %]
586                                                 [% ELSE %]
587                                                     [% IF ( RESERVE.intransit ) %]
588                                                         Item in transit from <b> [% RESERVE.frombranch %]</b> since
589                                                         [% RESERVE.datesent | $KohaDates %]
590                                                     [% ELSIF ( RESERVE.suspend ) %]
591                                                         Suspended [% IF ( RESERVE.suspend_until ) %] until [% RESERVE.suspend_until %] [% END %]
592                                                     [% ELSE %]
593                                                         Pending
594                                                     [% END %]
595                                                 [% END %]
596                                             </td>
597                                             [% IF SuspendHoldsOpac %]
598                                                 <td>
599                                                     [% IF ( RESERVE.cancelable ) %]
600                                                         [% IF RESERVE.suspend %]
601                                                             <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
602                                                                 <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
603                                                                 <button class="btn btn-link" type="submit" name="submit"><i class="icon-play"></i> Resume</button>
604                                                             </form>
605                                                         [% ELSE %]
606                                                             [% IF AutoResumeSuspendedHolds %]
607                                                                 <a class="btn btn-link js-show" href="#suspendModal[% RESERVE.reserve_id %]" role="button" data-toggle="modal"><i class="icon-pause"></i> Suspend</a>
608                                                                 [% # hold suspend modal form %]
609                                                                 <div id="suspendModal[% RESERVE.reserve_id %]" class="modal-nojs" tabindex="-1" role="dialog" aria-labelledby="suspendModal[% RESERVE.reserve_id %]Label" aria-hidden="true">
610                                                                     <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
611                                                                         <div class="modal-header">
612                                                                             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
613                                                                             [% IF RESERVE.suspend %]
614                                                                                 <h3 id="suspendModal[% RESERVE.reserve_id %]Label">Resume your hold on <i>[% RESERVE.reserves_title %]</i></h3>
615                                                                             [% ELSE %]
616                                                                                 <h3 id="suspendModal[% RESERVE.reserve_id %]Label">Suspend your hold on <i>[% RESERVE.reserves_title %]</i></h3>
617                                                                             [% END %]
618                                                                         </div>
619                                                                         <div class="modal-body">
620                                                                             <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
621                                                                             <label for="suspend_until_[% RESERVE.reserve_id %]">Suspend until:</label>
622                                                                             <input name="suspend_until" id="suspend_until_[% RESERVE.reserve_id %]" class="suspend-until" size="10" />
623                                                                             [% INCLUDE 'date-format.inc' %]
624                                                                             <p class="js-show"><a href="#" onclick="document.getElementById('suspend_until_[% RESERVE.reserve_id %]').value='';return false;">Clear date to suspend indefinitely</a></p>
625                                                                             <button class="btn btn-mini js-hide" type="submit" name="submit">Suspend</button>
626                                                                         </div>
627                                                                         <div class="modal-footer">
628                                                                             <button class="btn btn-primary" type="submit" name="submit">Suspend</button>
629                                                                             <a href="#" data-dismiss="modal" aria-hidden="true" class="cancel">Cancel</a>
630                                                                         </div>
631                                                                     </form>
632                                                                 </div>  <!-- /#suspendModal[% RESERVE.reserve_id %] -->
633                                                             [% ELSE %]
634                                                                 <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
635                                                                     <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
636                                                                     <button class="btn btn-link" type="submit" name="submit"><i class="icon-pause"></i> Suspend</button>
637                                                                 </form>
638                                                             [% END # / IF AutoResumeSuspendedHolds %]
639                                                         [% END # / IF RESERVE.suspend %]
640                                                     [% END # / IF ( RESERVE.cancelable )%]
641                                                 </td>
642                                             [% END # / IF SuspendHoldsOpac %]
643                                             <td class="modify">
644                                                 [% IF ( RESERVE.cancelable ) %]
645                                                     <form action="/cgi-bin/koha/opac-modrequest.pl" method="post">
646                                                     <input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber %]" />
647                                                     <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
648                                                     <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>
649                                                 [% END %]
650                                             </td>
651                                         </tr>
652                                     [% END # /FOREACH RESERVES %]
653                                 </tbody>
654                             </table>
655
656                             [% IF SuspendHoldsOpac %]
657                                 <div>
658                                     <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
659                                         <button type="submit" name="submit" class="btn" onclick="return confirmDelete(MSG_CONFIRM_SUSPEND_HOLDS);"><i class="icon-pause"></i> Suspend all holds</button>
660                                         <input type="hidden" name="suspend" value="1" />
661
662                                         [% IF AutoResumeSuspendedHolds %]
663                                             <label for="suspend_until"> until </label>
664                                             <input name="suspend_until" id="suspend_until" class="suspend-until" readonly="readonly" size="10" />
665                                             <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date to suspend indefinitely</a>
666                                         [% END %]
667                                     </form>
668                                 </div>
669                                 <br/>
670                                 <div>
671                                     <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
672                                         <button type="submit" name="submit" class="btn" onclick="return confirmDelete(MSG_CONFIRM_RESUME_HOLDS);"><i class="icon-play"></i> Resume all suspended holds</button>
673                                         <input type="hidden" name="suspend" value="0" />
674                                     </form>
675                                 </div>
676                             [% END %]
677                         </div> <!-- / #opac-user-holds -->
678                         [% END # / #reserves_count %]
679                     </div> <!-- /#opac-user-views -->
680                 </div> <!-- /#userdetails -->
681             </div> <!-- /.span10 -->
682         </div> <!-- /.row-fluid -->
683     </div> <!-- /.container-fluid -->
684 </div> <!-- /#main -->
685
686 [% INCLUDE 'opac-bottom.inc' %]
687
688
689 [% BLOCK jsinclude %]
690     [% INCLUDE 'calendar.inc' %]
691     [% INCLUDE 'datatables.inc' %]
692     <script type="text/JavaScript">
693         //<![CDATA[
694         var MSG_CONFIRM_DELETE_HOLD   = _("Are you sure you want to cancel this hold?");
695         var MSG_CONFIRM_SUSPEND_HOLDS = _("Are you sure you want to suspend all holds?");
696         var MSG_CONFIRM_RESUME_HOLDS  = _("Are you sure you want to resume all suspended holds?");
697
698         $(document).ready(function(){
699             $('#opac-user-views').tabs();
700             $(".js-show").show();
701             $(".js-hide").hide();
702             $(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");
703             $(".suspend-until").prop("readonly",1);
704             var dTables = $("#checkoutst,#holdst,#overduest");
705             dTables.each(function(){
706                 var thIndex = $(this).find("th.psort").index();
707                 $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
708                     "aaSorting" : [[ thIndex, 'asc' ]],
709                     "aoColumnDefs": [
710                         { "aTargets": [ "nosort" ],"bSortable": false,"bSearchable": false },
711                         { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
712                         { "sType": "title-string", "aTargets" : [ "title-string" ] }
713                     ]
714                 }));
715             });
716
717             [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
718             [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
719                 $("#renewselected").submit(function(){
720                     valid = false;
721                     $("input[type=checkbox]").each(function(){
722                         if($(this).is(':checked')){
723                             valid = true;
724                         }
725                     });
726                     if(!valid){
727                         alert(_("Nothing has been selected. Check the box for each item you want to renew"));
728                     }
729                     return valid;
730                 });
731                 $("body").on("click","#renewselected_link",function(e){
732                     e.preventDefault();
733                     $("#renewselected").submit();
734                 });
735                 $("body").on("click","#renewall_link",function(e){
736                     e.preventDefault();
737                     $("#renewall").submit();
738                 });
739                 [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
740                     $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");
741                 [% END %]
742             [% END %]
743
744             $( ".suspend-until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
745         });
746         //]]>
747     </script>
748 [% END %]