From 06125f4edd9156a3faba7b939f519b4b6a545bc3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 22 Mar 2024 09:29:45 +0100 Subject: [PATCH] Bug 36396: Prevent link to av for 'specials' See previous commit message, 'QA' part. We do not support the "specials" categories. Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Lukas Koszyk Signed-off-by: Martin Renvoize --- admin/searchengine/elasticsearch/mappings.pl | 14 +++++++------- .../admin/searchengine/elasticsearch/mappings.tt | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/admin/searchengine/elasticsearch/mappings.pl b/admin/searchengine/elasticsearch/mappings.pl index 492be8621da..fe54c404798 100755 --- a/admin/searchengine/elasticsearch/mappings.pl +++ b/admin/searchengine/elasticsearch/mappings.pl @@ -28,7 +28,7 @@ use Koha::SearchEngine::Elasticsearch::QueryBuilder; use Koha::SearchMarcMaps; use Koha::SearchFields; use Koha::Caches; -use Koha::AuthorisedValueCategories; +use Koha::AuthorisedValues; use Try::Tiny qw( catch try ); use Module::Load::Conditional qw( can_load ); @@ -119,7 +119,7 @@ if ( $op eq 'cud-edit' ) { my $field_weight = $field_weight[$i]; my $field_staff_client = $field_staff_client[$i]; my $field_opac = $field_opac[$i]; - my $av_category = $input->param('facet_av_cat_' . $field_name); + my $av_category = $input->param( 'facet_av_cat_' . $field_name ); my $search_field = Koha::SearchFields->find_or_create( { @@ -300,13 +300,13 @@ while ( my $search_field = $search_fields->next ) { push @all_search_fields, $search_field_unblessed; } -my @authorised_value_categories = Koha::AuthorisedValueCategories->search->get_column('category_name'); +my @authorised_value_categories = Koha::AuthorisedValues->new->categories; push @messages, @errors; $template->param( - indexes => \@indexes, - all_search_fields => \@all_search_fields, - facetable_fields => \@facetable_fields, - messages => \@messages, + indexes => \@indexes, + all_search_fields => \@all_search_fields, + facetable_fields => \@facetable_fields, + messages => \@messages, authorised_value_categories => \@authorised_value_categories, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt index dae7502f73b..0c6a32d2f04 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt @@ -527,7 +527,9 @@ a.add, a.delete { + [% IF f.name != 'itype' && f.name != 'location' && f.name != 'holdingbranch' && f.name != 'homebranch' && f.name != 'ln' && f.name != 'ccode' %] + [% END %] Delete -- 2.45.0