From ec1acd5a98b9e32c0d1e0b192c3dbd5eae2a1efc 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 | 24 +++++++++----- .../bootstrap/en/includes/opac-facets.inc | 38 ++++++++-------------- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 4 +++ 3 files changed, 34 insertions(+), 32 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..2c960588c2 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -2052,7 +2052,7 @@ input { a { background-color: #F0F3F3; border-bottom: 1px solid #D8D8D8; - display: block; + display: block; font-weight: bold; padding: .7em .2em; text-decoration: none; @@ -2071,13 +2071,6 @@ input { margin-bottom: 2px; padding: .1em .2em; } - - &.showmore { - a { - font-weight: bold; - text-indent: 1em; - } - } } a { @@ -2089,6 +2082,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 %] -