Bug 7110 - Renewal messages still displays in OPAC if OpacRenewalAllowed is disabled.
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-user.tt
index c6bc33a..8fc13d9 100644 (file)
@@ -1,11 +1,9 @@
 [% INCLUDE 'doc-head-open.inc' %]
-[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Library Home for
-[% FOREACH BORROWER_INF IN BORROWER_INFO %]
-    [% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]
-[% END %]
+[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Your library home
 [% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.metadata.min.js"></script>
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-<script type="text/JavaScript" language="JavaScript">
+<script type="text/JavaScript">
 //<![CDATA[
 var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?");
 $.tablesorter.addParser({
@@ -16,54 +14,35 @@ $.tablesorter.addParser({
 });
             $(function() {
             $('#opac-user-views > ul').tabs();
-                       $("#holdst").tablesorter({[% IF ( dateformat == 'metric' ) %]
-               dateFormat: 'uk',[% END %]
-                               widgets : ['zebra'],
-                               sortList: [[0,0]],
-                       headers: { 0: { sorter: 'articles' },5: { sorter: false }
-                               }
-                       }); 
-                       $("#checkoutst").tablesorter({[% IF ( dateformat == 'metric' ) %]
-               dateFormat: 'uk',[% END %]
-                               widgets : ['zebra'],
-                               [% IF ( JacketImages ) %]
-                                       sortList: [[3,0]],
-                                               [% IF ( item_level_itypes ) %]
-                                                       headers: { 0: { sorter: false }, 1: { sorter: 'articles' },4: { sorter: false },5: { sorter: false },6: { sorter: false }}
-                                               [% ELSE %]
-                                                       headers: { 0: { sorter: false }, 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false },7: { sorter: false }}
-                                               [% END %]
-                               [% ELSE %]
-                                               [% IF ( item_level_itypes ) %]
-                                                       sortList: [[2,0]],
-                                                       headers: { 0: { sorter: 'articles' },3: { sorter: false },4: { sorter: false },5: { sorter: false }}
-                                               [% ELSE %]
-                                                       sortList: [[3,0]],
-                                                       headers: { 0: { sorter: 'articles' },4: { sorter: false },5: { sorter: false },6: { sorter: false }}
-                                       [% END %]
-                               [% END %]
+            $.tablesorter.defaults.widgets = ['zebra'];
+            [% IF ( dateformat == 'metric' ) %]$.tablesorter.defaults.dateFormat = ['uk'];[% END %]
+                       $("#holdst").tablesorter({
+                               sortList: [[0,0]]
                        }); 
-                       $("#overduest").tablesorter({[% IF ( dateformat == 'metric' ) %]
-               dateFormat: 'uk',[% END %]
-                               widgets : ['zebra'],
-                               [% IF ( JacketImages ) %]
-                                       sortList: [[1,0]],
-                                               [% IF ( item_level_itypes ) %]
-                                                       headers: { 0: { sorter: false }, 1: { sorter: 'articles' },4: { sorter: false },5: { sorter: false }}
-                                               [% ELSE %]
-                                                       headers: { 0: { sorter: false }, 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }}
-                                               [% END %]
-                               [% ELSE %]
-                                               [% IF ( item_level_itypes ) %]
-                                                       sortList: [[0,0]],
-                                                       headers: { 0: { sorter: 'articles' },3: { sorter: false }}
-                                               [% ELSE %]
-                                                       sortList: [[0,0]],
-                                                       headers: { 0: { sorter: 'articles' },1: { sorter: false },3: { sorter: false }}
-                                       [% END %]
-                               [% END %]
-                       });
+                       $("#checkoutst").tablesorter({
+                [% IF ( JacketImages ) %]sortList: [[2,0]][% ELSE %]sortList: [[1,0]][% END %]
+            }); 
+                       $("#overduest").tablesorter();
 [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
+        [% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]$("#renewselected").submit(function(){
+            valid = false;
+            $("input[type=checkbox]").each(function(){
+                if($(this).is(':checked')){
+                    valid = true;
+                }
+            });
+            if(!valid){
+                alert(_("Nothing has been selected. Check the box for each item you want to renew"));
+            }
+            return valid;
+        });
+        $("#renewselected_link").live('click',function(){
+            $("#renewselected").submit();
+        });
+        $("#renewall_link").live('click',function(){
+            $("#renewall").submit();
+        });
+        $("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");[% END %]
             });
 //]]>
 </script>
@@ -76,7 +55,6 @@ $.tablesorter.addParser({
     <div id="yui-main">
     <div class="yui-b"><div class="yui-g">
        <div id="userdetails" class="container">
-
        [% IF ( bor_messages ) %]
               <div class="dialog message">
                       <h3>Messages For You</h3>
@@ -93,16 +71,25 @@ $.tablesorter.addParser({
               </div>
        [% END %]
     [% FOREACH BORROWER_INF IN BORROWER_INFO %]
-        <h2>Hello, [% BORROWER_INF.firstname %] [% BORROWER_INF.surname %] <span class="hint">(<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here</a> if you're not [% BORROWER_INF.title %] [% BORROWER_INF.firstname %] [% BORROWER_INF.surname %])</span></h2>
+        <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 %]
+        <span class="hint">(<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here</a> if you're not
+        [% 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 %])
+        </span></h2>
         
-               [% IF ( BORROWER_INF.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 %]
+               [% 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 %]
                
+        [% IF ( BORROWER_INF.warndeparture ) %]
+        <div class="dialog alert">
+                <strong>Please note:</strong><span> Your card will expire on [% BORROWER_INF.warndeparture %]. Please contact the library if you wish to renew your subscription.</span>
+                [% IF ( BORROWER_INF.returnbeforeexpiry ) %]<span> Also note that you must return all checked out items before your card expires.</span>[% END %]
+        </div>
+        [% END %]
 
-        [% IF ( BORROWER_INF.flagged ) %]
+        [% IF ( patron_flagged ) %]
                <div class="dialog alert">
         <ul>
-            [% IF ( BORROWER_INF.debarred ) %]
-                <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 contact the library.</li>
+            [% IF ( userdebarred ) %]
+                <li><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INF.userdebarreddate ) %] until [% BORROWER_INF.userdebarreddate %][% END %][% IF ( BORROWER_INF.debarredcomment ) %] with the comment "[% BORROWER_INF.debarredcomment %]"[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li>
             [% END %]
             [% IF ( BORROWER_INF.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>
@@ -110,8 +97,10 @@ $.tablesorter.addParser({
             [% IF ( BORROWER_INF.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>
             [% END %]
-            [% IF ( BORROWER_INF.renewal_blocked_fines ) %]
-                <li><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">more than [% BORROWER_INF.renewal_blocked_fines %]</a> in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li>
+            [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
+                <li><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">more than [% renewal_blocked_fines %]</a> in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li>
+            [% ELSIF ( renewal_blocked_fines ) %]
+               <li><strong>Please note: </strong> You have <a href="/cgi-bin/koha/opac-account.pl">more than [% renewal_blocked_fines %]</a> in fines. </li>
             [% END %]
         </ul></div>
         [% END %]
@@ -121,9 +110,9 @@ $.tablesorter.addParser({
             <li><a href="/cgi-bin/koha/opac-user.pl#opac-user-checkouts">Checked Out</a></li>
             [% IF ( overdues_count ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-overdues">Overdue</a></li>[% END %]
 [% IF ( OPACFinesTab ) %]
-            [% IF ( amountoverfive ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Fines</a></li>[% END %]
-            [% IF ( amountoverzero ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Fines</a></li>[% END %]
-            [% IF ( amountlessthanzero ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Credits</a></li>[% END %]
+            [% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Fines</a></li>[% END %]
+            [% IF ( BORROWER_INF.amountoverzero ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Fines</a></li>[% END %]
+            [% IF ( BORROWER_INF.amountlessthanzero ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-fines">Credits</a></li>[% END %]
 [% END %]
             [% IF ( waiting_count ) %][% IF ( BORROWER_INF.atdestination ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-waiting">Waiting</a></li>[% END %][% END %]
             [% IF ( reserves_count ) %]<li><a href="/cgi-bin/koha/opac-user.pl#opac-user-holds">Holds</a></li>[% END %]
@@ -168,7 +157,7 @@ $.tablesorter.addParser({
         <table id="waitingt">
             <caption>Holds Waiting</caption>
            <thead> <tr>
-                <th colspan="2">Title</th>
+                <th colspan="2" class="{sorter:'articles'}">Title</th>
                 <th>Hold date</th>
                 <th>Pick Up Library</th>
             </tr></thead>
@@ -192,26 +181,26 @@ $.tablesorter.addParser({
     [% END %]
 
     <div id="opac-user-checkouts">[% IF ( issues_count ) %]
-        <form action="/cgi-bin/koha/opac-renew.pl" method="post">
+        <form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
        <input type="hidden" name="borrowernumber" value="[% borrowernumber %]">
        <input type="hidden" name="from" value="opac_user" />
         <table id="checkoutst">
         <caption>[% issues_count %] Item(s) Checked Out</caption>
        <thead><tr>
-               [% IF ( JacketImages ) %]<th>&nbsp;</th>[% END %]
-        <th>Title</th>
+               [% IF ( JacketImages ) %]<th class="{sorter: false}">&nbsp;</th>[% END %]
+        <th class="{sorter:'articles'}">Title</th>
+        <th>Due</th>
                [% UNLESS ( item_level_itypes ) %]<th>Item Type</th> [% END %]
         [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
         <th>Call No.</th>
-        <th>Due</th>
         [% IF ( OpacRenewalAllowed ) %]
-        [% UNLESS ( patron_flagged ) %]<th>Renew</th>[% END %]
+        <th class="{sorter: false}">Renew</th>
         [% END %]
 [% IF ( OPACFinesTab ) %]
         <th>Fines</th>
 [% END %]
-        [% IF ( OPACMySummaryhtml ) %]
-        <th>Links</th>
+        [% IF ( OPACMySummaryHTML ) %]
+        <th class="{sorter: false}">Links</th>
         [% END %]
         </tr></thead>
         <tbody>
@@ -232,57 +221,53 @@ $.tablesorter.addParser({
 
 [% 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 %]
 
-[% IF ( BakerTaylorEnabled ) %][% IF ( ISSUE.normalized_isbn ) %]<a href="https://[% ISSUE.BakerTaylorBookstoreurl |html %][% ISSUE.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% ISSUE.BakerTaylorImageurl |html %][% ISSUE.normalized_isbn %]" /></a>[% ELSE %]<span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_isbn! -->[% END %][% END %]
+[% 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 %]
 
 [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( using_https ) %]
-<img src="https://secure.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn %]/SC.GIF&amp;client=[% ISSUE.SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% ISSUE.normalized_upc %]&amp;oclc=[% ISSUE.normalized_oclc %]" alt="" class="thumbnail" />
+<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" />
 [% ELSE %]
-<img src="http://www.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn %]/SC.GIF&amp;client=[% ISSUE.SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% ISSUE.normalized_upc %]&amp;oclc=[% ISSUE.normalized_oclc %]" alt="" class="thumbnail" />[% END %][% END %][% END %]
+<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 %]
 
 </td>[% END %]
 
                 <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %]</a><span class="item-details">
                         [% ISSUE.author %]
                     </span></td>
-                [% UNLESS ( item_level_itypes ) %]<td>[% IF ( ISSUE.imageurl ) %]<img src="[% ISSUE.imageurl %]" title="[% ISSUE.description %]" alt="[% ISSUE.description %]" />[% END %] [% ISSUE.description %]</td>[% END %]
-                [% IF ( show_barcode ) %]<td>[% ISSUE.barcode %]</td>[% END %]
-                <td>[% ISSUE.itemcallnumber %]</td>
                 [% IF ( ISSUE.overdue ) %]
                     <td class="overdue">[% ISSUE.date_due %]</td>
                 [% ELSE %]
                     <td>[% ISSUE.date_due %]</td>
                 [% END %]
+                [% UNLESS ( item_level_itypes ) %]<td>[% IF ( ISSUE.imageurl ) %]<img src="[% ISSUE.imageurl %]" title="[% ISSUE.description %]" alt="[% ISSUE.description %]" />[% END %] [% ISSUE.description %]</td>[% END %]
+                [% IF ( show_barcode ) %]<td>[% ISSUE.barcode %]</td>[% END %]
+                <td>[% ISSUE.itemcallnumber %]</td>
                 [% IF ( OpacRenewalAllowed ) %]
-                    [% UNLESS ( ISSUE.patron_flagged ) %]
-                    <td>[% IF ( ISSUE.status ) %]<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> <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
+                    <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>
                         [% ELSE %]
                         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 %] 
                         [% END %]</td>
-                    [% END %]
                 [% END %]
-[% IF ( ISSUE.OPACFinesTab ) %]
+[% IF ( OPACFinesTab ) %]
                 <td>[% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
 [% END %]
-            [% IF ( ISSUE.OPACMySummaryhtml ) %]
-                <td>[% ISSUE.MySummaryhtml %]</td>
+            [% IF ( OPACMySummaryHTML ) %]
+                <td>[% ISSUE.MySummaryHTML %]</td>
             [% END %]
             </tr>
         [% END %]</tbody>
         </table>
-       
-               [% IF ( OpacRenewalAllowed ) %]
+          [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
                <input type="submit" value="Renew Selected" />
                [% END %]
                </form>
-               [% IF ( OpacRenewalAllowed ) %]
-               
-               <form action="/cgi-bin/koha/opac-renew.pl" method="post">
+        [% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
+               <form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
                        <input type="hidden" name="from" value="opac_user" />
                        <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
                        [% FOREACH ISSUE IN ISSUES %]
                        <input type="hidden" name="item" value="[% ISSUE.itemnumber %]" />
                        [% END %]
-                       [% UNLESS ( patron_flagged ) %]<input type="submit" value="Renew All" />[% END %]
+                       <input type="submit" value="Renew All" />
                </form>
                [% END %]
     [% ELSE %]
@@ -297,14 +282,15 @@ $.tablesorter.addParser({
 <caption>Overdues <span class="count">([% overdues_count %] total)</span></caption>
 <!-- OVERDUES TABLE ROWS -->
 <thead><tr>
-[% IF ( JacketImages ) %]<th>&nbsp;</th>[% END %]
-<th>Title</th>
+[% IF ( JacketImages ) %]<th class="{sorter: false}">&nbsp;</th>[% END %]
+<th class="{sorter:'articles'}">Title</th>
 [% UNLESS ( item_level_itypes ) %]<th>Item Type</th> [% END %]
 [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
 <th>Call No.</th>
 <th>Due</th>
 [% IF ( OpacRenewalAllowed ) %]
-                    [% UNLESS ( patron_flagged ) %]<th>Renew</th>[% END %][% END %]
+                    <th class="{sorter: false}">Renew</th>
+[% END %]
 [% IF ( OPACFinesTab ) %]
 <th>Fines</th>
 [% END %]
@@ -318,13 +304,13 @@ $.tablesorter.addParser({
 
 [% 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 %]
 
-[% IF ( BakerTaylorEnabled ) %][% IF ( OVERDUE.normalized_isbn ) %]<a href="https://[% OVERDUE.BakerTaylorBookstoreurl |html %][% OVERDUE.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% OVERDUE.BakerTaylorImageurl |html %][% OVERDUE.normalized_isbn %]" /></a>[% ELSE %]<!-- BakerTaylor needs normalized_isbn! --><span class="no-image">No cover image available</span>[% END %][% END %]
+[% 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 %]
 
 [% IF ( SyndeticsCoverImages ) %]
 [% IF ( using_https ) %]
-<img src="https://secure.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn %]/SC.GIF&amp;client=[% OVERDUE.SyndeticsClientCode %]&amp;upc=[% OVERDUE.normalized_upc %]&amp;oclc=[% OVERDUE.normalized_oclc %]&amp;type=xw10" alt="" class="thumbnail"/>
+<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"/>
 [% ELSE %]
-<img src="http://www.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn %]/SC.GIF&amp;client=[% OVERDUE.SyndeticsClientCode %]&amp;upc=[% OVERDUE.normalized_upc %]&amp;oclc=[% OVERDUE.normalized_oclc %]&amp;type=xw10" alt="" class="thumbnail"/>
+<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"/>
 [% END %]
 [% END %]
 </td>[% END %]
@@ -336,16 +322,15 @@ $.tablesorter.addParser({
 <td>[% OVERDUE.itemcallnumber %]</td>
 <td>[% OVERDUE.date_due %]</td>
                 [% IF ( OpacRenewalAllowed ) %]
-                    [% UNLESS ( OVERDUE.patron_flagged ) %]
 <td>
 [% IF ( OVERDUE.debarred ) %]Account Frozen
 [% ELSIF ( OVERDUE.status ) %]
-<a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber %]&amp;bornum=[% OVERDUE.borrowernumber %]">Renew</a> <span class="renewals">([% OVERDUE.renewsleft %] of [% OVERDUE.renewsallowed %] renewals remaining)</span>
-[% ELSIF ( OVERDUE.onreserve ) %]On Reserve
+[% 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>
+[% ELSIF ( OVERDUE.onreserve ) %]On hold
 [% ELSE %]No renewals left
 [% END %]
-</td>[% END %][% END %]
-[% IF ( OVERDUE.OPACFinesTab ) %]
+</td>[% END %]
+[% IF ( OPACFinesTab ) %]
 <td>[% IF ( OVERDUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
 [% END %]
 </tr>
@@ -360,7 +345,7 @@ $.tablesorter.addParser({
         <caption>Holds <span class="count">([% reserves_count %] total)</span></caption>
             <!-- RESERVES TABLE ROWS -->
             <thead><tr>
-                <th>Title</th>
+                <th class="{sorter:'articles'}">Title</th>
                 <th>Placed On</th>
                <th>Expires On</th>
                 <th>Pick Up Location</th>
@@ -368,7 +353,7 @@ $.tablesorter.addParser({
                        <th>Priority</th>
                [% END %]
                 <th>Status</th>
-               <th>Modify</th>
+               <th class="{sorter: false}">Modify</th>
             </tr></thead>
                        <tbody>
             [% FOREACH RESERVE IN RESERVES %]
@@ -391,14 +376,14 @@ $.tablesorter.addParser({
                 <td>[% RESERVE.reservedate %]</td>
                <td>[% IF ( RESERVE.expirationdate ) %][% RESERVE.expirationdate %][% ELSE %]Never Expires[% END %]</td>
                 <td>[% RESERVE.branch %]</td>
-                               [% IF ( RESERVE.showpriority ) %]
+                               [% IF ( showpriority ) %]
                                <td>[% RESERVE.priority %] </td>
                                [% END %]
                 <td>
                     [% IF ( RESERVE.wait ) %]
                         [% IF ( RESERVE.atdestination ) %]
                             [% IF ( RESERVE.found ) %]
-                            Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.formattedwaitingdate ) %] until [% RESERVE.formattedwaitingdate %][% END %]
+                            Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.formattedwaitingdate ) %] since [% RESERVE.formattedwaitingdate %][% END %]
                             <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
                             [% ELSE %]
                             Item waiting to be pulled from <b> [% RESERVE.wbrname %]</b>
@@ -439,8 +424,7 @@ $.tablesorter.addParser({
 </div>
 <div class="yui-b">
 <div id="leftmenus" class="container">
-[% INCLUDE 'navigation.inc' %]
-[% INCLUDE 'usermenu.inc' %]
+[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
 </div>
 </div>
 </div>