Lines 28-33
use Koha::SearchEngine::Elasticsearch::QueryBuilder;
Link Here
|
28 |
use Koha::SearchMarcMaps; |
28 |
use Koha::SearchMarcMaps; |
29 |
use Koha::SearchFields; |
29 |
use Koha::SearchFields; |
30 |
use Koha::Caches; |
30 |
use Koha::Caches; |
|
|
31 |
use Koha::AuthorisedValueCategories; |
31 |
|
32 |
|
32 |
use Try::Tiny qw( catch try ); |
33 |
use Try::Tiny qw( catch try ); |
33 |
use Module::Load::Conditional qw( can_load ); |
34 |
use Module::Load::Conditional qw( can_load ); |
Lines 118-123
if ( $op eq 'cud-edit' ) {
Link Here
|
118 |
my $field_weight = $field_weight[$i]; |
119 |
my $field_weight = $field_weight[$i]; |
119 |
my $field_staff_client = $field_staff_client[$i]; |
120 |
my $field_staff_client = $field_staff_client[$i]; |
120 |
my $field_opac = $field_opac[$i]; |
121 |
my $field_opac = $field_opac[$i]; |
|
|
122 |
my $av_category = $input->param('facet_av_cat_' . $field_name); |
121 |
|
123 |
|
122 |
my $search_field = Koha::SearchFields->find_or_create({ |
124 |
my $search_field = Koha::SearchFields->find_or_create({ |
123 |
name => $field_name, |
125 |
name => $field_name, |
Lines 139-144
if ( $op eq 'cud-edit' ) {
Link Here
|
139 |
|
141 |
|
140 |
my $facet_order = first { $faceted_field_names[$_] eq $field_name } 0 .. $#faceted_field_names; |
142 |
my $facet_order = first { $faceted_field_names[$_] eq $field_name } 0 .. $#faceted_field_names; |
141 |
$search_field->facet_order(defined $facet_order ? $facet_order + 1 : undef); |
143 |
$search_field->facet_order(defined $facet_order ? $facet_order + 1 : undef); |
|
|
144 |
$search_field->authorised_value_category($av_category); |
142 |
$search_field->store; |
145 |
$search_field->store; |
143 |
} |
146 |
} |
144 |
|
147 |
|
Lines 294-305
while ( my $search_field = $search_fields->next ) {
Link Here
|
294 |
push @all_search_fields, $search_field_unblessed; |
297 |
push @all_search_fields, $search_field_unblessed; |
295 |
} |
298 |
} |
296 |
|
299 |
|
|
|
300 |
my @authorised_value_categories = Koha::AuthorisedValueCategories->search->get_column('category_name'); |
297 |
push @messages, @errors; |
301 |
push @messages, @errors; |
298 |
$template->param( |
302 |
$template->param( |
299 |
indexes => \@indexes, |
303 |
indexes => \@indexes, |
300 |
all_search_fields => \@all_search_fields, |
304 |
all_search_fields => \@all_search_fields, |
301 |
facetable_fields => \@facetable_fields, |
305 |
facetable_fields => \@facetable_fields, |
302 |
messages => \@messages, |
306 |
messages => \@messages, |
|
|
307 |
authorised_value_categories => \@authorised_value_categories, |
303 |
); |
308 |
); |
304 |
|
309 |
|
305 |
output_html_with_http_headers $input, $cookie, $template->output; |
310 |
output_html_with_http_headers $input, $cookie, $template->output; |