Bugzilla – Attachment 166249 Details for
Bug 36396
Link facet with authorised value category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36396: Prevent link to av for 'specials'
Bug-36396-Prevent-link-to-av-for-specials.patch (text/plain), 4.42 KB, created by
Martin Renvoize (ashimema)
on 2024-05-07 10:21:34 UTC
(
hide
)
Description:
Bug 36396: Prevent link to av for 'specials'
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-05-07 10:21:34 UTC
Size:
4.42 KB
patch
obsolete
>From 06125f4edd9156a3faba7b939f519b4b6a545bc3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 <lukasz.koszyk@kit.edu> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > 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 { > <input type="hidden" name="facet_name" value="[% f.name | html %]" /> > </td> > <td> >+ [% IF f.name != 'itype' && f.name != 'location' && f.name != 'holdingbranch' && f.name != 'homebranch' && f.name != 'ln' && f.name != 'ccode' %] > <select name="facet_av_cat_[% f.name | html %]"> >+ <option value=""></option> > [% FOR av_cat IN authorised_value_categories %] > [% IF f.authorised_value_category == av_cat %] > <option value="[% av_cat | html %]" selected="selected">[% av_cat | html %]</option> >@@ -536,6 +538,7 @@ a.add, a.delete { > [% END %] > [% END %] > </select> >+ [% END %] > </td> > <td> > <a class="btn btn-default btn-xs delete-facet" style="cursor: pointer;"><i class="fa fa-trash"></i> Delete</a> >-- >2.45.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36396
:
163685
|
163686
|
163687
|
163688
|
163689
|
163690
|
163705
|
163776
|
163777
|
163778
|
163779
|
163780
|
163781
|
163782
|
166246
|
166247
|
166248
| 166249 |
166250
|
166251
|
166252
|
166254
|
166258