From 63e3a278f24ddce748104e6465235abad2509e91 Mon Sep 17 00:00:00 2001 From: Mathieu Saby Date: Sat, 18 May 2013 15:28:42 +0200 Subject: [PATCH] Bug 9806 : QA Followup - use template plugin for branch names With this followup, instead of passing the real names of the branches to template file, only the branchcodes are passed. The branchcodes are translated into branchnames in template file, using the KohaBranchName template plugin. To test : do the same test as for main patch : 1) make some basketgroups with 0, 1, 2 baskets 2) make some basketgroups with different billing and deliveryplace 3) check the list of open and closed basketgroups 4) check action buttons are working like before Signed-off-by: Pierre Angot --- acqui/basketgroup.pl | 4 +--- .../prog/en/modules/acqui/basketgroup.tt | 10 +++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 8d22e24..398980c 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -56,7 +56,7 @@ use C4::Bookseller qw/GetBookSellerFromId/; use C4::Budgets qw/ConvertCurrency/; use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV/; use C4::Bookseller qw/GetBookSellerFromId/; -use C4::Branch qw/GetBranches GetBranchName/; +use C4::Branch qw/GetBranches/; use C4::Members qw/GetMember/; our $input=new CGI; @@ -156,8 +156,6 @@ sub displaybasketgroups { my $baskets = shift; if (scalar @$basketgroups != 0) { foreach my $basketgroup (@$basketgroups){ - $basketgroup -> {'billingplacename'} = GetBranchName($basketgroup -> {'billingplace'}); - $basketgroup -> {'deliveryplacename'} = GetBranchName($basketgroup -> {'deliveryplace'}); my $i = 0; my $basketsqty = 0; while($i < scalar(@$baskets)){ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt index 0247222..24f1d27 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -1,4 +1,4 @@ -[% INCLUDE 'doc-head-open.inc' %] +[% USE KohaBranchName %] [% INCLUDE 'doc-head-open.inc' %] Koha › Basket grouping for [% booksellername |html %] [% INCLUDE 'doc-head-close.inc' %] @@ -265,8 +265,8 @@ function submitForm(form) { [% END %] [% basketgroup.id %] - [% basketgroup.billingplacename %] - [% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplacename %][% END %] + [% basketgroup.billingplace | $KohaBranchName %] + [% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplace | $KohaBranchName %][% END %] [% basketgroup.basketsqty %] @@ -303,8 +303,8 @@ function submitForm(form) { [% END %] [% basketgroup.id %] - [% basketgroup.billingplacename %] - [% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplacename %][% END %] + [% basketgroup.billingplace | $KohaBranchName %] + [% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplace | $KohaBranchName %][% END %] [% basketgroup.basketsqty %]
-- 1.7.2.5