Bugzilla – Attachment 1079 Details for
Bug 3083
OPAC shows renewal link for items which are on hold or have too many renewals
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix, returning correct value for CanBookBeRenewed()
0001-Hiding-renew-link-in-the-OPAC-for-items-which-cannot.patch (text/plain), 2.51 KB, created by
Chris Cormack
on 2009-04-01 17:07:00 UTC
(
hide
)
Description:
Proposed fix, returning correct value for CanBookBeRenewed()
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2009-04-01 17:07:00 UTC
Size:
2.51 KB
patch
obsolete
>From ec9ff6ea2b07236066b2bd65333d93430b67171d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 1 Apr 2009 11:57:11 -0500 >Subject: [PATCH] Hiding renew link in the OPAC for items which cannot be renewed. Fixes bug 3083. >Content-Type: text/plain; charset="utf-8" > >--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl | 2 +- > opac/opac-user.pl | 5 +++-- > 2 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl >index 8cfef7d..06f3c69 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl >@@ -224,7 +224,7 @@ $.tablesorter.addParser({ > <!-- TMPL_UNLESS name="patron_flagged" --> > <td><!-- TMPL_IF NAME="status" --><a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&item=<!-- TMPL_VAR NAME="itemnumber" -->&borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Renew</a> <span class="renewals">(<!-- TMPL_VAR NAME="renewsleft" --> of <!-- TMPL_VAR NAME="renewsallowed" --> renewals remaining)</span> > <!-- TMPL_ELSE --> >- Not renewable >+ Not renewable<!-- TMPL_IF NAME="too_many" --> <span class="renewals">(<!-- TMPL_VAR NAME="renewsleft" --> of <!-- TMPL_VAR NAME="renewsallowed" --> renewals remaining)</span><!-- TMPL_ELSE --><!-- TMPL_IF NAME="on_reserve" --> <span class="renewals">(On hold)</span><!-- /TMPL_IF --><!-- /TMPL_IF --> > <!-- /TMPL_IF --></td> > <!-- /TMPL_UNLESS --> > <!-- /TMPL_IF --> >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 777c659..b353486 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -127,8 +127,9 @@ foreach my $issue ( @issue_list ) { > # check if item is renewable > my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} ); > ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'}); >- >- $issue->{'status'} = $status || C4::Context->preference("OpacRenewalAllowed"); >+ $issue->{'status'} = $status && C4::Context->preference("OpacRenewalAllowed"); >+ if($renewerror eq "too_many"){ $issue->{'too_many'} = 1 }; >+ if($renewerror eq "on_reserve"){ $issue->{'on_reserve'} = 1 }; > > if ( $issue->{'overdue'} ) { > push @overdues, $issue; >-- >1.5.6.5 >
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 3083
:
1079
|
1080