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