Bug 7110 - Renewal messages still displays in OPAC if OpacRenewalAllowed is disabled.
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-user.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Your library home
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.metadata.min.js"></script>
5 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
6 <script type="text/JavaScript">
7 //<![CDATA[
8 var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?");
9 $.tablesorter.addParser({
10     id: 'articles', 
11     is: function(s) {return false;  }, 
12     format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
13     type: 'text' 
14 });
15             $(function() {
16             $('#opac-user-views > ul').tabs();
17             $.tablesorter.defaults.widgets = ['zebra'];
18             [% IF ( dateformat == 'metric' ) %]$.tablesorter.defaults.dateFormat = ['uk'];[% END %]
19                         $("#holdst").tablesorter({
20                                 sortList: [[0,0]]
21                         }); 
22                         $("#checkoutst").tablesorter({
23                 [% IF ( JacketImages ) %]sortList: [[2,0]][% ELSE %]sortList: [[1,0]][% END %]
24             }); 
25                         $("#overduest").tablesorter();
26 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
27         [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]$("#renewselected").submit(function(){
28             valid = false;
29             $("input[type=checkbox]").each(function(){
30                 if($(this).is(':checked')){
31                     valid = true;
32                 }
33             });
34             if(!valid){
35                 alert(_("Nothing has been selected. Check the box for each item you want to renew"));
36             }
37             return valid;
38         });
39         $("#renewselected_link").live('click',function(){
40             $("#renewselected").submit();
41         });
42         $("#renewall_link").live('click',function(){
43             $("#renewall").submit();
44         });
45         $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");[% END %]
46             });
47 //]]>
48 </script>
49 </head>
50 <body id="opac-user">
51 <div id="doc3" class="yui-t1">
52    <div id="bd">
53 [% INCLUDE 'masthead.inc' %]
54
55     <div id="yui-main">
56     <div class="yui-b"><div class="yui-g">
57         <div id="userdetails" class="container">
58         [% IF ( bor_messages ) %]
59                <div class="dialog message">
60                        <h3>Messages For You</h3>
61                        <ul>
62                                [% FOREACH bor_messages_loo IN bor_messages_loop %]
63                                         <li>
64                                                 <strong>[% bor_messages_loo.message %]</strong><br>
65                                                 &nbsp;&nbsp;&nbsp;<i>Written on [% bor_messages_loo.message_date_formatted %] by [% bor_messages_loo.branchname %]</i>
66                                         </li>
67                                 [% END %]
68
69                                 [% IF ( opacnote ) %]<li>[% opacnote %]</li>[% END %]
70                        </ul>
71                </div>
72         [% END %]
73     [% FOREACH BORROWER_INF IN BORROWER_INFO %]
74         <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 %]
75         <span class="hint">(<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here</a> if you're not
76         [% 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 %])
77         </span></h2>
78         
79                 [% 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 %]
80                 
81         [% IF ( BORROWER_INF.warndeparture ) %]
82         <div class="dialog alert">
83                 <strong>Please note:</strong><span> Your card will expire on [% BORROWER_INF.warndeparture %]. Please contact the library if you wish to renew your subscription.</span>
84                 [% IF ( BORROWER_INF.returnbeforeexpiry ) %]<span> Also note that you must return all checked out items before your card expires.</span>[% END %]
85         </div>
86         [% END %]
87
88         [% IF ( patron_flagged ) %]
89                 <div class="dialog alert">
90         <ul>
91             [% IF ( userdebarred ) %]
92                 <li><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INF.userdebarreddate ) %] until [% BORROWER_INF.userdebarreddate %][% END %][% IF ( BORROWER_INF.debarredcomment ) %] with the comment "[% BORROWER_INF.debarredcomment %]"[% 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>
93             [% END %]
94             [% IF ( BORROWER_INF.gonenoaddress ) %]
95                 <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-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>
96             [% END %]
97             [% IF ( BORROWER_INF.lost ) %]
98                 <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>
99             [% END %]
100             [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
101                 <li><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">more than [% renewal_blocked_fines %]</a> in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li>
102             [% ELSIF ( renewal_blocked_fines ) %]
103                 <li><strong>Please note: </strong> You have <a href="/cgi-bin/koha/opac-account.pl">more than [% renewal_blocked_fines %]</a> in fines. </li>
104             [% END %]
105         </ul></div>
106         [% END %]
107         
108 <div id="opac-user-views" class="toptabs">
109         <ul>
110             <li><a href="/cgi-bin/koha/opac-user.pl#opac-user-checkouts">Checked Out</a></li>
111             [% IF ( overdues_count ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-overdues">Overdue</a></li>[% END %]
112 [% IF ( OPACFinesTab ) %]
113             [% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Fines</a></li>[% END %]
114             [% IF ( BORROWER_INF.amountoverzero ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Fines</a></li>[% END %]
115             [% IF ( BORROWER_INF.amountlessthanzero ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Credits</a></li>[% END %]
116 [% END %]
117             [% IF ( waiting_count ) %][% IF ( BORROWER_INF.atdestination ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-waiting">Waiting</a></li>[% END %][% END %]
118             [% IF ( reserves_count ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-holds">Holds</a></li>[% END %]
119         </ul>
120         
121 [% IF ( OPACFinesTab ) %]
122         <!-- FINES BOX -->
123         [% IF ( BORROWER_INF.amountoverfive ) %]
124             <div id="opac-user-fines"> <h3>Fines and Charges</h3>
125             <table>
126                 <tr><th colspan="2">Amount</th></tr>
127                 <tr>
128                     <td>You currently owe fines and charges amounting to:</td>
129                     <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
130                 </tr>
131             </table></div>
132         [% END %]
133
134         [% IF ( BORROWER_INF.amountoverzero ) %]
135            <div id="opac-user-fines"> <h3>Fines and Charges</h3>
136             <table>
137                 <tr><th colspan="2">Amount</th></tr>
138                 <tr><td>You currently owe fines and charges amounting to:</td>
139                 <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td></tr>
140             </table></div>
141         [% END %]
142
143         [% IF ( BORROWER_INF.amountlessthanzero ) %]
144           <div id="opac-user-fines">  <h3>Credits</h3>
145             <table>
146             <tr><th colspan="2">Amount</th></tr>
147             <tr><td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td></tr>
148             </table></div>
149         [% END %]
150 [% END %]
151     
152     [% END %]
153
154     [% IF ( waiting_count ) %]
155     [% IF ( atdestination ) %]
156     <div id="opac-user-waiting">
157         <table id="waitingt">
158             <caption>Holds Waiting</caption>
159            <thead> <tr>
160                 <th colspan="2" class="{sorter:'articles'}">Title</th>
161                 <th>Hold date</th>
162                 <th>Pick Up Library</th>
163             </tr></thead>
164             <tbody>[% FOREACH WAITIN IN WAITING %]
165                 <tr>
166                     <td><img src="[% themelang %]/images/[% WAITIN.itemtype %].gif" alt="[% WAITIN.itemtype %]" title="[% WAITIN.itemtype %]" /></td>
167                     <td><a href="opac-detail.pl?biblionumber=[% WAITIN.biblionumber %]">
168                             [% WAITIN.waiting_title %]
169                         </a><span class="item-details">
170                             [% WAITIN.author %]
171                         </span></td>
172                     <td>[% WAITIN.reservedate %]</td>
173                     <td>[% IF ( WAITIN.atdestination ) %]<strong>Waiting</strong> at [% WAITIN.branch %]
174                         [% ELSE %]
175                         In transit from [% WAITIN.holdingbranch %] to [% WAITIN.branch %]
176                         [% END %]</td>
177                 </tr>
178             [% END %]</tbody>
179         </table></div>
180         [% END %]
181     [% END %]
182
183     <div id="opac-user-checkouts">[% IF ( issues_count ) %]
184         <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
185         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]">
186         <input type="hidden" name="from" value="opac_user" />
187         <table id="checkoutst">
188         <caption>[% issues_count %] Item(s) Checked Out</caption>
189        <thead><tr>
190                 [% IF ( JacketImages ) %]<th class="{sorter: false}">&nbsp;</th>[% END %]
191         <th class="{sorter:'articles'}">Title</th>
192         <th>Due</th>
193                 [% UNLESS ( item_level_itypes ) %]<th>Item Type</th> [% END %]
194         [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
195         <th>Call No.</th>
196         [% IF ( OpacRenewalAllowed ) %]
197         <th class="{sorter: false}">Renew</th>
198         [% END %]
199 [% IF ( OPACFinesTab ) %]
200         <th>Fines</th>
201 [% END %]
202         [% IF ( OPACMySummaryHTML ) %]
203         <th class="{sorter: false}">Links</th>
204         [% END %]
205         </tr></thead>
206         <tbody>
207                 <!-- FIXME: the styling for highlight overrides the overdue red background,
208                                 so currently we don't use this conditional as the first thing inside the LOOP:
209         [% UNLESS ( __odd__ ) %]
210            <tr[% IF ( overdue ) %] class="overdue"[% END %]>
211         [% ELSE %]
212            <tr class="[% IF ( overdue ) %]overdue [% END %]highlight">
213         [% END %]
214                 -->
215                 [% FOREACH ISSUE IN ISSUES %]
216         [% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
217
218 [% IF ( JacketImages ) %]<td class="jacketcell">
219
220 [% 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 %]
221
222 [% 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 %]
223
224 [% 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 %]
225
226 [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( using_https ) %]
227 <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" />
228 [% ELSE %]
229 <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 %]
230
231 </td>[% END %]
232
233                 <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %]</a><span class="item-details">
234                         [% ISSUE.author %]
235                     </span></td>
236                 [% IF ( ISSUE.overdue ) %]
237                     <td class="overdue">[% ISSUE.date_due %]</td>
238                 [% ELSE %]
239                     <td>[% ISSUE.date_due %]</td>
240                 [% END %]
241                 [% UNLESS ( item_level_itypes ) %]<td>[% IF ( ISSUE.imageurl ) %]<img src="[% ISSUE.imageurl %]" title="[% ISSUE.description %]" alt="[% ISSUE.description %]" />[% END %] [% ISSUE.description %]</td>[% END %]
242                 [% IF ( show_barcode ) %]<td>[% ISSUE.barcode %]</td>[% END %]
243                 <td>[% ISSUE.itemcallnumber %]</td>
244                 [% IF ( OpacRenewalAllowed ) %]
245                     <td>[% IF ( ISSUE.status ) %][% IF ( canrenew ) %]<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>[% END %] <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
246                         [% ELSE %]
247                         Not renewable[% IF ( ISSUE.too_many ) %] <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>[% ELSE %][% IF ( ISSUE.on_reserve ) %] <span class="renewals">(On hold)</span>[% END %][% END %] 
248                         [% END %]</td>
249                 [% END %]
250 [% IF ( OPACFinesTab ) %]
251                 <td>[% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
252 [% END %]
253             [% IF ( OPACMySummaryHTML ) %]
254                 <td>[% ISSUE.MySummaryHTML %]</td>
255             [% END %]
256             </tr>
257         [% END %]</tbody>
258         </table>
259            [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
260                 <input type="submit" value="Renew Selected" />
261                 [% END %]
262                 </form>
263         [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
264                 <form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
265                         <input type="hidden" name="from" value="opac_user" />
266                         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
267                         [% FOREACH ISSUE IN ISSUES %]
268                         <input type="hidden" name="item" value="[% ISSUE.itemnumber %]" />
269                         [% END %]
270                         <input type="submit" value="Renew All" />
271                 </form>
272                 [% END %]
273     [% ELSE %]
274         <table>
275             <tr><td>You have nothing checked out</td></tr>
276         </table>
277     [% END %]</div>
278     
279     
280 [% IF ( overdues_count ) %]
281 <div id="opac-user-overdues"><table id="overduest">
282 <caption>Overdues <span class="count">([% overdues_count %] total)</span></caption>
283 <!-- OVERDUES TABLE ROWS -->
284 <thead><tr>
285 [% IF ( JacketImages ) %]<th class="{sorter: false}">&nbsp;</th>[% END %]
286 <th class="{sorter:'articles'}">Title</th>
287 [% UNLESS ( item_level_itypes ) %]<th>Item Type</th> [% END %]
288 [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
289 <th>Call No.</th>
290 <th>Due</th>
291 [% IF ( OpacRenewalAllowed ) %]
292                     <th class="{sorter: false}">Renew</th>
293 [% END %]
294 [% IF ( OPACFinesTab ) %]
295 <th>Fines</th>
296 [% END %]
297 </tr></thead>
298
299 <tbody>[% FOREACH OVERDUE IN OVERDUES %]
300 <tr>
301 [% IF ( JacketImages ) %]<td class="jacketcell">
302
303 [% 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 %]
304
305 [% 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 %]
306
307 [% 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 %]
308
309 [% IF ( SyndeticsCoverImages ) %]
310 [% IF ( using_https ) %]
311 <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"/>
312 [% ELSE %]
313 <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"/>
314 [% END %]
315 [% END %]
316 </td>[% END %]
317
318 <td><a href="/cgi-bin/koha/opac-detail.pl?bib=[% OVERDUE.biblionumber %]">[% OVERDUE.title |html %]</a> <span class="item-details">[% OVERDUE.author %]</span></td>
319
320 [% UNLESS ( item_level_itypes ) %]<td>[% IF ( OVERDUE.imageurl ) %]<img src="[% OVERDUE.imageurl %]" title="[% OVERDUE.description %]" alt="[% OVERDUE.description %]" />[% END %] [% OVERDUE.description %]</td>[% END %]
321 [% IF ( show_barcode ) %]<td>[% OVERDUE.barcode %]</td>[% END %]
322 <td>[% OVERDUE.itemcallnumber %]</td>
323 <td>[% OVERDUE.date_due %]</td>
324                 [% IF ( OpacRenewalAllowed ) %]
325 <td>
326 [% IF ( OVERDUE.debarred ) %]Account Frozen
327 [% ELSIF ( OVERDUE.status ) %]
328 [% 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>
329 [% ELSIF ( OVERDUE.onreserve ) %]On hold
330 [% ELSE %]No renewals left
331 [% END %]
332 </td>[% END %]
333 [% IF ( OPACFinesTab ) %]
334 <td>[% IF ( OVERDUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
335 [% END %]
336 </tr>
337 [% END %]</tbody>
338 </table></div>
339 [% END %]
340     
341
342     [% IF ( reserves_count ) %]
343         <div id="opac-user-holds">
344         <table id="holdst">
345         <caption>Holds <span class="count">([% reserves_count %] total)</span></caption>
346             <!-- RESERVES TABLE ROWS -->
347             <thead><tr>
348                 <th class="{sorter:'articles'}">Title</th>
349                 <th>Placed On</th>
350                 <th>Expires On</th>
351                 <th>Pick Up Location</th>
352                 [% IF ( showpriority ) %]
353                         <th>Priority</th>
354                 [% END %]
355                 <th>Status</th>
356                 <th class="{sorter: false}">Modify</th>
357             </tr></thead>
358                         <tbody>
359             [% FOREACH RESERVE IN RESERVES %]
360            [% IF ( RESERVE.wait ) %]
361                         [% IF ( RESERVE.atdestination ) %]
362                             [% IF ( RESERVE.found ) %]
363                             <tr class="reserved">
364                             [% ELSE %]
365                             <tr>
366                         [% END %]
367                         [% ELSE %]
368                             <tr class="transfered">
369                         [% END %]
370                     [% ELSE %]
371                             <tr>
372                     [% END %]
373                 <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">[% RESERVE.reserves_title %]</a>
374                     [% RESERVE.author %]
375                 </td>
376                 <td>[% RESERVE.reservedate %]</td>
377                 <td>[% IF ( RESERVE.expirationdate ) %][% RESERVE.expirationdate %][% ELSE %]Never Expires[% END %]</td>
378                 <td>[% RESERVE.branch %]</td>
379                                 [% IF ( showpriority ) %]
380                                 <td>[% RESERVE.priority %] </td>
381                                 [% END %]
382                 <td>
383                     [% IF ( RESERVE.wait ) %]
384                         [% IF ( RESERVE.atdestination ) %]
385                             [% IF ( RESERVE.found ) %]
386                             Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.formattedwaitingdate ) %] since [% RESERVE.formattedwaitingdate %][% END %]
387                             <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
388                             [% ELSE %]
389                             Item waiting to be pulled from <b> [% RESERVE.wbrname %]</b>
390                         [% END %]
391                         [% ELSE %]
392                             Item in transit to <b> [% RESERVE.wbrname %]</b> <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
393                         [% END %]
394                     [% ELSE %]
395                             [% IF ( RESERVE.intransit ) %]
396                                 Item in transit from <b> [% RESERVE.frombranch %]</b> since 
397                                 [% RESERVE.datesent %]
398                             [% ELSE %]
399                                 Pending
400                             [% END %]
401                     [% END %]
402                 </td>
403                 <td>
404                 [% IF ( RESERVE.cancelable ) %]
405                         <form action="/cgi-bin/koha/opac-modrequest.pl" method="post">
406                         <input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber %]" />
407                 <input type="hidden" name="reservenumber" value="[% RESERVE.reservenumber %]" />
408                         <input type="submit" name="submit" class="icon delete cancel" value="Cancel" onclick="return confirmDelete('Are you sure you want to cancel this hold?');" /></form>
409                 [% ELSE %]
410                         &nbsp;
411                 [% END %]
412                 </td>
413
414             </tr>
415             [% END %]
416                         </tbody>
417         </table>
418     </div>
419     [% END %]
420     </div><!-- /opac-user views -->
421     </div><!-- /userdetails -->
422 </div>
423 </div>
424 </div>
425 <div class="yui-b">
426 <div id="leftmenus" class="container">
427 [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
428 </div>
429 </div>
430 </div>
431 [% INCLUDE 'opac-bottom.inc' %]