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