@@ -, +, @@ --- Koha/Template/Plugin/AuthorisedValues.pm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) --- a/Koha/Template/Plugin/AuthorisedValues.pm +++ a/Koha/Template/Plugin/AuthorisedValues.pm @@ -25,6 +25,7 @@ use base qw( Template::Plugin ); use Encode qw{encode decode}; use C4::Koha; +use C4::Charset; =pod @@ -43,4 +44,28 @@ sub GetByCode { return encode( 'UTF-8', GetAuthorisedValueByCode( $category, $code, $opac ) ); } +sub BuildDropbox { + my ( $self, $name, $category, $default, $params ) = @_; + my $class = $params->{class}; + my $avs = C4::Koha::GetAuthvalueDropbox($category, $default); + my $size = $params->{size} || 20; + my $html; + if ( @$avs ) { + $html = qq||; + } else { + $html .= qq||; + + } + + return encode( 'UTF-8', $html ); +} + 1; --