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