From 4b69538f9bf6809126cc404a7bc09b02c3830328 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 12 Nov 2010 22:53:23 -0500 Subject: [PATCH] Fix for Bug 4913 - Budget pages should show currency name instead of symbol This patch adds a new include file to handle the display of the active currency name and a warning if no currency is active. Signed-off-by: Galen Charlton Signed-off-by: Chris Cormack --- admin/aqbudgetperiods.pl | 4 +++- admin/aqbudgets.pl | 4 +++- admin/aqplan.pl | 5 +++-- .../prog/en/includes/budgets-active-currency.inc | 1 + .../prog/en/modules/admin/aqbudgetperiods.tmpl | 4 +++- .../intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl | 2 +- 7 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl index 62383f1937..39f3cd00b1 100755 --- a/admin/aqbudgetperiods.pl +++ b/admin/aqbudgetperiods.pl @@ -82,7 +82,9 @@ my ($template, $borrowernumber, $cookie, $staff_flags ) = get_template_and_user( my $cur = GetCurrency(); -$template->param( cur => $cur->{symbol} ); +$template->param( symbol => $cur->{symbol}, + currency => $cur->{currency} + ); my $cur_format = C4::Context->preference("CurrencyFormat"); my $num; diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index 34a4021be1..d26672745e 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -52,7 +52,9 @@ my ($template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user( ); my $cur = GetCurrency(); -$template->param( cur => $cur->{symbol} ); +$template->param( symbol => $cur->{symbol}, + currency => $cur->{currency} + ); my $op = $input->param('op'); diff --git a/admin/aqplan.pl b/admin/aqplan.pl index 8efa427b91..8b68d51460 100755 --- a/admin/aqplan.pl +++ b/admin/aqplan.pl @@ -60,7 +60,9 @@ my $budget_period_id = $input->param('budget_period_id'); my $period = GetBudgetPeriod($budget_period_id); my $count = GetPeriodsCount(); my $cur = GetCurrency; - +$template->param( symbol => $cur->{symbol}, + currency => $cur->{currency} + ); $template->param( period_button_only => 1 ) if $count == 0; @@ -450,7 +452,6 @@ $template->param( show_actual => $show_actual, show_percent => $show_percent, show_mine => $show_mine, - cur => $cur->{symbol}, cur_format => $cur_format, CGIextChoice => $CGIextChoice, CGIsepChoice => $CGIsepChoice, 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 new file mode 100644 index 0000000000..a4571f9f1c --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc @@ -0,0 +1 @@ +

Currency =

No active currency is defined

Please specify an active currency.

\ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl index 78c51b8c41..523fd13cc3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl @@ -254,7 +254,9 @@

Budgets administration

-

Currency =

No active currency is defined

Please specify an active currency.

+ + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl index 5e0db00292..80d9156d1a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl @@ -157,9 +157,10 @@ -

No active currency is defined

Please specify an active currency.

-

Funds for ''

+ + +
@@ -240,7 +241,6 @@
-

Currency =

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl index 170c7a0036..2192178f3a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl @@ -139,7 +139,7 @@ YAHOO.util.Event.onAvailable("popmenu", function () { -

Currency =

No active currency is defined

Please specify an active currency.

+ -- 2.39.5