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