Bug 6739: (follow-up) yet more fixes
[koha_fer] / koha-tmpl / opac-tmpl / prog / en / modules / opac-user.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your library home
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'calendar.inc' %]
7 [% INCLUDE 'datatables.inc' %]
8 <script type="text/JavaScript">
9 //<![CDATA[
10 var MSG_CONFIRM_DELETE_HOLD   = _("Are you sure you want to cancel this hold?");
11 var MSG_CONFIRM_SUSPEND_HOLDS = _("Are you sure you want to suspend all holds?");
12 var MSG_CONFIRM_RESUME_HOLDS  = _("Are you sure you want to resume all suspended holds?");
13
14     $(document).ready(function(){
15
16         $('#opac-user-views').tabs();
17
18         var dTables = $("#checkoutst,#holdst,#overduest");
19         dTables.each(function(){
20             var thIndex = $(this).find("th.psort").index();
21             $(this).dataTable($.extend(true, {}, dataTablesDefaults, {
22                 "aaSorting" : [[ thIndex, 'asc' ]],
23                 "aoColumnDefs": [
24                     { "aTargets": [ "nosort" ],"bSortable": false,"bSearchable": false },
25                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
26                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
27                 ]
28             }));
29         });
30
31     [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
32
33     [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
34         $("#renewselected").submit(function(){
35             valid = false;
36             $("input[type=checkbox]").each(function(){
37                 if($(this).is(':checked')){
38                     valid = true;
39                 }
40             });
41             if(!valid){
42                 alert(_("Nothing has been selected. Check the box for each item you want to renew"));
43             }
44             return valid;
45         });
46         $("body").on("click","#renewselected_link",function(){
47             $("#renewselected").submit();
48         });
49         $("body").on("click","#renewall_link",function(){
50             $("#renewall").submit();
51         });
52         [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
53             $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");
54         [% END %]
55     [% END %]
56
57     $( ".suspend-until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
58
59     });
60 //]]>
61 </script>
62 </head>
63 <body id="opac-user">
64 <div id="doc3" class="yui-t1">
65    <div id="bd">
66 [% INCLUDE 'masthead.inc' %]
67
68     <div id="yui-main">
69     <div class="yui-b"><div class="yui-g">
70         <div id="userdetails" class="container">
71         [% IF ( bor_messages ) %]
72                <div class="dialog message">
73                    <h3>Messages for you</h3>
74                        <ul>
75                                [% FOREACH bor_messages_loo IN bor_messages_loop %]
76                                         <li>
77                                                 <strong>[% bor_messages_loo.message %]</strong><br>
78                             &nbsp;&nbsp;&nbsp;<i>Written on [% bor_messages_loo.message_date | $KohaDates %] by [% bor_messages_loo.branchname %]</i>
79                                         </li>
80                                 [% END %]
81
82                                 [% IF ( opacnote ) %]<li>[% opacnote %]</li>[% END %]
83                        </ul>
84                </div>
85         [% END %]
86     [% FOREACH BORROWER_INF IN BORROWER_INFO %]
87         <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 %]
88         <span class="hint">(<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here</a> if you're not
89         [% 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 %])
90         </span></h2>
91         
92                 [% IF ( patronupdate ) %]<div class="dialog message"><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 %]
93                 
94         [% IF ( BORROWER_INF.warndeparture ) %]
95         <div class="dialog alert" id="warndeparture">
96                 <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>
97                 [% IF ( BORROWER_INF.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your card expires.</span>[% END %]
98         </div>
99         [% END %]
100
101         [% IF ( BORROWER_INF.warnexpired ) %]
102         <div class="dialog alert" id="warnexpired">
103             <strong>Please note: </strong><span>Your account has expired as of [% BORROWER_INF.warnexpired | $KohaDates %]. Please contact the library if you wish to renew your account.</span>
104         </div>
105         [% END %]
106
107         [% IF ( RENEW_ERROR ) %]
108         <div class="dialog alert">
109                 <strong>Please note:</strong>
110                 <span>
111                     Your account renewal failed because of the following:
112                     [% FOREACH error IN RENEW_ERROR.split('\|') %]
113                         [% IF error == 'card_expired' %]
114                             Your account has expired. Please contact the library for more information.
115                         [% ELSIF error == 'too_many' %]
116                             You have renewed this item the maximum number of times allowed.
117                         [% ELSIF error == 'on_reserve' %]
118                             This item is on hold for another patron.
119                         [% END %]
120                     [% END %]
121                 </span>
122         </div>
123         [% END %]
124
125         [% IF ( patron_flagged ) %]
126                 <div class="dialog alert">
127         <ul>
128             [% IF ( userdebarred ) %]
129                 <span id="userdebarred"><li><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></span>
130             [% END %]
131             [% IF ( BORROWER_INF.gonenoaddress ) %]
132                 <span id="gonenoaddress"><li><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-memberentry.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-memberentry.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li></span>
133             [% END %]
134             [% IF ( BORROWER_INF.lost ) %]
135                 <span id="lost"><li><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please contact the library.</li></span>
136             [% END %]
137             [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
138                 <span id="renewal_blocked_fines"><li><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></span>
139             [% END %]
140         </ul></div>
141         [% END %]
142
143         [% SET OPACMySummaryNote = Koha.Preference('OPACMySummaryNote') %]
144         [% IF OPACMySummaryNote %][% OPACMySummaryNote %][% END %]
145         
146 <div id="opac-user-views" class="toptabs">
147         <ul>
148             <li><a href="#opac-user-checkouts">Checked out</a></li>
149             [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue</a></li>[% END %]
150 [% IF ( OPACFinesTab ) %]
151             [% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="#opac-user-fines">Fines</a></li>[% END %]
152             [% IF ( BORROWER_INF.amountoverzero ) %]<li><a href="#opac-user-fines">Fines</a></li>[% END %]
153             [% IF ( BORROWER_INF.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits</a></li>[% END %]
154 [% END %]
155             [% IF ( waiting_count ) %][% IF ( BORROWER_INF.atdestination ) %]<li><a href="#opac-user-waiting">Waiting</a></li>[% END %][% END %]
156             [% IF ( reserves_count ) %]<li><a href="#opac-user-holds">Holds</a></li>[% END %]
157         </ul>
158
159     <div id="opac-user-checkouts">[% IF ( issues_count ) %]
160         <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
161     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]">
162     <input type="hidden" name="from" value="opac_user" />
163         <table id="checkoutst">
164         <caption>[% issues_count %] Item(s) checked out</caption>
165        <thead><tr>
166         [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
167         <th class="anti-the">Title</th>
168         <th class="title-string psort">Due</th>
169         [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
170         [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
171         <th>Call No.</th>
172         [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
173         <th class="nosort">Renew</th>
174         [% END %]
175 [% IF ( OPACFinesTab ) %]
176         <th>Fines</th>
177 [% END %]
178         [% IF ( OPACMySummaryHTML ) %]
179         <th class="nosort">Links</th>
180         [% END %]
181         </tr></thead>
182         <tbody>
183         <!-- FIXME: the styling for highlight overrides the overdue red background,
184                 so currently we don't use this conditional as the first thing inside the LOOP:
185         [% UNLESS ( __odd__ ) %]
186            <tr[% IF ( overdue ) %] class="overdue"[% END %]>
187         [% ELSE %]
188            <tr class="[% IF ( overdue ) %]overdue [% END %]highlight">
189         [% END %]
190         -->
191         [% FOREACH ISSUE IN ISSUES %]
192         [% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
193
194 [% IF ( JacketImages ) %]<td class="jacketcell">
195
196 [% IF ( OPACAmazonCoverImages ) %][% IF ( ISSUE.normalized_isbn ) %]<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 border="0" src="http://images.amazon.com/images/P/[% ISSUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="Cover Image" /></a>[% ELSE %]<a href="#"><span class="no-image">No cover image available</span></a>[% END %][% END %]
197
198 [% IF ( GoogleJackets ) %][% IF ( ISSUE.normalized_isbn ) %]<div style="display:block;" title="Click to view in Google Books" class="[% ISSUE.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>[% ELSE %]<a href="http://books.google.com/books?q=[% ISSUE.title |url %]"><span class="no-image">No cover image available</span></a>[% END %][% END %]
199
200 [% IF ( BakerTaylorEnabled ) %][% IF ( ISSUE.normalized_isbn ) %]<a href="https://[% BakerTaylorBookstoreURL |html %][% ISSUE.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% ISSUE.normalized_isbn %]" /></a>[% ELSE %]<span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_isbn! -->[% END %][% END %]
201
202 [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( using_https ) %]
203 <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="thumbnail" />
204 [% ELSE %]
205 <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="thumbnail" />[% END %][% END %][% END %]
206
207 </td>[% END %]
208
209                 <td class="title"><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %][% FOREACH subtitl IN ISSUE.subtitle %] [% subtitl.subfield %][% END %]</a><span class="item-details">
210                         [% ISSUE.author %]
211                     </span></td>
212                 [% IF ( ISSUE.overdue ) %]
213                     <td class="date_due overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates %]</span></td>
214                 [% ELSE %]
215                     <td class="date_due"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates %]</span></td>
216                 [% END %]
217                 [% UNLESS ( item_level_itypes ) %]<td class="itype">[% IF ( ISSUE.imageurl ) %]<img src="[% ISSUE.imageurl %]" title="[% ISSUE.description %]" alt="[% ISSUE.description %]" />[% END %] [% ISSUE.description %]</td>[% END %]
218                 [% IF ( show_barcode ) %]<td class="barcode">[% ISSUE.barcode %]</td>[% END %]
219                 <td class="call_no">[% ISSUE.itemcallnumber %]</td>
220                 [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
221                     <td class="renew">
222                     [% IF ( ISSUE.status ) %]
223                         [% IF ( canrenew ) %]
224                             <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>
225                         [% END %]
226                         <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
227                     [% ELSIF ( ISSUE.too_many ) %]
228                         Not renewable
229                     [% ELSIF ( ISSUE.too_soon ) %]
230                         No renewal before [% ISSUE.soonestrenewdate %]
231                         <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
232                     [% ELSIF ( ISSUE.on_reserve ) %]
233                         <span class="renewals">(On hold)</span>
234                     [% END %]
235                     </td>
236                 [% END %]
237 [% IF ( OPACFinesTab ) %]
238                 <td class="fines">[% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
239 [% END %]
240             [% IF ( OPACMySummaryHTML ) %]
241                 <td class="links">[% ISSUE.MySummaryHTML %]</td>
242             [% END %]
243             </tr>
244         [% END %]</tbody>
245         </table>
246         [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
247         <input type="submit" value="Renew Selected" />
248         [% END %]
249         </form>
250         [% IF ( canrenew && !userdebarred && OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %]
251         <form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
252             <input type="hidden" name="from" value="opac_user" />
253             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
254             [% FOREACH ISSUE IN ISSUES %]
255             <input type="hidden" name="item" value="[% ISSUE.itemnumber %]" />
256             [% END %]
257             <input type="submit" value="Renew all" />
258         </form>
259         [% END %]
260     [% ELSE %]
261         <table>
262             <tr><td>You have nothing checked out</td></tr>
263         </table>
264     [% END %]</div>
265
266 [% IF ( OPACFinesTab ) %]
267         <!-- FINES BOX -->
268         [% IF ( BORROWER_INF.amountoverfive ) %]
269             <div id="opac-user-fines"> <h3>Fines and charges</h3>
270             <table>
271                 <tr><th colspan="2">Amount</th></tr>
272                 <tr>
273                     <td>You currently owe fines and charges amounting to:</td>
274                     <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
275                 </tr>
276             </table></div>
277         [% END %]
278
279         [% IF ( BORROWER_INF.amountoverzero ) %]
280            <div id="opac-user-fines"> <h3>Fines and charges</h3>
281             <table>
282                 <tr><th colspan="2">Amount</th></tr>
283                 <tr><td>You currently owe fines and charges amounting to:</td>
284                 <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td></tr>
285             </table></div>
286         [% END %]
287
288         [% IF ( BORROWER_INF.amountlessthanzero ) %]
289           <div id="opac-user-fines">  <h3>Credits</h3>
290             <table>
291             <tr><th colspan="2">Amount</th></tr>
292             <tr><td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td></tr>
293             </table></div>
294         [% END %]
295 [% END %]
296     
297     [% END %]
298
299     [% IF ( waiting_count ) %]
300     [% IF ( atdestination ) %]
301     <div id="opac-user-waiting">
302         <table id="waitingt">
303             <caption>Holds waiting</caption>
304            <thead> <tr>
305                 <th>Title</th>
306                 <th>Hold date</th>
307                 <th>Pick up library</th>
308             </tr></thead>
309             <tbody>[% FOREACH WAITIN IN WAITING %]
310                 <tr>
311                     <td><img src="[% themelang %]/images/[% WAITIN.itemtype %].gif" alt="[% WAITIN.itemtype %]" title="[% WAITIN.itemtype %]" /></td>
312                     <td><a href="opac-detail.pl?biblionumber=[% WAITIN.biblionumber %]">
313                             [% WAITIN.waiting_title %]
314                         </a><span class="item-details">
315                             [% WAITIN.author %]
316                         </span></td>
317                     <td>[% WAITIN.reservedate | $KohaDates %]</td>
318                     <td>[% IF ( WAITIN.atdestination ) %]<strong>Waiting</strong> at [% WAITIN.branch %]
319                         [% ELSE %]
320                         In transit from [% WAITIN.holdingbranch %] to [% WAITIN.branch %]
321                         [% END %]</td>
322                 </tr>
323             [% END %]</tbody>
324         </table></div>
325         [% END %]
326     [% END %]
327
328 [% IF ( overdues_count ) %]
329 <div id="opac-user-overdues"><table id="overduest">
330 <caption>Overdues <span class="count">([% overdues_count %] total)</span></caption>
331 <!-- OVERDUES TABLE ROWS -->
332 <thead><tr>
333 [% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
334 <th>Title</th>
335 [% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
336 [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
337 <th>Call no.</th>
338 <th class="psort">Due</th>
339 [% IF ( OpacRenewalAllowed ) %]
340                     <th class="nosort">Renew</th>
341 [% END %]
342 [% IF ( OPACFinesTab ) %]
343 <th>Fines</th>
344 [% END %]
345 </tr></thead>
346
347 <tbody>[% FOREACH OVERDUE IN OVERDUES %]
348 <tr>
349 [% IF ( JacketImages ) %]<td class="jacketcell">
350
351 [% IF ( OPACAmazonCoverImages ) %][% IF ( OVERDUE.normalized_isbn ) %]<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="thumbnail" /></a>[% ELSE %]<a href="#"><span class="no-image">No cover image available</span></a>[% END %][% END %]
352
353 [% IF ( GoogleJackets ) %][% IF ( OVERDUE.normalized_isbn ) %]<div style="display:block;" title="Click to view in Google Books" class="[% OVERDUE.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>[% ELSE %]<a href="http://books.google.com/books?q=[% OVERDUE.title |url %]"><span class="no-image">No cover image available</span></a>[% END %][% END %]
354
355 [% IF ( BakerTaylorEnabled ) %][% IF ( OVERDUE.normalized_isbn ) %]<a href="https://[% BakerTaylorBookstoreURL |html %][% OVERDUE.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% OVERDUE.normalized_isbn %]" /></a>[% ELSE %]<!-- BakerTaylor needs normalized_isbn! --><span class="no-image">No cover image available</span>[% END %][% END %]
356
357 [% IF ( SyndeticsCoverImages ) %]
358 [% IF ( using_https ) %]
359 <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="thumbnail"/>
360 [% ELSE %]
361 <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="thumbnail"/>
362 [% END %]
363 [% END %]
364 </td>[% END %]
365
366 <td><a href="/cgi-bin/koha/opac-detail.pl?bib=[% OVERDUE.biblionumber %]">[% OVERDUE.title |html %][% FOREACH subtitl IN OVERDUE.subtitle %] [% subtitl.subfield %][% END %]</a> <span class="item-details">[% OVERDUE.author %]</span></td>
367
368 [% UNLESS ( item_level_itypes ) %]<td>[% IF ( OVERDUE.imageurl ) %]<img src="[% OVERDUE.imageurl %]" title="[% OVERDUE.description %]" alt="[% OVERDUE.description %]" />[% END %] [% OVERDUE.description %]</td>[% END %]
369 [% IF ( show_barcode ) %]<td>[% OVERDUE.barcode %]</td>[% END %]
370 <td>[% OVERDUE.itemcallnumber %]</td>
371 <td><span title="[% OVERDUE.date_due %]">[% OVERDUE.date_due | $KohaDates %]</span></td>
372                 [% IF ( OpacRenewalAllowed ) %]
373 <td>
374 [% IF ( OVERDUE.debarred ) %]Account frozen
375 [% ELSIF ( OVERDUE.status ) %]
376 [% IF ( canrenew ) %]<a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber %]&amp;bornum=[% OVERDUE.borrowernumber %]">Renew</a>[% END %] <span class="renewals">([% OVERDUE.renewsleft %] of [% OVERDUE.renewsallowed %] renewals remaining)</span>
377 [% ELSIF ( OVERDUE.onreserve ) %]On hold
378 [% ELSE %]No renewals left
379 [% END %]
380 </td>[% END %]
381 [% IF ( OPACFinesTab ) %]
382 <td>[% IF ( OVERDUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
383 [% END %]
384 </tr>
385 [% END %]</tbody>
386 </table></div>
387 [% END %]
388     
389
390     [% IF ( reserves_count ) %]
391         <div id="opac-user-holds">
392         <table id="holdst">
393         <caption>Holds <span class="count">([% reserves_count %] total)</span></caption>
394
395         <!-- RESERVES TABLE ROWS -->
396         <thead>
397             <tr>
398                 <th>Title</th>
399                 <th class="psort">Placed on</th>
400                 [% IF OpacHoldNotes %]
401                     <th>Notes</th>
402                 [% END %]
403                 <th>Expires on</th>
404                 <th>Pick up location</th>
405                 [% IF ( showpriority ) %]
406                     <th>Priority</th>
407                 [% END %]
408                 <th>Status</th>
409                 <th class="nosort">Modify</th>
410                 [% IF SuspendHoldsOpac %]
411                     <th class="nosort" >Suspend individual holds</th>
412                 [% END %]
413             </tr>
414         </thead>
415         <tbody>
416             [% FOREACH RESERVE IN RESERVES %]
417            [% IF ( RESERVE.wait ) %]
418                         [% IF ( RESERVE.atdestination ) %]
419                             [% IF ( RESERVE.found ) %]
420                             <tr class="reserved">
421                             [% ELSE %]
422                             <tr>
423                         [% END %]
424                         [% ELSE %]
425                             <tr class="transfered">
426                         [% END %]
427                     [% ELSE %]
428                             <tr>
429                     [% END %]
430                 <td class="title"><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">[% RESERVE.reserves_title %][% FOREACH subtitl IN RESERVE.subtitle %] [% subtitl.subfield %][% END %]</a>
431                     [% RESERVE.author %]
432                 </td>
433                 <td class="reservedate"><span title="[% RESERVE.reservedate %]">[% RESERVE.reservedate | $KohaDates %]</span></td>
434                 [% IF OpacHoldNotes %]<td class="reservenotes">[% RESERVE.reservenotes %]</td>[% END %]
435                 <td class="expirationdate">
436                     [% IF ( RESERVE.expirationdate ) %]
437                         <span title="[% RESERVE.expirationdate %]">[% RESERVE.expirationdate | $KohaDates %]</span>
438                     [% ELSE %]
439                         Never expires
440                     [% END %]
441                 </td>
442                 <td class="branch">[% RESERVE.branch %]</td>
443                                 [% IF ( showpriority ) %]
444                              <td class="priority">[% RESERVE.priority %] </td>
445                                 [% END %]
446                 <td class="status">
447                     [% IF ( RESERVE.wait ) %]
448                         [% IF ( RESERVE.atdestination ) %]
449                             [% IF ( RESERVE.found ) %]
450                             Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.waitingdate ) %] since [% RESERVE.waitingdate | $KohaDates %][% END %]
451                             <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
452                             [% ELSE %]
453                             Item waiting to be pulled from <b> [% RESERVE.wbrname %]</b>
454                         [% END %]
455                         [% ELSE %]
456                             Item in transit to <b> [% RESERVE.wbrname %]</b> <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
457                         [% END %]
458                     [% ELSE %]
459                             [% IF ( RESERVE.intransit ) %]
460                                 Item in transit from <b> [% RESERVE.frombranch %]</b> since 
461                                 [% RESERVE.datesent | $KohaDates %]
462                             [% ELSIF ( RESERVE.suspend ) %]
463                                 Suspended [% IF ( RESERVE.suspend_until ) %] until [% RESERVE.suspend_until %] [% END %]
464                             [% ELSE %]
465                                 Pending
466                             [% END %]
467                     [% END %]
468                 </td>
469               <td class="modify">
470                 [% IF ( RESERVE.cancelable ) %]
471                         <form action="/cgi-bin/koha/opac-modrequest.pl" method="post">
472                         <input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber %]" />
473           <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
474                         <input type="submit" name="submit" class="icon delete cancel" value="Cancel" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);" /></form>
475                 [% ELSE %]
476                 [% END %]
477                 </td>
478
479         [% IF SuspendHoldsOpac %]
480             <td>
481                 [% IF ( RESERVE.cancelable ) %]
482                     <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
483                         <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
484
485                         [% IF RESERVE.suspend %]
486                             <input type="submit" name="submit" value="Resume suspended hold" />
487                         [% ELSE %]
488                             <input type="submit" name="submit" class="icon delete cancel" value="Suspend hold" />
489
490                             [% IF AutoResumeSuspendedHolds %]
491                                 <label for="suspend_until_[% RESERVE.reserve_id %]"> until </label>
492                                 <input name="suspend_until" id="suspend_until_[% RESERVE.reserve_id %]" class="suspend-until" readonly="readonly" size="10" />
493                                 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until_[% RESERVE.reserve_id %]').value='';return false;">Clear date</a>
494                             [% END %]
495                         [% END %]
496                     </form>
497                 [% END %]
498             </td>
499         [% END %]
500
501             </tr>
502             [% END %]
503                         </tbody>
504         </table>
505
506         [% IF SuspendHoldsOpac %]
507         <div>
508             <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
509               <input type="submit" name="submit" class="icon delete cancel" value="Suspend all holds" onclick="return confirmDelete(MSG_CONFIRM_SUSPEND_HOLDS);" />
510               <input type="hidden" name="suspend" value="1" />
511
512               [% IF AutoResumeSuspendedHolds %]
513               <label for="suspend_until"> until </label>
514               <input name="suspend_until" id="suspend_until" class="suspend-until" readonly="readonly" size="10" />
515               <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date</a></p>
516               [% END %]
517             </form>
518         </div>
519         <div>
520             <form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
521               <input type="submit" name="submit" class="icon delete cancel" value="Resume all suspended holds" onclick="return confirmDelete(MSG_CONFIRM_RESUME_HOLDS);" />
522               <input type="hidden" name="suspend" value="0" />
523             </form>
524         </div>
525         [% END %]
526     </div>
527     [% END %]
528     </div><!-- /opac-user views -->
529     </div><!-- /userdetails -->
530 </div>
531 </div>
532 </div>
533 <div class="yui-b">
534 <div id="leftmenus" class="container">
535 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
536 </div>
537 </div>
538 </div>
539 [% INCLUDE 'opac-bottom.inc' %]