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

(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (-8 / +17 lines)
Lines 2052-2058 input { Link Here
2052
        a {
2052
        a {
2053
            background-color: #F0F3F3;
2053
            background-color: #F0F3F3;
2054
            border-bottom: 1px solid #D8D8D8;
2054
            border-bottom: 1px solid #D8D8D8;
2055
                        display: block;
2055
            display: block;
2056
            font-weight: bold;
2056
            font-weight: bold;
2057
            padding: .7em .2em;
2057
            padding: .7em .2em;
2058
            text-decoration: none;
2058
            text-decoration: none;
Lines 2071-2083 input { Link Here
2071
            margin-bottom: 2px;
2071
            margin-bottom: 2px;
2072
            padding: .1em .2em;
2072
            padding: .1em .2em;
2073
        }
2073
        }
2074
2075
        &.showmore {
2076
            a {
2077
                font-weight: bold;
2078
                text-indent: 1em;
2079
            }
2080
        }
2081
    }
2074
    }
2082
2075
2083
    a {
2076
    a {
Lines 2089-2094 input { Link Here
2089
        display: inline-block;
2082
        display: inline-block;
2090
    }
2083
    }
2091
2084
2085
	.toggle-facet {
2086
        cursor: pointer;
2087
	}
2088
2089
	.toggle-facet::before {
2090
        font-family: "FontAwesome";
2091
        cursor: pointer;
2092
        content: '\f054';
2093
        font-weight: 100;
2094
        font-size: 10px;
2095
        padding-right: 3px;
2096
	}
2097
2098
	.facet-list-expanded::before {
2099
        content: '\f078';
2100
	}
2092
}
2101
}
2093
2102
2094
#menu {
2103
#menu {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc (-23 / +13 lines)
Lines 21-40 Link Here
21
            [% FOREACH facets_loo IN facets_loop %]
21
            [% FOREACH facets_loo IN facets_loop %]
22
                [% IF facets_loo.facets.size > 0 %]
22
                [% IF facets_loo.facets.size > 0 %]
23
                    <li id="[% facets_loo.type_id | html %]">
23
                    <li id="[% facets_loo.type_id | html %]">
24
                        [% IF facets_loo.type_label_Authors %]<h5 id="facet-authors">Authors</h5>[% END %]
24
                        [% IF facets_loo.type_label_Authors %]<h5 id="facet-authors" class="toggle-facet" role="button" tabindex="0" aria-expanded="false">Authors</h5>[% END %]
25
                        [% IF facets_loo.type_label_Titles %]<h5 id="facet-titles">Titles</h5>[% END %]
25
                        [% IF facets_loo.type_label_Titles %]<h5 id="facet-titles" class="toggle-facet" role="button" tabindex="0" aria-expanded="false">Titles</h5>[% END %]
26
                        [% IF facets_loo.type_label_Topics %]<h5 id="facet-topics">Topics</h5>[% END %]
26
                        [% IF facets_loo.type_label_Topics %]<h5 id="facet-topics" class="toggle-facet" role="button" tabindex="0" aria-expanded="false">Topics</h5>[% END %]
27
                        [% IF facets_loo.type_label_Places %]<h5 id="facet-places">Places</h5>[% END %]
27
                        [% IF facets_loo.type_label_Places %]<h5 id="facet-places" class="toggle-facet" role="button" tabindex="0" aria-expanded="false">Places</h5>[% END %]
28
                        [% IF facets_loo.type_label_Series %]<h5 id="facet-series">Series</h5>[% END %]
28
                        [% IF facets_loo.type_label_Series %]<h5 id="facet-series" class="toggle-facet" role="button" tabindex="0" aria-expanded="false">Series</h5>[% END %]
29
                        [% IF facets_loo.type_label_ItemTypes %]<h5 id="facet-itemtypes">Item types</h5>[% END %]
29
                        [% IF facets_loo.type_label_ItemTypes %]<h5 id="facet-itemtypes" class="toggle-facet" role="button" tabindex="0" aria-expanded="false">Item types</h5>[% END %]
30
                        [% IF facets_loo.type_label_CollectionCodes %]<h5 id="facet-collections">Collections</h5>[% END %]
30
                        [% IF facets_loo.type_label_CollectionCodes %]<h5 id="facet-collections" class="toggle-facet" role="button" tabindex="0" aria-expanded="false">Collections</h5>[% END %]
31
                        [% IF facets_loo.type_label_Language %]<h5 id="facet-languages">Languages</h5>[% END %]
31
                        [% IF facets_loo.type_label_Language %]<h5 id="facet-languages" class="toggle-facet" role="button" tabindex="0" aria-expanded="false">Languages</h5>[% END %]
