Adding checks for dateformat preference so that tablesorter script can be passed...
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-user.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo; Library Home for
3 <!-- TMPL_LOOP name="BORROWER_INFO" -->
4     <!-- TMPL_VAR name="firstname" --><!-- TMPL_VAR name="surname" -->
5 <!-- /TMPL_LOOP -->
6 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
7 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pack.js"></script>
8 <script type="text/JavaScript" language="JavaScript">
9 //<![CDATA[
10 $.tablesorter.addParser({
11     id: 'articles', 
12     is: function(s) {return false;  }, 
13     format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
14     type: 'text' 
15 });
16             $(function() {
17             $('#opac-user-views > ul').tabs();
18                         $("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
19                 dateFormat: 'uk',<!-- /TMPL_IF -->
20                                 widgets : ['zebra'],
21                                 sortList: [[0,0]],
22                         headers: { 0: { sorter: 'articles' },4: { sorter: false }
23                                 }
24                         }); 
25                         $("#checkoutst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
26                 dateFormat: 'uk',<!-- /TMPL_IF -->
27                                 widgets : ['zebra'],
28                                 <!-- TMPL_IF NAME="AmazonContent" -->
29                                 sortList: [[3,0]],
30                                 <!-- TMPL_IF NAME="item-level_itypes" -->
31                                 sortList: [[3,0]],
32                                 headers: { 0: { sorter: false }, 1: { sorter: 'articles' },4: { sorter: false },5: { sorter: false }}
33                                 <!-- TMPL_ELSE -->
34                                 sortList: [[3,0]],
35                                 headers: { 0: { sorter: false }, 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }}
36                                 <!-- /TMPL_IF -->
37                                 <!-- TMPL_ELSE -->
38                                 sortList: [[2,0]],
39                                 <!-- TMPL_IF NAME="item-level_itypes" -->
40                                 sortList: [[2,0]],
41                                 headers: { 0: { sorter: 'articles' },3: { sorter: false },4: { sorter: false }}
42                                 <!-- TMPL_ELSE -->
43                                 sortList: [[3,0]],
44                                 headers: { 0: { sorter: 'articles' },4: { sorter: false },5: { sorter: false }}
45                                 <!-- /TMPL_IF -->
46                                 <!-- /TMPL_IF -->
47                         }); 
48             });
49 //]]>
50 </script>
51 </head>
52 <body>
53 <!-- TMPL_INCLUDE NAME="masthead.inc" -->
54
55 <div id="doc3" class="yui-t1">
56    <div id="bd">
57     <div id="yui-main">
58     <div class="yui-b"><div class="yui-g">
59         <div id="userdetails" class="container">
60     <!-- TMPL_LOOP NAME="BORROWER_INFO" -->
61         <h2>Hello, <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> <span class="hint">(<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here</a> if you're not <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->)</span></h2>
62         
63                 <!-- TMPL_IF NAME="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><!-- /TMPL_IF -->
64                 
65         <!-- TMPL_IF NAME="opacnote"-->
66             <h3>Message from the library</h3>
67             <p><!-- TMPL_VAR name="opacnote" --></p>
68         <!-- /TMPL_IF -->
69         <!-- TMPL_IF NAME="flagged" -->
70         <ul>
71             <!-- TMPL_IF NAME="debarred" -->
72                 <li><strong>Please note:</strong> Your account has been frozen. 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 consult a librarian.</li>
73             <!-- /TMPL_IF -->
74             <!-- TMPL_IF NAME="gonenoaddress" -->
75                 <li><strong>Please note:</strong> According to our records, we don't have up-to-date <a href="/cgi-bin/koha/opac-userdetails.pl">contact information</a> on file.  Please contact your librarian, 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)</li>
76             <!-- /TMPL_IF -->
77             <!-- TMPL_IF NAME="lost" -->
78                 <li><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please take your card to the circulation desk at your local library and the error will be corrected.</li>
79             <!-- /TMPL_IF -->
80         </ul>
81         <!-- /TMPL_IF -->
82         
83 <div id="opac-user-views" class="toptabs">
84         <ul>
85             <li><a href="/cgi-bin/koha/opac-user.pl#opac-user-checkouts">Checked Out</a></li>
86             <!-- TMPL_IF NAME="overdues_count" --><li><a href="/cgi-bin/koha/opac-user.pl#opac-user-overdues">Overdue</a></li><!-- /TMPL_IF -->
87             <!-- TMPL_IF NAME="amountoverfive" --><li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Fines</a></li><!-- /TMPL_IF -->
88             <!-- TMPL_IF NAME="amountoverzero" --><li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Fines</a></li><!-- /TMPL_IF -->
89             <!-- TMPL_IF NAME="amountlessthanzero" --><li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Credits</a></li><!-- /TMPL_IF -->
90             <!-- TMPL_IF NAME="waiting_count" --><!-- TMPL_IF NAME="atdestination" --><li><a href="/cgi-bin/koha/opac-user.pl#opac-user-waiting">Waiting</a></li><!-- /TMPL_IF --><!-- /TMPL_IF -->
91             <!-- TMPL_IF NAME="reserves_count" --><li><a href="/cgi-bin/koha/opac-user.pl#opac-user-holds">Holds</a></li><!-- /TMPL_IF -->
92         </ul>
93         
94         <!-- FINES BOX -->
95         <!-- TMPL_IF NAME="amountoverfive" -->
96             <div id="opac-user-fines"> <h3>Fines and Charges</h3>
97             <table>
98                 <tr><th colspan="2">Amount</th></tr>
99                 <tr>
100                     <td>You currently owe fines and charges amounting to:</td>
101                     <td><a href="/cgi-bin/koha/opac-account.pl"><!-- TMPL_VAR NAME="amountoutstanding" --></a></td>
102                 </tr>
103             </table></div>
104         <!-- /TMPL_IF -->
105
106         <!-- TMPL_IF NAME="amountoverzero" -->
107            <div id="opac-user-fines"> <h3>Fines and Charges</h3>
108             <table>
109                 <tr><th colspan="2">Amount</th></tr>
110                 <tr><td>You currently owe fines and charges amounting to:</td>
111                 <td><a href="/cgi-bin/koha/opac-account.pl"><!-- TMPL_VAR NAME="amountoutstanding" --></a></td></tr>
112             </table></div>
113         <!-- /TMPL_IF -->
114
115         <!-- TMPL_IF NAME="amountlessthanzero" -->
116           <div id="opac-user-fines">  <h3>Credits</h3>
117             <table>
118             <tr><th colspan="2">Amount</th></tr>
119             <tr><td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl"><!-- TMPL_VAR NAME="amountoutstanding" --></a></td></tr>
120             </table></div>
121         <!-- /TMPL_IF -->
122     
123     <!-- /TMPL_LOOP -->
124
125     <!-- TMPL_IF NAME="waiting_count" -->
126     <!-- TMPL_IF NAME="atdestination" -->
127     <div id="opac-user-waiting">
128         <table id="waitingt">
129             <caption>Holds Waiting</caption>
130             <tr>
131                 <th colspan="2">Title</th>
132                 <th>Hold date</th>
133                 <th>Pick Up Branch</th>
134             </tr>
135             <!-- TMPL_LOOP NAME="WAITING" -->
136                 <tr>
137                     <td>
138                         <img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="itemtype" -->" title="<!-- TMPL_VAR NAME="itemtype" -->" />
139                     </td>
140                     <td>
141                         <a href="opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
142                             <!-- TMPL_VAR NAME="waiting_title" -->
143                         </a>
144                         <span class="item-details">
145                             <!-- TMPL_VAR NAME="author" -->
146                         </span>
147                     </td>
148                     <td>
149                         <!-- TMPL_VAR NAME="reservedate" -->
150                     </td>
151                     <td>
152                         <!-- TMPL_IF NAME="atdestination" -->
153                         <strong>Waiting</strong> at <!-- TMPL_VAR NAME="branch" -->
154                         <!-- TMPL_ELSE -->
155                         In transit from <!-- TMPL_VAR NAME="holdingbranch" --> to <!-- TMPL_VAR NAME="branch" -->
156                         <!-- /TMPL_IF -->
157                     </td>
158                 </tr>
159             <!-- /TMPL_LOOP -->
160         </table></div>
161         <!-- /TMPL_IF -->
162     <!-- /TMPL_IF -->
163
164     <div id="opac-user-checkouts"><!-- TMPL_IF NAME="issues_count" -->
165         <table id="checkoutst">
166         <caption><!-- TMPL_VAR NAME="issues_count" --> Items Checked Out</caption>
167        <thead><tr>
168                 <!-- TMPL_IF NAME="AmazonContent" --><th>&nbsp;</th><!-- /TMPL_IF -->
169         <th>Title</th>
170                 <!-- TMPL_UNLESS NAME="item-level_itypes" --><th>Item Type</th> <!-- /TMPL_UNLESS -->
171         <th>Call No.</th>
172         <th>Due</th>
173         <!-- TMPL_IF name="OpacRenewalAllowed" -->
174         <!-- TMPL_UNLESS name="patron_flagged" --><th>Renew</th><!-- /TMPL_UNLESS -->
175         <!-- /TMPL_IF -->
176         <th>Fines</th>
177         </tr></thead>
178         <tbody><!-- TMPL_LOOP NAME="ISSUES" -->
179         <!-- TMPL_IF NAME="toggle" -->
180             
181             <!-- TMPL_IF NAME="overdue" -->
182                 <tr class="overdue">
183             <!-- TMPL_ELSE -->
184                 <tr>
185             <!-- /TMPL_IF -->
186             
187             <!-- TMPL_ELSE -->
188             
189         <!-- TMPL_IF NAME="overdue" -->
190                 <tr class="highlight overdue">
191             <!-- TMPL_ELSE -->
192                 <tr class="highlight">
193             <!-- /TMPL_IF -->
194             
195             <!-- /TMPL_IF -->
196                         <!-- TMPL_IF NAME="AmazonContent" --><td><!-- TMPL_IF NAME="isbn" --><a href="/cgi-bin/koha/opac-detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="isbn" -->.01.THUMBZZZ.jpg" alt="Book Cover Image" class="thumbnail" /></a><!-- /TMPL_IF --></td><!-- /TMPL_IF -->
197                 <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>
198                     <span class="item-details">
199                         <!-- TMPL_VAR NAME="author" -->
200                     </span>
201                 </td>
202                 <!-- TMPL_UNLESS NAME="item-level_itypes" --><td>
203                     <!-- TMPL_IF NAME="imageurl" --><img src="<!-- TMPL_VAR NAME="imageurl" -->" title="<!-- TMPL_VAR name="description" -->" alt="<!-- TMPL_VAR NAME="description" -->" /><!-- /TMPL_IF --> <!-- TMPL_VAR name="description" -->
204                 </td><!-- /TMPL_UNLESS -->
205                 <td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
206                 <!-- TMPL_IF NAME="overdue" -->
207                     <td class="overdue"><!-- TMPL_VAR NAME="date_due" --></td>
208                 <!-- TMPL_ELSE -->
209                     <td><!-- TMPL_VAR NAME="date_due" --></td>
210                 <!-- /TMPL_IF -->
211                 <!-- TMPL_IF name="OpacRenewalAllowed" -->
212                     <!-- TMPL_UNLESS name="patron_flagged" -->
213                     <td>
214                         <!-- TMPL_IF NAME="status" -->
215                             <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=<!-- TMPL_VAR NAME="itemnumber" -->&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Renew</a> <span class="renewals">(<!-- TMPL_VAR NAME="renewsleft" --> of <!-- TMPL_VAR NAME="renewsallowed" --> renewals remaining)</span>
216                         <!-- TMPL_ELSE -->
217                             Not renewable
218                         <!-- /TMPL_IF -->
219                     </td>
220                     <!-- /TMPL_UNLESS -->
221                 <!-- /TMPL_IF -->
222                 <td><!-- TMPL_IF NAME="charges" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
223             </tr>
224         <!-- /TMPL_LOOP --></tbody>
225         </table>
226         <!-- FIXME: See bug 1101 <!--TMPL_IF Name="OpacRenewalAllowed"-->
227             <form action="/cgi-bin/koha/opac-renew.pl" method="post">
228                 <input type="hidden" name="from" value="opac_user" />
229                 <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
230                 <!-- TMPL_LOOP NAME="ISSUES" -->
231                 <input type="hidden" name="item" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
232                 <!-- /TMPL_LOOP -->
233                 <input type="submit" value="Renew All" />
234             </form>
235         <!--/TMPL_IF--> -->
236     <!-- TMPL_ELSE -->
237         <table>
238             <tr><td>You have nothing checked out</td></tr>
239         </table>
240     <!-- /TMPL_IF --></div>
241     
242     
243 <!-- TMPL_IF NAME="overdues_count" -->
244 <div id="opac-user-overdues"><table id="overduest">
245 <caption>Overdues <span class="count">(<!-- TMPL_VAR NAME="overdues_count" --> total)</span></caption>
246 <!-- OVERDUES TABLE ROWS -->
247 <tr>
248 <th colspan="2">Title</th><th>Call No.</th>
249 <th>Due</th>
250 <th>Renew</th>
251 <!-- <th>Fine to Date</th> -->
252 </tr>
253
254 <!-- TMPL_LOOP NAME="OVERDUES" -->
255 <tr>
256 <td><img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="ccode" -->.gif" alt="<!-- TMPL_VAR NAME="ccode" -->" title="<!-- TMPL_VAR NAME="ccode" -->" /></td>
257 <td><!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="isbn" --><a href="/cgi-bin/koha/opac-detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="isbn" -->.01.THUMBZZZ.jpg" alt="" class="thumbnail" /></a><!-- /TMPL_IF --><!-- /TMPL_IF --> <a href="/cgi-bin/koha/opac-detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a><span class="item-details">
258 <!-- TMPL_VAR NAME="author" --></span></td>
259 <td><!-- TMPL_VAR NAME="classification" --></td>
260 <td><!-- TMPL_VAR NAME="date_due" --></td>
261 <td>
262 <!-- TMPL_IF NAME="debarred" -->Account Frozen
263 <!-- TMPL_ELSE -->
264 <!-- TMPL_IF NAME="status" -->
265 <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=<!-- TMPL_VAR NAME="itemnumber" -->&amp;bornum=<!-- TMPL_VAR NAME="borrowernumber" -->">Renew</a> <span class="renewals">(<!-- TMPL_VAR NAME="renewsleft" --> of <!-- TMPL_VAR NAME="renewsallowed" --> renewals remaining)</span>
266 <!-- TMPL_ELSE -->
267 <!-- TMPL_IF NAME="onreserve" -->
268 On Reserve
269 <!-- TMPL_ELSE -->
270 No renewals left
271 <!-- /TMPL_IF -->
272 <!-- /TMPL_IF -->
273 <!-- /TMPL_IF -->
274 </td>
275 <!-- <td><!-- TMPL_VAR NAME="charges" --></td> -->
276 </tr>
277 <!-- /TMPL_LOOP -->
278 </table></div>
279 <!-- /TMPL_IF -->
280     
281
282     <!-- TMPL_IF NAME="reserves_count" -->
283         <div id="opac-user-holds">
284         <table id="holdst">
285         <caption>Holds <span class="count">(<!-- TMPL_VAR NAME="reserves_count" --> total)</span></caption>
286             <!-- RESERVES TABLE ROWS -->
287             <thead><tr>
288                 <th>Title</th>
289                 <th>Placed On</th>
290                 <th>Pick Up Location</th>
291                 <th>Status</th>
292                 <th>Modify</th>
293             </tr></thead>
294                         <tbody>
295             <!-- TMPL_LOOP NAME="RESERVES" -->
296            <!-- TMPL_IF NAME="wait" -->
297                         <!-- TMPL_IF NAME="atdestination" -->
298                             <!-- TMPL_IF NAME="found" -->
299                             <tr class="reserved">
300                             <!-- TMPL_ELSE -->
301                             <tr>
302                         <!-- /TMPL_IF -->
303                         <!-- TMPL_ELSE -->
304                             <tr class="transfered">
305                         <!-- /TMPL_IF -->
306                     <!-- TMPL_ELSE -->
307                             <tr>
308                     <!-- /TMPL_IF -->
309                 <td>
310                     <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="reserves_title" --></a>
311                     <!-- TMPL_VAR NAME="author" -->
312                 </td>
313                 <td><!-- TMPL_VAR NAME="reservedate" --></td>
314                 <td><!-- TMPL_VAR NAME="branch" --></td>
315                 <td>
316                     <!-- TMPL_IF NAME="wait" -->
317                         <!-- TMPL_IF NAME="atdestination" -->
318                             <!-- TMPL_IF NAME="found" -->
319                             Item waiting at <b> <!-- TMPL_VAR NAME="wbrname" --></b>
320                             <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcd" -->" />
321                             <!-- TMPL_ELSE -->
322                             Item waiting to be pulled from <b> <!-- TMPL_VAR NAME="wbrname" --></b>
323                         <!-- /TMPL_IF -->
324                         <!-- TMPL_ELSE -->
325                             Item in transit to <b> <!-- TMPL_VAR NAME="wbrname" --></b> <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcd" -->" />
326                         <!-- /TMPL_IF -->
327                     <!-- TMPL_ELSE -->
328                             Item waiting to be pulled
329                     <!-- /TMPL_IF -->
330                 </td>
331                 <td>
332                 <form action="/cgi-bin/koha/opac-modrequest.pl" method="post">
333                 <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
334                 <input type="submit" name="submit" class="icon delete cancel" value="Cancel" onclick="return confirmDelete('Are you sure you want to cancel this hold?');" /></form>
335                 </td>
336
337             </tr>
338             <!-- /TMPL_LOOP -->
339                         </tbody>
340         </table>
341     </div>
342     <!-- /TMPL_IF -->
343     </div><!-- /opac-user views -->
344     </div><!-- /userdetails -->
345 </div>
346 </div>
347 </div>
348 <div class="yui-b">
349 <div class="container">
350 <!--TMPL_INCLUDE NAME="navigation.inc" -->
351 <!-- TMPL_INCLUDE name="usermenu.inc" -->
352 </div>
353 </div>
354 </div>
355 <!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->