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