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