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 b78fc03..8fc13d9 100644 (file)
@@ -1,8 +1,5 @@
 [% INCLUDE 'doc-head-open.inc' %]
-[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Library Home for
-[% FOREACH BORROWER_INF IN BORROWER_INFO %]
-    [% 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 %]
-[% 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>
@@ -58,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>
@@ -89,7 +85,7 @@ $.tablesorter.addParser({
         </div>
         [% END %]
 
-        [% IF ( BORROWER_INF.flagged ) %]
+        [% IF ( patron_flagged ) %]
                <div class="dialog alert">
         <ul>
             [% IF ( userdebarred ) %]
@@ -101,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 renewal_blocked_fines %]
+            [% 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 %]
@@ -196,7 +194,7 @@ $.tablesorter.addParser({
         [% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
         <th>Call No.</th>
         [% IF ( OpacRenewalAllowed ) %]
-        [% UNLESS  patron_flagged %]<th class="{sorter: false}">Renew</th>[% END %]
+        <th class="{sorter: false}">Renew</th>
         [% END %]
 [% IF ( OPACFinesTab ) %]
         <th>Fines</th>
@@ -244,12 +242,10 @@ $.tablesorter.addParser({
                 [% IF ( show_barcode ) %]<td>[% ISSUE.barcode %]</td>[% END %]
                 <td>[% ISSUE.itemcallnumber %]</td>
                 [% IF ( OpacRenewalAllowed ) %]
-                    [% UNLESS 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 ( OPACFinesTab ) %]
                 <td>[% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
@@ -271,7 +267,7 @@ $.tablesorter.addParser({
                        [% 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 %]
@@ -293,7 +289,8 @@ $.tablesorter.addParser({
 <th>Call No.</th>
 <th>Due</th>
 [% IF ( OpacRenewalAllowed ) %]
-                    [% UNLESS patron_flagged %]<th class="{sorter: false}">Renew</th>[% END %][% END %]
+                    <th class="{sorter: false}">Renew</th>
+[% END %]
 [% IF ( OPACFinesTab ) %]
 <th>Fines</th>
 [% END %]
@@ -325,15 +322,14 @@ $.tablesorter.addParser({
 <td>[% OVERDUE.itemcallnumber %]</td>
 <td>[% OVERDUE.date_due %]</td>
                 [% IF ( OpacRenewalAllowed ) %]
-                    [% UNLESS 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 %]
+</td>[% END %]
 [% IF ( OPACFinesTab ) %]
 <td>[% IF ( OVERDUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
 [% END %]