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