From 708a140e331cd004b0fc8485161c73cacc5c6987 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Wed, 29 Apr 2020 15:45:44 +0000 Subject: [PATCH] Bug 25314: Make OPAC facets collapse TO TEST: 1. Apply patch 2. Regenerate CSS (yarn build --view opac) 3. DO a search and look at the facets. They should be collapsed. 4. Try mousing over a facet heading and click, that list should appear. 5. Try clicking the heading again to make th facet disappear. 6. Play around with different limiters and make sure eveything works. --- koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 15 +++++++++ .../bootstrap/en/includes/opac-facets.inc | 38 ++++++++-------------- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 4 +++ 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index 2fec169b94..362a789724 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -2089,6 +2089,21 @@ input { display: inline-block; } + .toggle-facet { + cursor: pointer; + } + + .toggle-facet::before { + font-family: "FontAwesome"; + content: '\f054'; + font-weight: 100; + font-size: 10px; + padding-right: 3px; + } + + .facet-list-expanded::before { + content: '\f078'; + } } #menu { diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc index da5e98134e..5d412b52c4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc @@ -21,20 +21,20 @@ [% FOREACH facets_loo IN facets_loop %] [% IF facets_loo.facets.size > 0 %]
  • - [% IF facets_loo.type_label_Authors %]
    Authors
    [% END %] - [% IF facets_loo.type_label_Titles %]
    Titles
    [% END %] - [% IF facets_loo.type_label_Topics %]
    Topics
    [% END %] - [% IF facets_loo.type_label_Places %]
    Places
    [% END %] - [% IF facets_loo.type_label_Series %]
    Series
    [% END %] - [% IF facets_loo.type_label_ItemTypes %]
    Item types
    [% END %] - [% IF facets_loo.type_label_CollectionCodes %]
    Collections
    [% END %] - [% IF facets_loo.type_label_Language %]
    Languages
    [% END %] + [% IF facets_loo.type_label_Authors %]
    Authors
    [% END %] + [% IF facets_loo.type_label_Titles %]
    Titles
    [% END %] + [% IF facets_loo.type_label_Topics %]
    Topics
    [% END %] + [% IF facets_loo.type_label_Places %]
    Places
    [% END %] + [% IF facets_loo.type_label_Series %]
    Series
    [% END %] + [% IF facets_loo.type_label_ItemTypes %]
    Item types
    [% END %] + [% IF facets_loo.type_label_CollectionCodes %]
    Collections
    [% END %] + [% IF facets_loo.type_label_Language %]
    Languages
    [% END %] [% UNLESS singleBranchMode %] - [% IF ( facets_loo.type_label_HomeLibrary ) %]
    Home libraries
    [% END %] - [% IF ( facets_loo.type_label_HoldingLibrary ) %]
    Holding libraries
    [% END %] + [% IF ( facets_loo.type_label_HomeLibrary ) %]
    Home libraries
    [% END %] + [% IF ( facets_loo.type_label_HoldingLibrary ) %]
    Holding libraries
    [% END %] [% END %] - [% IF facets_loo.type_label_Location %]
    Locations
    [% END %] -