32
                        [% UNLESS singleBranchMode %]
32
                        [% UNLESS singleBranchMode %]
33
                            [% IF ( facets_loo.type_label_HomeLibrary ) %]<h5 id="facet-home-libraries">Home libraries</h5>[% END %]
33
                            [% IF ( facets_loo.type_label_HomeLibrary ) %]<h5 id="facet-home-libraries" class="toggle-facet" role="button" tabindex="0" aria-expanded="false">Home libraries</h5>[% END %]
34
                            [% IF ( facets_loo.type_label_HoldingLibrary ) %]<h5 id="facet-holding-libraries">Holding libraries</h5>[% END %]
34
                            [% IF ( facets_loo.type_label_HoldingLibrary ) %]<h5 id="facet-holding-libraries" class="toggle-facet" role="button" tabindex="0" aria-expanded="false">Holding libraries</h5>[% END %]
35
                        [% END %]
35
                        [% END %]
36
                        [% IF facets_loo.type_label_Location %]<h5 id="facet-locations">Locations</h5>[% END %]
36
                        [% IF facets_loo.type_label_Location %]<h5 id="facet-locations" class="toggle-facet" role="button" tabindex="0" aria-expanded="false">Locations</h5>[% END %]
37
                        <ul>
37
                        <ul class="collapsible-list" style="display:none;">
38
                            [% SET url = "/cgi-bin/koha/opac-search.pl?" _ query_cgi _ limit_cgi %]
38
                            [% SET url = "/cgi-bin/koha/opac-search.pl?" _ query_cgi _ limit_cgi %]
39
                            [% IF ( sort_by ) %]
39
                            [% IF ( sort_by ) %]
40
                              [% url = BLOCK %][% url | $raw %][% "&amp;sort_by=" _ sort_by | url %][% END %]
40
                              [% url = BLOCK %][% url | $raw %][% "&amp;sort_by=" _ sort_by | url %][% END %]
Lines 45-53 Link Here
45
                            [% FOREACH facet IN facets_loo.facets %]
45
                            [% FOREACH facet IN facets_loo.facets %]
46
                            [% IF facets_loo.type_label_CollectionCodes %][% SET facet.facet_label_value = AuthorisedValues.GetByCode('CCODE',facet.facet_label_value,1) || facet.facet_label_value %][% END %]
46
                            [% IF facets_loo.type_label_CollectionCodes %][% SET facet.facet_label_value = AuthorisedValues.GetByCode('CCODE',facet.facet_label_value,1) || facet.facet_label_value %][% END %]
47
                            [% IF facets_loo.type_label_Language %][% SET facet.facet_label_value = Languages.GetByISOCode(lang,facet.facet_label_value) || facet.facet_label_value %][% END %]
47
                            [% IF facets_loo.type_label_Language %][% SET facet.facet_label_value = Languages.GetByISOCode(lang,facet.facet_label_value) || facet.facet_label_value %][% END %]
48
                            [% IF loop.count > 5 && !facet.active %]
48
                            [% IF !facet.active %]
49
                                <li class="collapsible-facet" style="display:none">
50
                            [% ELSE %]
51
                                <li>
49
                                <li>
52
                            [% END %]
50
                            [% END %]
53
                                  [% IF facet.active %]
51
                                  [% IF facet.active %]
Lines 63-76 Link Here
63
                                  [% END %]
61
                                  [% END %]
64
                                </li>
62
                                </li>
65
                            [% END %]
63
                            [% END %]
66
                            [% IF facets_loo.facets.size > 5 %]
67
                                <li class="moretoggle">
68
                                    <a href="#"><strong>Show more</strong></a>
69
                                </li>
70
                                <li class="moretoggle" style="display:none">
71
                                    <a href="#"><strong>Show less</strong></a>
72
                                </li>
73
                            [% END %]
74
                        </ul>
64
                        </ul>
75
                    </li>
65
                    </li>
76
                [% END # / IF facets_loo.facets.size > 0 %]
66
                [% END # / IF facets_loo.facets.size > 0 %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-1 / +7 lines)
Lines 997-1001 $("input.newtag").on('keydown', function(e){ Link Here
997
    });
997
    });
998
998
999
});
999
});
1000
$('.toggle-facet').click( function() {
1001
    $(this).siblings('.collapsible-list').toggle();
1002
    $(this).toggleClass('facet-list-expanded');
1003
    $(this).attr('aria-expanded' , function(index, attr) {
1004
        return attr == 'true' ? false : true;        
1005
    })
1006
})
1000
</script>
1007
</script>
1001
[% END %]
1008
[% END %]
1002
- 

Return to bug 25314