Bug 16807 - Use Koha::BiblioFrameworks instead of GetFrameWorkLoop

Refactor code to use work from 14889

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2016-06-24 12:04:43 -04:00 committed by Kyle M Hall
parent d17085ea03
commit 10d4d2fd31
2 changed files with 6 additions and 5 deletions

View file

@ -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

View file

@ -494,13 +494,13 @@ function Changefwk(FwkList) {
</li>
[% FOREACH frameworkcodeloo IN frameworkcodeloop %]
<li>
<a href="#" class="change-framework" data-frameworkcode="[% frameworkcodeloo.value %]">
[% IF ( frameworkcodeloo.selected ) %]
<a href="#" class="change-framework" data-frameworkcode="[% frameworkcodeloo.frameworkcode %]">
[% IF ( frameworkcodeloo.frameworkcode == frameworkcode ) %]
<i class="fa fa-fw fa-check"></i>
[% ELSE %]
<i class="fa fa-fw">&nbsp;</i>
[% END %]
[% frameworkcodeloo.description %]
[% frameworkcodeloo.frameworktext %]
</a>
</li>
[% END %]