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