View | Details | Raw Unified | Return to bug 17216
Collapse All | Expand All

(-)a/admin/marc_subfields_structure.pl (-8 / +3 lines)
Lines 24-29 use CGI qw ( -utf8 ); Link Here
24
use C4::Context;
24
use C4::Context;
25
25
26
use Koha::Authority::Types;
26
use Koha::Authority::Types;
27
use Koha::AuthorisedValueCategories;
27
28
28
use List::MoreUtils qw( uniq );
29
use List::MoreUtils qw( uniq );
29
30
Lines 128-141 if ( $op eq 'add_form' ) { Link Here
128
    $sth2->finish;
129
    $sth2->finish;
129
    $sth2 = $dbh->prepare("select distinct category from authorised_values");
130
    $sth2 = $dbh->prepare("select distinct category from authorised_values");
130
    $sth2->execute;
131
    $sth2->execute;
131
    my @authorised_values;
132
    my @av_cat = Koha::AuthorisedValueCategories->search;
132
    push @authorised_values, "";
133
    my @authorised_values = map { $_->category_name } @av_cat;
133
    while ( ( my $category ) = $sth2->fetchrow_array ) {
134
        push @authorised_values, $category;
135
    }
136
    push( @authorised_values, "branches" );
137
    push( @authorised_values, "itemtypes" );
138
    push( @authorised_values, "cn_source" );
139
134
140
    # build thesaurus categories list
135
    # build thesaurus categories list
141
    my @authtypes = uniq( "", map { $_->authtypecode } Koha::Authority::Types->search );
136
    my @authtypes = uniq( "", map { $_->authtypecode } Koha::Authority::Types->search );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt (-1 / +1 lines)
Lines 163-168 Link Here
163
                            <li>
163
                            <li>
164
                                <label for="authorised_value[% loo.row %]">Authorized value:</label>
164
                                <label for="authorised_value[% loo.row %]">Authorized value:</label>
165
                                <select name="authorised_value" id="authorised_value[% loo.row %]" size="1">
165
                                <select name="authorised_value" id="authorised_value[% loo.row %]" size="1">
166
                                <option value=""></option>
166
                                [% FOREACH value IN loo.authorised_values %]
167
                                [% FOREACH value IN loo.authorised_values %]
167
                                    [% IF ( value == loo.authorised_value ) %]
168
                                    [% IF ( value == loo.authorised_value ) %]
168
                                    <option value="[% value %]" selected="selected">[% value %]</option>
169
                                    <option value="[% value %]" selected="selected">[% value %]</option>
169
- 

Return to bug 17216