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