From e9dde1e211502c5b75268d6dec60046ddb4e8a72 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Thu, 29 Oct 2015 09:13:26 -0300 Subject: [PATCH] Bug 15049: (Signed off) Hide currency but preserv alert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This follow up hides currency, but the alert pops if no currency is active. To test: 1) Apply the patch 2) Unset any active currency 3) Alert must show on Acquisitons home 4) Set a currency active, no currency display on Acqui home 5) Check that currency IS displayed on /cgi-bin/koha/admin/aqbudgets.pl or /cgi-bin/koha/admin/aqbudgetperiods.pl Amended for better translation Currency does / does not display as described in test plan. Signed-off-by: Marc VĂ©ron Signed-off-by: JM Broust Signed-off-by: Jonathan Druart --- .../prog/en/includes/budgets-active-currency.inc | 15 ++++++++++++++- .../intranet-tmpl/prog/en/modules/acqui/acqui-home.tt | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc index 400bbb9..fbaa7e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc @@ -1 +1,14 @@ -[% IF ( currency ) %]

Currency = [% currency %]

[% ELSE %]

No active currency is defined

[% IF CAN_user_parameters_parameters_remaining_permissions %]Please specify an active currency.[% ELSE %]Your administrator must specify an active currency.[% END %]

[% END %] +[% IF ( currency ) %] + [% IF ( not hide ) %] +

Currency = [% currency %]

+ [% END %] +[% ELSE %] +
+

No active currency is defined

+ [% IF CAN_user_parameters_parameters_remaining_permissions %] +

Please specify an active currency.

+ [% ELSE %] +

Your administrator must specify an active currency.

+ [% END %] +
+[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index 6b521aa..ab06267 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -98,7 +98,7 @@ $(document).ready(function() { [% INCLUDE 'acquisitions-toolbar.inc' %]

Acquisitions

- [% INCLUDE 'budgets-active-currency.inc' %] + [% INCLUDE 'budgets-active-currency.inc' hide = 'yes' %] [% UNLESS ( loop_budget ) %] [% IF ( CAN_user_acquisition_period_manage ) %]
You must define a budget in Administration
-- 2.1.0