@@ -, +, @@ files --- Koha/Template/Plugin/Currencies.pm | 48 +++++++++++++++++++ .../prog/en/includes/currency.inc | 35 ++++++++++++++ .../bootstrap/en/includes/currency.inc | 35 ++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 Koha/Template/Plugin/Currencies.pm create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/currency.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/currency.inc --- a/Koha/Template/Plugin/Currencies.pm +++ a/Koha/Template/Plugin/Currencies.pm @@ -0,0 +1,48 @@ +package Koha::Template::Plugin::Currencies; + + +# Copyright 2013-2014 BibLibre +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +use Modern::Perl; + +use Template::Plugin; +use base qw( Template::Plugin ); + +use Koha::Acquisition::Currencies; + +=head1 NAME + +Koha::Template::Plugin::Currencies - TT Plugin for currencies + +=head1 SYNOPSIS + +[% USE Currencies %] + +[% Currencies.get_active() %] + +=head1 ROUTINES + +=head2 get_active + +In a template, you can get the active currency with +the following TT code: [% Currencies.get_active() %] + +=cut +sub get_active { + return Koha::Acquisition::Currencies->get_active; +} + +1; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/currency.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/currency.inc @@ -0,0 +1,35 @@ +[% USE Koha %] +[% USE Currencies %] + + --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/currency.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/currency.inc @@ -0,0 +1,35 @@ +[% USE Koha %] +[% USE Currencies %] + + --