Bugzilla – Attachment 6103 Details for
Bug 7110
Renewal messages still displays in OPAC if OpacRenewalAllowed is disabled.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7110 - Renewal messages still display in OPAC if OpacRenewalAllowed is disabled
Bug-7110---Renewal-messages-still-display-in-OPAC-.patch (text/plain), 3.57 KB, created by
Chris Cormack
on 2011-10-28 19:42:22 UTC
(
hide
)
Description:
Bug 7110 - Renewal messages still display in OPAC if OpacRenewalAllowed is disabled
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2011-10-28 19:42:22 UTC
Size:
3.57 KB
patch
obsolete
>From 347a17c6d3dee84605487e3fece39ee90d719dfb Mon Sep 17 00:00:00 2001 >From: Liz Rea <lrea@nekls.org> >Date: Fri, 28 Oct 2011 09:56:43 -0500 >Subject: [PATCH] Bug 7110 - Renewal messages still display in OPAC if > OpacRenewalAllowed is disabled > >This patch adds a check for OpacRenewalAllowed to the computation of the renewal_blocked_fines. If OpacRenewalAllowed is off, renewal_blocked_fines won't be computed, because that message shouldn't show in the OPAC anyway. >This also removes the necessity to set a very high threshold on OPACFineNoRenewals to prevent the messages from showing with OpacRenewal disabled. > >To test: >Set a patron with fines over the stated limit in OPACFineNoRenewals. > >With OpacRenewalAllowed set to ALLOW >- log into the OPAC and verify the message that renewals are disallowed is displayed >- verify that renewals are disallowed in the interface. >- remove or pay the fines, verify the message goes away and that OPAC renewals are re-allowed for your patron. > >With OPACFineNoRenewals set to Don't Allow >- verify the message is not shown, even with the patron's fines over the threshold in OPACFineNoRenewals. >- remove or pay the fines, verify that renewals are still disallowed > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 13 +++++++------ > opac/opac-user.pl | 2 +- > 2 files changed, 8 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >index d9417ec..636d1c0 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >@@ -92,12 +92,13 @@ $.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 %] >- <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> >- [% END %] >- </ul></div> >- [% END %] >- >+ [% 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> >+ [% ELSE %] >+ <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 %] > <div id="opac-user-views" class="toptabs"> > <ul> > <li><a href="/cgi-bin/koha/opac-user.pl#opac-user-checkouts">Checked Out</a></li> >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index e99e557..ac3ff1e 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -82,7 +82,7 @@ if ( 5 >= $borr->{'amountoutstanding'} && $borr->{'amountoutstanding'} > 0 ) { > my $no_renewal_amt = C4::Context->preference( 'OPACFineNoRenewals' ); > $no_renewal_amt ||= 0; > >-if ( $borr->{amountoutstanding} > $no_renewal_amt ) { >+if ( $borr->{amountoutstanding} > $no_renewal_amt && C4::Context->preference("OpacRenewalAllowed")) { > $borr->{'flagged'} = 1; > $template->param( > renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ), >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7110
:
6094
|
6103
|
7709
|
7765
|
13706
|
18052
|
18488
|
19019