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