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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-10 lines)
Lines 232-247 sub build_query { Link Here
232
        $res->{aggregations}->{$name} = { terms => { field => "${name}__facet" , size => $size } };
232
        $res->{aggregations}->{$name} = { terms => { field => "${name}__facet" , size => $size } };
233
    };
233
    };
234
234
235
    # FIXME We need a way to show/hide the facet individually
236
    #my $display_library_facets = C4::Context->preference('DisplayLibraryFacets');
237
    #if (   $display_library_facets eq 'both'
238
    #    or $display_library_facets eq 'home' ) {
239
    #    $res->{aggregations}{homebranch} = { terms => { field => "homebranch__facet", size => $size } };
240
    #}
241
    #if (   $display_library_facets eq 'both'
242
    #    or $display_library_facets eq 'holding' ) {
243
    #    $res->{aggregations}{holdingbranch} = { terms => { field => "holdingbranch__facet", size => $size } };
244
    #}
245
    return $res;
235
    return $res;
246
}
236
}
247
237
(-)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 278-283 Searching: Link Here
278
                  home: "home library"
278
                  home: "home library"
279
                  holding: "holding library"
279
                  holding: "holding library"
280
                  both: "both home and holding library"
280
                  both: "both home and holding library"
281
            - (Zebra only).
281
        -
282
        -
282
            - Truncate facets length to
283
            - Truncate facets length to
283
            - pref: FacetLabelTruncationLength
284
            - pref: FacetLabelTruncationLength
284
- 

Return to bug 35138