From 380c665592e620272e9a4a7c7f787dc560fea9c5 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] 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 --- 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 ec3de30..047eed7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -229,6 +229,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 3284b3a..0ed6135 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -190,8 +190,10 @@ if ($issues){ } 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.9.1