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