From 10d4d2fd3139c74a1dcc0c643ca00be264e1a526 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 24 Jun 2016 12:04:43 -0400 Subject: [PATCH] Bug 16807 - Use Koha::BiblioFrameworks instead of GetFrameWorkLoop Refactor code to use work from 14889 Signed-off-by: Kyle M Hall Signed-off-by: Kyle M Hall --- cataloguing/addbiblio.pl | 5 +++-- .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index ef7b845f73..1e7cb61897 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -35,6 +35,7 @@ use C4::Branch; use C4::ClassSource; use C4::ImportBatch; use C4::Charset; +use Koha::BiblioFrameworks; use Date::Calc qw(Today); use MARC::File::USMARC; @@ -745,8 +746,8 @@ if ($frameworkcode eq 'FA'){ print $input->redirect( '/cgi-bin/koha/cataloguing/editor.pl' . ( $biblionumber ? ( '#catalog/' . $biblionumber ) : '' ) ); } - -$template->param( frameworkcodeloop => GetFrameworksLoop( $frameworkcode ) , +my $frameworkcodeloop = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] }); +$template->param( frameworkcodeloop => $frameworkcodeloop , breedingid => $breedingid ); # ++ Global diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index 0dcd73ec45..df7b4a2c65 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -494,13 +494,13 @@ function Changefwk(FwkList) { [% FOREACH frameworkcodeloo IN frameworkcodeloop %]
  • - - [% IF ( frameworkcodeloo.selected ) %] + + [% IF ( frameworkcodeloo.frameworkcode == frameworkcode ) %] [% ELSE %]   [% END %] - [% frameworkcodeloo.description %] + [% frameworkcodeloo.frameworktext %]
  • [% END %] -- 2.39.5