Bug 17216: Use Koha::AVC from mss.pl
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
parent
d0f543bd6c
commit
62aa3f4292
2 changed files with 4 additions and 8 deletions
|
@ -24,6 +24,7 @@ use CGI qw ( -utf8 );
|
||||||
use C4::Context;
|
use C4::Context;
|
||||||
|
|
||||||
use Koha::Authority::Types;
|
use Koha::Authority::Types;
|
||||||
|
use Koha::AuthorisedValueCategories;
|
||||||
|
|
||||||
use List::MoreUtils qw( uniq );
|
use List::MoreUtils qw( uniq );
|
||||||
|
|
||||||
|
@ -128,14 +129,8 @@ if ( $op eq 'add_form' ) {
|
||||||
$sth2->finish;
|
$sth2->finish;
|
||||||
$sth2 = $dbh->prepare("select distinct category from authorised_values");
|
$sth2 = $dbh->prepare("select distinct category from authorised_values");
|
||||||
$sth2->execute;
|
$sth2->execute;
|
||||||
my @authorised_values;
|
my @av_cat = Koha::AuthorisedValueCategories->search;
|
||||||
push @authorised_values, "";
|
my @authorised_values = map { $_->category_name } @av_cat;
|
||||||
while ( ( my $category ) = $sth2->fetchrow_array ) {
|
|
||||||
push @authorised_values, $category;
|
|
||||||
}
|
|
||||||
push( @authorised_values, "branches" );
|
|
||||||
push( @authorised_values, "itemtypes" );
|
|
||||||
push( @authorised_values, "cn_source" );
|
|
||||||
|
|
||||||
# build thesaurus categories list
|
# build thesaurus categories list
|
||||||
my @authtypes = uniq( "", map { $_->authtypecode } Koha::Authority::Types->search );
|
my @authtypes = uniq( "", map { $_->authtypecode } Koha::Authority::Types->search );
|
||||||
|
|
|
@ -163,6 +163,7 @@
|
||||||
<li>
|
<li>
|
||||||
<label for="authorised_value[% loo.row %]">Authorized value:</label>
|
<label for="authorised_value[% loo.row %]">Authorized value:</label>
|
||||||
<select name="authorised_value" id="authorised_value[% loo.row %]" size="1">
|
<select name="authorised_value" id="authorised_value[% loo.row %]" size="1">
|
||||||
|
<option value=""></option>
|
||||||
[% FOREACH value IN loo.authorised_values %]
|
[% FOREACH value IN loo.authorised_values %]
|
||||||
[% IF ( value == loo.authorised_value ) %]
|
[% IF ( value == loo.authorised_value ) %]
|
||||||
<option value="[% value %]" selected="selected">[% value %]</option>
|
<option value="[% value %]" selected="selected">[% value %]</option>
|
||||||
|
|
Loading…
Reference in a new issue