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 2069-2075 input { Link Here
2069
        a {
2069
        a {
2070
            background-color: #F0F3F3;
2070
            background-color: #F0F3F3;
2071
            border-bottom: 1px solid #D8D8D8;
2071
            border-bottom: 1px solid #D8D8D8;
2072
                        display: block;
2072
            display: block;
2073
            font-weight: bold;
2073
            font-weight: bold;
2074
            padding: .7em .2em;
2074
            padding: .7em .2em;
2075
            text-decoration: none;
2075
            text-decoration: none;
Lines 2092-2104 input { Link Here
2092
            margin-bottom: 2px;
2092
            margin-bottom: 2px;
2093
            padding: .1em .2em;
2093
            padding: .1em .2em;
2094
        }
2094
        }
2095
2096
        &.showmore {
2097
            a {
2098
                font-weight: bold;
2099
                text-indent: 1em;
2100
            }
2101
        }
2102
    }
2095
    }
2103
2096
2104
    a {
2097
    a {
Lines 2109-2114 input { Link Here
2109
        display: inline-block;
2102
        display: inline-block;
2110
    }
2103
    }
2111
2104
2105
	.toggle-facet {
2106
        cursor: pointer;
2107
	}
2108
2109
	.toggle-facet::before {
2110
        font-family: "FontAwesome";
2111
        cursor: pointer;
2112
        content: '\f054';
2113
        font-weight: 100;
2114
        font-size: 10px;
2115
        padding-right: 3px;
2116
	}
2117
2118
	.facet-list-expanded::before {
2119
        content: '\f078';
2120
	}
2112
}
2121
}
2113
2122
2114
#menu {
2123
#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 %]<h3 id="facet-authors">Authors</h3>[% 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 %]<h3 id="facet-titles">Titles</h3>[% 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 %]<h3 id="facet-topics">Topics</h3>[% 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 %]<h3 id="facet-places">Places</h3>[% 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 %]<h3 id="facet-series">Series</h3>[% 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 %]<h3 id="facet-itemtypes">Item types</h3>[% 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 %]<h3 id="facet-collections">Collections</h3>[% 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 %]<h3 id="facet-languages">Languages</h3>[% 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 ) %]<h3 id="facet-home-libraries">Home libraries</h3>[% 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 ) %]<h3 id="facet-holding-libraries">Holding libraries</h3>[% 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 %]<h3 id="facet-locations">Locations</h3>[% 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 1016-1020 $("input.newtag").on('keydown', function(e){ Link Here
1016
    });
1016
    });
1017
1017
1018
});
1018
});
1019
$('.toggle-facet').click( function() {
1020
    $(this).siblings('.collapsible-list').toggle();
1021
    $(this).toggleClass('facet-list-expanded');
1022
    $(this).attr('aria-expanded' , function(index, attr) {
1023
        return attr == 'true' ? false : true;
1024
    })
1025
})
1019
</script>
1026
</script>
1020
[% END %]
1027
[% END %]
1021
- 

Return to bug 25314