From 17821c58ccbeeb719e283e7932064e6ea61d657e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Holger=20Mei=C3=9Fner?= Date: Thu, 15 May 2014 16:48:02 +0200 Subject: [PATCH] Bug 11577: OPAC bootstrap theme changes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch makes opac-user.pl and the bootstrap version of opac-user.tt handle the new renewal errors "auto_renew" and "auto_too_soon". To test: 1) Set global syspref "opacthemes" to bootstrap. 2) Set global syspref "OpacRenewalAllowed" to Allow. 3) Test the same things as in previous patch, this time for the OPAC summary page. Sponsored-by: Hochschule für Gesundheit (hsg), Germany Signed-off-by: Chris Cormack Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 3 +++ opac/opac-user.pl | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index 16783a75f6..3c4754a37c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -230,6 +230,9 @@ ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) [% ELSIF ( ISSUE.too_many ) %] Not renewable + [% ELSIF ( ISSUE.auto_renew || ISSUE.auto_too_soon ) %] + Automatic renewal + ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) [% ELSIF ( ISSUE.too_soon ) %] No renewal before [% ISSUE.soonestrenewdate %] ([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining) diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 61b88aeb49..9f88c1ad39 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -194,8 +194,10 @@ if ($issues){ $issue->{'renewed'} = $renewed{ $issue->{'itemnumber'} }; if ($renewerror) { - $issue->{'too_many'} = 1 if $renewerror eq 'too_many'; - $issue->{'on_reserve'} = 1 if $renewerror eq 'on_reserve'; + $issue->{'too_many'} = 1 if $renewerror eq 'too_many'; + $issue->{'on_reserve'} = 1 if $renewerror eq 'on_reserve'; + $issue->{'auto_renew'} = 1 if $renewerror eq 'auto_renew'; + $issue->{'auto_too_soon'} = 1 if $renewerror eq 'auto_too_soon'; if ( $renewerror eq 'too_soon' ) { $issue->{'too_soon'} = 1; -- 2.39.5