From 69046b827fc4ad21fa6fba99d9f0b983d59b7562 Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Sat, 24 Sep 2011 14:55:18 -0400 Subject: [PATCH] TPac: Hide CC Payment info when not enabled Signed-off-by: Thomas Berezansky Signed-off-by: Dan Scott --- Open-ILS/src/templates/opac/myopac/main.tt2 | 14 +++++++++++++- .../src/templates/opac/parts/myopac/main_base.tt2 | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/opac/myopac/main.tt2 b/Open-ILS/src/templates/opac/myopac/main.tt2 index 158e597313..5068474efb 100644 --- a/Open-ILS/src/templates/opac/myopac/main.tt2 +++ b/Open-ILS/src/templates/opac/myopac/main.tt2 @@ -3,6 +3,10 @@ WRAPPER "opac/parts/myopac/main_base.tt2"; myopac_page = "main"; myopac_main_page = "main"; + myopac_cc_allowed = 0; + IF (ctx.fines.grocery.size OR ctx.fines.circulation.size) AND ctx.get_org_setting(ctx.user.home_ou, 'credit.payments.allow') == 1; + myopac_cc_allowed = 1; + END %]
[% IF ctx.fines.circulation.size > 0 %] @@ -21,12 +25,14 @@ [% l("Due Date") %] [% l("Date Returned") %] [% l("Balance Owed") %] + [% IF myopac_cc_allowed %] + [% END %] @@ -77,11 +83,13 @@ [% money(f.xact.balance_owed) %] + [% IF myopac_cc_allowed %] + [% END %] [% END %] @@ -110,6 +118,7 @@ [% l("Total Amount Paid") %] [% l("Balance Owed") %] [% l("Billing Type") %] + [% IF myopac_cc_allowed %] + [% END %] @@ -143,11 +153,13 @@ [% f.xact.last_billing_type %] + [% IF myopac_cc_allowed %] + [% END %] [% END %] @@ -156,7 +168,7 @@ [% END %] [% UNLESS ctx.fines.grocery.size OR ctx.fines.circulation.size %]
[% l('You have no current fines.') %]
- [% ELSE %] + [% ELSIF myopac_cc_allowed %]
[% money(ctx.user_stats.fines.balance_owed) %]
- + [% IF (ctx.fines.grocery.size OR ctx.fines.circulation.size) AND ctx.get_org_setting(ctx.user.home_ou, 'credit.payments.allow') == 1 %] + [% END %]
[% END %] -- 2.43.2