Bugzilla – Attachment 43134 Details for
Bug 12478
Elasticsearch support for Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12478: facets - Display description instead of code for locations
Bug-12478-facets---Display-description-instead-of-.patch (text/plain), 1.52 KB, created by
Jonathan Druart
on 2015-10-05 13:42:39 UTC
(
hide
)
Description:
Bug 12478: facets - Display description instead of code for locations
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-10-05 13:42:39 UTC
Size:
1.52 KB
patch
obsolete
>From 230738441b1275b118d4c284ac3135db836f2a08 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 5 Oct 2015 12:50:52 +0100 >Subject: [PATCH] Bug 12478: facets - Display description instead of code for > locations > >--- > Koha/SearchEngine/Elasticsearch/Search.pm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm >index 690a568..0b4e16f 100644 >--- a/Koha/SearchEngine/Elasticsearch/Search.pm >+++ b/Koha/SearchEngine/Elasticsearch/Search.pm >@@ -39,7 +39,9 @@ Koha::SearchEngine::ElasticSearch::Search - search functions for Elasticsearch > =cut > > use base qw(Koha::ElasticSearch); >+use C4::Context; > use Koha::ItemTypes; >+use Koha::AuthorisedValues; > use Koha::SearchEngine::QueryBuilder; > > use Catmandu::Store::ElasticSearch; >@@ -400,8 +402,11 @@ sub _convert_facets { > # We also have some special cases, e.g. itypes that need to show the > # value rather than the code. > my @itypes = Koha::ItemTypes->search; >+ my @locations = Koha::AuthorisedValues->search( { category => 'LOC' } ); >+ my $opac = C4::Context->interface eq 'opac' ; > my %special = ( >- itype => { map { $_->itemtype => $_->description } @itypes }, >+ itype => { map { $_->itemtype => $_->description } @itypes }, >+ location => { map { $_->authorised_value => ( $opac ? ( $_->lib_opac || $_->lib ) : $_->lib ) } @locations }, > ); > my @res; > $exp_facet //= ''; >-- >2.1.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 12478
:
29204
|
31128
|
31129
|
33136
|
33137
|
33138
|
33139
|
33140
|
33141
|
35654
|
40903
|
42030
|
42031
|
42032
|
42033
|
42062
|
42063
|
42064
|
42065
|
42066
|
42067
|
42068
|
42069
|
42392
|
42393
|
43127
|
43128
|
43129
|
43130
|
43131
|
43132
|
43133
|
43134
|
43140
|
43141
|
43142
|
43148
|
43345
|
43346
|
43347
|
43348
|
43349
|
43350
|
43351
|
43352
|
43373
|
47767
|
47768
|
50115
|
50159
|
50211
|
50212
|
50213
|
50214
|
50245
|
50246
|
50291
|
50292