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