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