|
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 |
{ |
125 |
{ |
|
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 297-308
while ( my $search_field = $search_fields->next ) {
Link Here
|
| 297 |
push @all_search_fields, $search_field_unblessed; |
300 |
push @all_search_fields, $search_field_unblessed; |
| 298 |
} |
301 |
} |
| 299 |
|
302 |
|
|
|
303 |
my @authorised_value_categories = Koha::AuthorisedValueCategories->search->get_column('category_name'); |
| 300 |
push @messages, @errors; |
304 |
push @messages, @errors; |
| 301 |
$template->param( |
305 |
$template->param( |
| 302 |
indexes => \@indexes, |
306 |
indexes => \@indexes, |
| 303 |
all_search_fields => \@all_search_fields, |
307 |
all_search_fields => \@all_search_fields, |
| 304 |
facetable_fields => \@facetable_fields, |
308 |
facetable_fields => \@facetable_fields, |
| 305 |
messages => \@messages, |
309 |
messages => \@messages, |
|
|
310 |
authorised_value_categories => \@authorised_value_categories, |
| 306 |
); |
311 |
); |
| 307 |
|
312 |
|
| 308 |
output_html_with_http_headers $input, $cookie, $template->output; |
313 |
output_html_with_http_headers $input, $cookie, $template->output; |