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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-11 lines)
Lines 233-249 sub build_query { Link Here
233
        $res->{aggregations}->{$name} = { terms => { field => "${name}__facet" , size => $size } };
233
        $res->{aggregations}->{$name} = { terms => { field => "${name}__facet" , size => $size } };
234
    };
234
    };
235
235
236
237
    # FIXME We need a way to show/hide the facet individually
238
    #my $display_library_facets = C4::Context->preference('DisplayLibraryFacets');
239
    #if (   $display_library_facets eq 'both'
240
    #    or $display_library_facets eq 'home' ) {
241
    #    $res->{aggregations}{homebranch} = { terms => { field => "homebranch__facet", size => $size } };
242
    #}
243
    #if (   $display_library_facets eq 'both'
244
    #    or $display_library_facets eq 'holding' ) {
245
    #    $res->{aggregations}{holdingbranch} = { terms => { field => "holdingbranch__facet", size => $size } };
246
    #}
247
    $res = _rebuild_to_es_advanced_query($res) if @$es_advanced_searches ;
236
    $res = _rebuild_to_es_advanced_query($res) if @$es_advanced_searches ;
248
    return $res;
237
    return $res;
249
}
238
}
(-)a/installer/data/mysql/atomicupdate/bug_35138.pl (-2 / +17 lines)
Lines 27-33 return { Link Here
27
        }
27
        }
28
28
29
        $sth->execute( 'Collections', 'ccode', 'collection-code');
29
        $sth->execute( 'Collections', 'ccode', 'collection-code');
30
        $sth->execute( 'Holding libraries', 'holdingbranch', 'holdinglibrary');
30
31
        $sth->execute( 'Home libraries', 'homebranch', 'homelibrary');
31
        # Deal with DisplayLibraryFacets
32
        my ($DisplayLibraryFacets) = $dbh->selectrow_array(q{
33
            SELECT value FROM systempreferences WHERE variable='DisplayLibraryFacets'
34
        });
35
        my ($homebranch, $holdingbranch);
36
        if ( $DisplayLibraryFacets eq 'both' ) {
37
            $homebranch = 1;
38
            $holdingbranch = 1;
39
        } elsif ( $DisplayLibraryFacets eq 'holding' ) {
40
            $holdingbranch = 1;
41
        } elsif ( $DisplayLibraryFacets eq 'home' ) {
42
            $homebranch = 1;
43
        }
44
        $sth->execute( 'Holding libraries', 'holdingbranch', 'holdinglibrary') if $holdingbranch;
45
        $sth->execute( 'Home libraries', 'homebranch', 'homelibrary') if $homebranch;
46
32
    },
47
    },
33
};
48
};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref (-1 / +1 lines)
Lines 283-288 Searching: Link Here
283
                  home: "home library"
283
                  home: "home library"
284
                  holding: "holding library"
284
                  holding: "holding library"
285
                  both: "both home and holding library"
285
                  both: "both home and holding library"
286
            - (Zebra only).
286
        -
287
        -
287
            - Truncate facets length to
288
            - Truncate facets length to
288
            - pref: FacetLabelTruncationLength
289
            - pref: FacetLabelTruncationLength
289
- 

Return to bug 35138