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