From e795c205dba5f8700e58cd14031a16a138372a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Mei=C3=9Fner?= Date: Thu, 15 May 2014 16:48:02 +0200 Subject: [PATCH] [PASSED QA] Bug 11577: OPAC bootstrap theme changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 --- 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 16783a7..3c4754a 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 61b88ae..9f88c1a 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; -- 1.7.10.4