From 7ca790997ed6adebb7edafc04b6f1aa136ce7cc2 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Fri, 30 Aug 2013 15:19:25 +0200 Subject: [PATCH] Bug 10809: use branches template plugin in serials search In serials-search.pl, branch name was computed using branch code and then passed to template. This patch uses the new template plugin now for this: Koha::Template::Plugin::Branches. Test plan : - Go to serials search - Perform a search that returns at least an open an a closed subscription having a branch defined => The branch name is displayed in "Library" column Signed-off-by: Pierre Angot Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- .../intranet-tmpl/prog/en/modules/serials/serials-search.tt | 5 +++-- serials/serials-search.pl | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt index 3edf2232fb..a5f9795839 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt @@ -1,3 +1,4 @@ +[% USE Branches %] [% INCLUDE 'doc-head-open.inc' %] [% USE KohaDates %] Koha › Serials [% biblionumber %] @@ -153,7 +154,7 @@ [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %] - [% IF ( subscription.branchname ) %][% subscription.branchname %][% END %] + [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) %][% END %] [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %] @@ -235,7 +236,7 @@ [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %] - [% IF ( subscription.branchname ) %][% subscription.branchname %][% END %] + [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) %][% END %] [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %] diff --git a/serials/serials-search.pl b/serials/serials-search.pl index 552500ef51..28dc9d00a4 100755 --- a/serials/serials-search.pl +++ b/serials/serials-search.pl @@ -89,7 +89,6 @@ if ($searched){ if ($routing) { for my $subscription ( @subscriptions) { $subscription->{routingedit} = check_routing( $subscription->{subscriptionid} ); - $subscription->{branchname} = GetBranchName ( $subscription->{branchcode} ); } } -- 2.39.5