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

(-)a/admin/searchengine/elasticsearch/mappings.pl (-7 / +7 lines)
Lines 28-34 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
use Koha::AuthorisedValues;
32
32
33
use Try::Tiny qw( catch try );
33
use Try::Tiny qw( catch try );
34
use Module::Load::Conditional qw( can_load );
34
use Module::Load::Conditional qw( can_load );
Lines 119-125 if ( $op eq 'cud-edit' ) { Link Here
119
            my $field_weight       = $field_weight[$i];
119
            my $field_weight       = $field_weight[$i];
120
            my $field_staff_client = $field_staff_client[$i];
120
            my $field_staff_client = $field_staff_client[$i];
121
            my $field_opac         = $field_opac[$i];
121
            my $field_opac         = $field_opac[$i];
122
            my $av_category = $input->param('facet_av_cat_' . $field_name);
122
            my $av_category        = $input->param( 'facet_av_cat_' . $field_name );
123
123
124
            my $search_field = Koha::SearchFields->find_or_create(
124
            my $search_field = Koha::SearchFields->find_or_create(
125
                {
125
                {
Lines 300-312 while ( my $search_field = $search_fields->next ) { Link Here
300
    push @all_search_fields, $search_field_unblessed;
300
    push @all_search_fields, $search_field_unblessed;
301
}
301
}
302
302
303
my @authorised_value_categories = Koha::AuthorisedValueCategories->search->get_column('category_name');
303
my @authorised_value_categories = Koha::AuthorisedValues->new->categories;
304
push @messages, @errors;
304
push @messages, @errors;
305
$template->param(
305
$template->param(
306
    indexes           => \@indexes,
306
    indexes                     => \@indexes,
307
    all_search_fields => \@all_search_fields,
307
    all_search_fields           => \@all_search_fields,
308
    facetable_fields  => \@facetable_fields,
308
    facetable_fields            => \@facetable_fields,
309
    messages          => \@messages,
309
    messages                    => \@messages,
310
    authorised_value_categories => \@authorised_value_categories,
310
    authorised_value_categories => \@authorised_value_categories,
311
);
311
);
312
312
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt (-1 / +3 lines)
Lines 527-533 a.add, a.delete { Link Here
527
                                                    <input type="hidden" name="facet_name" value="[% f.name | html %]" />
527
                                                    <input type="hidden" name="facet_name" value="[% f.name | html %]" />
528
                                                </td>
528
                                                </td>
529
                                                <td>
529
                                                <td>
530
                                                    [% IF f.name != 'itype' && f.name != 'location' && f.name != 'holdingbranch' && f.name != 'homebranch' && f.name != 'ln' && f.name != 'ccode' %]
530
                                                    <select name="facet_av_cat_[% f.name | html %]">
531
                                                    <select name="facet_av_cat_[% f.name | html %]">
532
                                                        <option value=""></option>
531
                                                        [% FOR av_cat IN authorised_value_categories %]
533
                                                        [% FOR av_cat IN authorised_value_categories %]
532
                                                            [% IF f.authorised_value_category == av_cat %]
534
                                                            [% IF f.authorised_value_category == av_cat %]
533
                                                                <option value="[% av_cat | html %]" selected="selected">[% av_cat | html %]</option>
535
                                                                <option value="[% av_cat | html %]" selected="selected">[% av_cat | html %]</option>
Lines 536-541 a.add, a.delete { Link Here
536
                                                            [% END %]
538
                                                            [% END %]
537
                                                        [% END %]
539
                                                        [% END %]
538
                                                    </select>
540
                                                    </select>
541
                                                    [% END %]
539
                                                </td>
542
                                                </td>
540
                                                <td>
543
                                                <td>
541
                                                    <a class="btn btn-default btn-xs delete-facet" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a>
544
                                                    <a class="btn btn-default btn-xs delete-facet" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a>
542
- 

Return to bug 36396