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