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