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

(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/_common.scss (+9 lines)
Lines 176-181 caption { Link Here
176
    }
176
    }
177
}
177
}
178
178
179
.badge {
180
    &.bg-info-subtle,
181
    &.bg-secondary-subtle {
182
        color: #000 !important;
183
        margin-left: .3em;
184
        text-indent: 0;
185
    }
186
}
187
179
.btn-primary {
188
.btn-primary {
180
    background-color: $base-theme-color;
189
    background-color: $base-theme-color;
181
    border: 1px solid darken( $base-theme-color, 10% );
190
    border: 1px solid darken( $base-theme-color, 10% );
(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (-12 / +54 lines)
Lines 1874-1891 nav { Link Here
1874
    }
1874
    }
1875
1875
1876
    li {
1876
    li {
1877
        font-size: 90%;
1877
        font-size: 95%;
1878
        font-weight: bold;
1879
        list-style-type: none;
1878
        list-style-type: none;
1880
1879
1881
        li {
1882
            font-size: 95%;
1883
            font-weight: normal;
1884
            line-height: 125%;
1885
            margin-bottom: 2px;
1886
            padding: .1em .2em;
1887
        }
1888
1889
        &.showmore {
1880
        &.showmore {
1890
            a {
1881
            a {
1891
                font-weight: bold;
1882
                font-weight: bold;
Lines 1898-1905 nav { Link Here
1898
        font-weight: normal;
1889
        font-weight: normal;
1899
    }
1890
    }
1900
1891
1901
    .facet-count {
1892
    .facet-label-selected {
1902
        display: inline-block;
1893
        font-weight: bold;
1894
    }
1895
1896
    .facet-toggle,
1897
    .facet-toggle:hover,
1898
    .facet-static {
1899
        color: #6F6F6F;
1900
        cursor: pointer;
1901
        display: inline-flex;
1902
        font-weight: bold;
1903
        padding: 0.3em 0;
1904
        text-decoration: none;
1905
    }
1906
    .facet-toggle::before {
1907
        color: #5A5A5A;
1908
        content: "\f0da";
1909
        font-family: "Font Awesome 6 Free";
1910
        font-size: 90%;
1911
        line-height: 1.5em;
1912
        padding: 0 0.35em 0 0;
1913
        transition: transform 0.2s ease;
1914
    }
1915
1916
    .facet-toggle[aria-expanded="true"]::before {
1917
        content: "\f0d7";
1918
        padding-top: 0;
1919
        padding-bottom: 0;
1920
    }
1921
1922
    .facet-static::before {
1923
        color: #5A5A5A;
1924
        content: "\f0c8";
1925
        cursor: default;
1926
        font-family: "Font Awesome 6 Free";
1927
        font-size: 50%;
1928
        line-height: 1.5em;
1929
        padding: .7em 1em 0 0;
1930
    }
1931
1932
    .facet-collapse li {
1933
        padding: 0.1em 0 0.1em 1.6em;
1934
        text-indent: -1em;
1935
    }
1936
    .facet-remove {
1937
        background:#FFF none !important;
1938
        color:red !important;
1939
        padding:.2em .4em;
1940
        border:1px solid rgb(255, 0, 0);
1941
        text-indent:0;
1942
    }
1943
    .facet-remove:hover {
1944
        background: rgba(255, 0, 0, 0.1) none !important;
1903
    }
1945
    }
1904
}
1946
}
1905
1947
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc (-129 / +147 lines)
Lines 10-170 Link Here
10
        <ul class="menu-collapse">
10
        <ul class="menu-collapse">
11
            [% IF Koha.Preference("SavedSearchFilters") && search_filters.size > 0 %]
11
            [% IF Koha.Preference("SavedSearchFilters") && search_filters.size > 0 %]
12
                <li id="search-filters">
12
                <li id="search-filters">
13
                    <h3 id="filter_facets">Custom search filters</h3>
13
                    <a class="facet-toggle" aria-expanded="true" data-bs-toggle="collapse" data-bs-target="#custom_search_collapse" id="filter_facets">Custom search filters</a>
14
                    <div class="facet-collapse collapse show" id="custom_search_collapse">
15
                        <ul>
16
                            [% SET base_url = "/cgi-bin/koha/opac-search.pl?" _ query_cgi _ limit_cgi %]
17
                            [% FOREACH search_filter IN search_filters %]
18
                                [% SET search_filter_id = search_filter.id | uri %]
19
                                <li>
20
                                    [% IF active_filters.${search_filter.id} %]
21
                                        <span class="filter_label">[% search_filter.name | html %]<a href="[% base_url _ '&nolimit=search_filter:' _ search_filter_id | $raw %]">[x]</a></span>
22
                                    [% ELSE %]
23
                                        <span class="filter_label"><a href="[% base_url _ '&limit=search_filter:' _ search_filter_id | $raw %]">[% search_filter.name | html %]</a></span>
24
                                    [% END %]
25
                                </li>
26
                            [% END %]
27
                        </ul>
28
                    </div>
29
                </li>
30
            [% END %]
31
            <li id="availability_facet">
32
                <a class="facet-toggle" aria-expanded="true" data-bs-toggle="collapse" data-bs-target="#availability_collapse" id="filter_facets">Availability</a>
33
                <div class="facet-collapse collapse show" id="availability_collapse">
14
                    <ul>
34
                    <ul>
15
                        [% SET base_url = "/cgi-bin/koha/opac-search.pl?" _ query_cgi _ limit_cgi %]
35
                        [% IF ( available ) %]
16
                        [% FOREACH search_filter IN search_filters %]
36
                            <li><strong>Showing only records with available items</strong></li
17
                            [% SET search_filter_id = search_filter.id | uri %]
37
                            ><li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi_not_availablity | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %]">Show all records</a> </li>
18
                            <li>
38
                        [% ELSE %]
19
                                [% IF active_filters.${search_filter.id} %]
39
                            <li
20
                                    <span class="filter_label">[% search_filter.name | html %]<a href="[% base_url _ '&nolimit=search_filter:' _ search_filter_id | $raw %]">[x]</a></span>
40
                                ><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %]&amp;limit=available"
21
                                [% ELSE %]
41
                                    >Limit to records with available items</a
22
                                    <span class="filter_label"><a href="[% base_url _ '&limit=search_filter:' _ search_filter_id | $raw %]">[% search_filter.name | html %]</a></span>
42
                                ></li
23
                                [% END %]
43
                            >
24
                            </li>
25
                        [% END %]
44
                        [% END %]
45
                        [% IF ( related ) %]<li>(related searches: [% FOREACH relate IN related %][% relate.related_search | html %][% END %])</li>[% END %]
26
                    </ul>
46
                    </ul>
27
                </li>
47
                </div>
28
            [% END %]
29
            <li id="availability_facet"
30
                ><h3 id="facet-availability">Availability</h3>
31
                <ul>
32
                    [% IF ( available ) %]
33
                        <li><strong>Showing only records with available items</strong></li
34
                        ><li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi_not_availablity | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %]">Show all records</a> </li>
35
                    [% ELSE %]
36
                        <li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |uri %][% END %]&amp;limit=available">Limit to records with available items</a></li>
37
                    [% END %]
38
                </ul>
39
                [% IF ( related ) %]<li>(related searches: [% FOREACH relate IN related %][% relate.related_search | html %][% END %])</li>[% END %]
40
            </li>
48
            </li>
41
49
42
            [% FOREACH facets_loo IN facets_loop %]
50
            [% FOREACH facets_loo IN facets_loop %]
43
                [% IF facets_loo.facets.size > 0 %]
51
                [% IF facets_loo.facets.size > 0 %]
44
                    <li id="[% facets_loo.type_id | html %]">
52
                    <li id="[% facets_loo.type_id | html %]">
53
                        [% IF ( facets_loo.facets.size == 1 ) %]
54
                            [% attrs = "class='facet-static'" %]
55
                        [% ELSE %]
56
                            [% attrs = "class='facet-toggle' aria-expanded='true' data-bs-toggle='collapse' data-bs-target='#" _ facets_loo.type_id _ "_collapse'" %]
57
                        [% END %]
45
                        [% SWITCH facets_loo.label %]
58
                        [% SWITCH facets_loo.label %]
46
                        [% CASE 'Authors' %]
59
                        [% CASE 'Authors' %]
47
                            <h3 id="facet-authors">Authors</h3>
60
                            <a [% attrs | $raw %] id="facet-authors">Authors</a>
48
                        [% CASE 'Titles' %]
61
                        [% CASE 'Titles' %]
49
                            <h3 id="facet-titles">Titles</h3>
62
                            <a [% attrs | $raw %] id="facet-titles">Titles</a>
50
                        [% CASE 'Topics' %]
63
                        [% CASE 'Topics' %]
51
                            <h3 id="facet-topics">Topics</h3>
64
                            <a [% attrs | $raw %] id="facet-topics">Topics</a>
52
                        [% CASE 'Places' %]
65
                        [% CASE 'Places' %]
53
                            <h3 id="facet-places">Places</h3>
66
                            <a [% attrs | $raw %] id="facet-places">Places</a>
54
                        [% CASE 'Series' %]
67
                        [% CASE 'Series' %]
55
                            <h3 id="facet-series">Series</h3>
68
                            <a [% attrs | $raw %] id="facet-series">Series</a>
56
                        [% CASE 'Item types' %]
69
                        [% CASE 'Item types' %]
57
                            <h3 id="facet-itemtypes">Item types</h3>
70
                            <a [% attrs | $raw %] id="facet-itemtypes">Item types</a>
58
                        [% CASE 'Home libraries' %]
71
                        [% CASE 'Home libraries' %]
59
                            <h3 id="facet-home-libraries">Home libraries</h3>
72
                            <a [% attrs | $raw %] id="facet-home-libraries">Home libraries</a>
60
                        [% CASE 'Holding libraries' %]
73
                        [% CASE 'Holding libraries' %]
61
                            <h3 id="facet-holding-libraries">Holding libraries</h3>
74
                            <a [% attrs | $raw %] id="facet-holding-libraries">Holding libraries</a>
62
                        [% CASE 'Location' %]
75
                        [% CASE 'Location' %]
63
                            <h3 id="facet-locations">Locations</h3>
76
                            <a [% attrs | $raw %] id="facet-locations">Locations</a>
64
                        [% CASE 'Collections' %]
77
                        [% CASE 'Collections' %]
65
                            <h3 id="facet-collections">Collections</h3>
78
                            <a [% attrs | $raw %] id="facet-collections">Collections</a>
66
                        [% CASE 'Languages' %]
79
                        [% CASE 'Languages' %]
67
                            <h3 id="facet-languages">Languages</h3>
80
                            <a [% attrs | $raw %] id="facet-languages">Languages</a>
68
                        [% CASE %]
81
                        [% CASE %]
69
                            <h3 id="facet-[% facets_loo.type_link_value | html %]">[% facets_loo.label | html %]</h3>
82
                            <a [% attrs | $raw %] id="facet-[% facets_loo.type_link_value | html %]">[% facets_loo.type_id | html %]</a>
70
                        [% END %]
83
                        [% END %]
71
                        <ul>
84
                        <div class="facet-collapse collapse show" id="[% facets_loo.type_id | html %]_collapse">
72
                            [% SET url = "/cgi-bin/koha/opac-search.pl?" _ query_cgi _ limit_cgi %]
85
                            <ul>
73
                            [% IF ( sort_by ) %]
86
                                [% SET url = "/cgi-bin/koha/opac-search.pl?" _ query_cgi _ limit_cgi %]
74
                                [% url = BLOCK %][% url | $raw %][% "&amp;sort_by=" _ sort_by | url %][% END %]
87
                                [% IF ( sort_by ) %]
75
                            [% END %]
88
                                    [% url = BLOCK %][% url | $raw %][% "&amp;sort_by=" _ sort_by | url %][% END %]
76
                            [% IF ( results_per_page ) %]
89
                                [% END %]
77
                                [% url = BLOCK %][% url | $raw %][% "&amp;count=" _ results_per_page | url %][% END %]
90
                                [% IF ( results_per_page ) %]
78
                            [% END %]
91
                                    [% url = BLOCK %][% url | $raw %][% "&amp;count=" _ results_per_page | url %][% END %]
79
                            [% FOREACH facet IN facets_loo.facets %]
80
                                [% IF facets_loo.label == 'Collections' %][% SET facet.facet_label_value = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => facet.facet_label_value, opac =>1 ) || facet.facet_label_value %][% END %]
81
                                [% IF facets_loo.label == 'Languages' %][% SET facet.facet_label_value = Languages.GetByISOCode(lang,facet.facet_label_value) || facet.facet_label_value %][% END %]
82
                                [% SET li_class = '' %]
83
                                [% SET li_style = '' %]
84
                                [% IF loop.count > 5 && !facet.active %]
85
                                    [% li_class = "collapsible-facet" %]
86
                                    [% li_style = "display:none" %]
87
                                [% END %]
92
                                [% END %]
88
                                <li class="[% li_class | html %]" style="[% li_style | html %]">
93
                                [% FOREACH facet IN facets_loo.facets %]
89
                                    [% IF facet.active %]
94
                                    [% IF facets_loo.label == 'Collections' %][% SET facet.facet_label_value = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => facet.facet_label_value, opac =>1 ) || facet.facet_label_value %][% END %]
90
                                        [% local_url = BLOCK %][% url | $raw %][% "&nolimit=" _  facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %]
95
                                    [% IF facets_loo.label == 'Languages' %][% SET facet.facet_label_value = Languages.GetByISOCode(lang,facet.facet_label_value) || facet.facet_label_value %][% END %]
91
                                        <span class="facet-label">[% facet.facet_label_value | html %]</span>
96
                                    [% SET li_class = '' %]
92
                                        [% IF ( displayFacetCount ) %]
97
                                    [% SET li_style = '' %]
93
                                            <span class="facet-count-selected">([% facet.facet_count | html %])</span>
98
                                    [% IF loop.count > 5 && !facet.active %]
99
                                        [% li_class = "collapsible-facet" %]
100
                                        [% li_style = "display:none" %]
101
                                    [% END %]
102
                                    <li class="[% li_class | html %]" style="[% li_style | html %]">
103
                                        [% IF facet.active %]
104
                                            [% local_url = BLOCK %][% url | $raw %][% "&nolimit=" _  facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %]
105
                                            [% FILTER collapse %]
106
                                                <span class="facet-label facet-label-selected">
107
                                                    [% facet.facet_label_value | html %]
108
                                                    [% IF ( displayFacetCount ) %]
109
                                                        &nbsp;<span class="badge bg-info-subtle facet-count-selected">[% facet.facet_count | html %]</span>
110
                                                    [% END %]
111
                                                    &nbsp;<a href="[% local_url | $raw %]" title="Remove facet [% facet.facet_label_value | html %]"><span class="badge facet-remove">x</span></a>
112
                                                </span>
113
                                            [% END %]
114
                                        [% ELSE %]
115
                                            [% local_url = BLOCK %][% url | $raw %][% "&limit=" _  facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %]
116
                                            <span class="facet-label"><a href="[% local_url | $raw %]" title="[% facet.facet_title_value | html %]">[% facet.facet_label_value | html %]</a></span>
117
                                            [% IF ( displayFacetCount ) %]
118
                                                <span class="badge bg-info-subtle facet-count"> [% facet.facet_count | html %]</span>
119
                                            [% END %]
94
                                        [% END %]
120
                                        [% END %]
95
                                        [<a href="[% local_url | $raw %]" title="Remove facet [% facet.facet_label_value | html %]">x</a>]
121
                                    </li>
96
                                    [% ELSE %]
122
                                [% END %]
97
                                        [% local_url = BLOCK %][% url | $raw %][% "&limit=" _  facet.type_link_value _ ":" _ facet.facet_link_value | url %][% END %]
123
                                [% IF facets_loo.facets.size > 5 %]
98
                                        <span class="facet-label"><a href="[% local_url | $raw %]" title="[% facet.facet_title_value | html %]">[% facet.facet_label_value | html %]</a></span>
124
                                    <li class="moretoggle">
99
                                        [% IF ( displayFacetCount ) %]
125
                                        [% SET aria_label = t("Show more") %]
100
                                            <span class="facet-count"> ([% facet.facet_count | html %])</span>
126
                                        [% SWITCH facets_loo.label %]
127
                                        [% CASE 'Authors' %]
128
                                            [% aria_label = t("Show more authors") %]
129
                                        [% CASE 'Titles' %]
130
                                            [% aria_label = t("Show more titles") %]
131
                                        [% CASE 'Topics' %]
132
                                            [% aria_label = t("Show more topics") %]
133
                                        [% CASE 'Places' %]
134
                                            [% aria_label = t("Show more places") %]
135
                                        [% CASE 'Series' %]
136
                                            [% aria_label = t("Show more series") %]
137
                                        [% CASE 'Item types' %]
138
                                            [% aria_label = t("Show more item types") %]
139
                                        [% CASE 'Home libraries' %]
140
                                            [% aria_label = t("Show more home libraries") %]
141
                                        [% CASE 'Holding libraries' %]
142
                                            [% aria_label = t("Show more holding libraries") %]
143
                                        [% CASE 'Location' %]
144
                                            [% aria_label = t("Show more locations") %]
145
                                        [% CASE 'Collections' %]
146
                                            [% aria_label = t("Show more collections") %]
147
                                        [% CASE 'Languages' %]
148
                                            [% aria_label = t("Show more languages") %]
101
                                        [% END %]
149
                                        [% END %]
102
                                    [% END %]
103
                                </li>
104
                            [% END %]
105
                            [% IF facets_loo.facets.size > 5 %]
106
                                <li class="moretoggle">
107
                                    [% SET aria_label = t("Show more") %]
108
                                    [% SWITCH facets_loo.label %]
109
                                    [% CASE 'Authors' %]
110
                                        [% aria_label = t("Show more authors") %]
111
                                    [% CASE 'Titles' %]
112
                                        [% aria_label = t("Show more titles") %]
113
                                    [% CASE 'Topics' %]
114
                                        [% aria_label = t("Show more topics") %]
115
                                    [% CASE 'Places' %]
116
                                        [% aria_label = t("Show more places") %]
117
                                    [% CASE 'Series' %]
118
                                        [% aria_label = t("Show more series") %]
119
                                    [% CASE 'Item types' %]
120
                                        [% aria_label = t("Show more item types") %]
121
                                    [% CASE 'Home libraries' %]
122
                                        [% aria_label = t("Show more home libraries") %]
123
                                    [% CASE 'Holding libraries' %]
124
                                        [% aria_label = t("Show more holding libraries") %]
125
                                    [% CASE 'Location' %]
126
                                        [% aria_label = t("Show more locations") %]
127
                                    [% CASE 'Collections' %]
128
                                        [% aria_label = t("Show more collections") %]
129
                                    [% CASE 'Languages' %]
130
                                        [% aria_label = t("Show more languages") %]
131
                                    [% END %]
132
150
133
                                    <a href="#" aria-label="[% aria_label | html | trim %]"><strong>Show more</strong></a>
151
                                        <a href="#" aria-label="[% aria_label | html | trim %]"><strong>Show more</strong></a>
134
                                </li>
152
                                    </li>
135
                                <li class="moretoggle" style="display:none">
153
                                    <li class="moretoggle" style="display:none">
136
                                    [% SET aria_label = t("Show more") %]
154
                                        [% SET aria_label = t("Show more") %]
137
                                    [% SWITCH facets_loo.label %]
155
                                        [% SWITCH facets_loo.label %]
138
                                    [% CASE 'Authors' %]
156
                                        [% CASE 'Authors' %]
139
                                        [% aria_label = t("Show fewer authors") %]
157
                                            [% aria_label = t("Show fewer authors") %]
140
                                    [% CASE 'Titles' %]
158
                                        [% CASE 'Titles' %]
141
                                        [% aria_label = t("Show fewer titles") %]
159
                                            [% aria_label = t("Show fewer titles") %]
142
                                    [% CASE 'Topics' %]
160
                                        [% CASE 'Topics' %]
143
                                        [% aria_label = t("Show fewer topics") %]
161
                                            [% aria_label = t("Show fewer topics") %]
144
                                    [% CASE 'Places' %]
162
                                        [% CASE 'Places' %]
145
                                        [% aria_label = t("Show fewer places") %]
163
                                            [% aria_label = t("Show fewer places") %]
146
                                    [% CASE 'Series' %]
164
                                        [% CASE 'Series' %]
147
                                        [% aria_label = t("Show fewer series") %]
165
                                            [% aria_label = t("Show fewer series") %]
148
                                    [% CASE 'Item types' %]
166
                                        [% CASE 'Item types' %]
149
                                        [% aria_label = t("Show fewer item types") %]
167
                                            [% aria_label = t("Show fewer item types") %]
150
                                    [% CASE 'Home libraries' %]
168
                                        [% CASE 'Home libraries' %]
151
                                        [% aria_label = t("Show fewer home libraries") %]
169
                                            [% aria_label = t("Show fewer home libraries") %]
152
                                    [% CASE 'Holding libraries' %]
170
                                        [% CASE 'Holding libraries' %]
153
                                        [% aria_label = t("Show fewer holding libraries") %]
171
                                            [% aria_label = t("Show fewer holding libraries") %]
154
                                    [% CASE 'Location' %]
172
                                        [% CASE 'Location' %]
155
                                        [% aria_label = t("Show fewer locations") %]
173
                                            [% aria_label = t("Show fewer locations") %]
156
                                    [% CASE 'Collections' %]
174
                                        [% CASE 'Collections' %]
157
                                        [% aria_label = t("Show fewer collections") %]
175
                                            [% aria_label = t("Show fewer collections") %]
158
                                    [% CASE 'Languages' %]
176
                                        [% CASE 'Languages' %]
159
                                        [% aria_label = t("Show fewer languages") %]
177
                                            [% aria_label = t("Show fewer languages") %]
160
                                    [% END %]
178
                                        [% END %]
161
179
162
                                    [% IF aria_label %]
180
                                        [% IF aria_label %]
163
                                        <a href="#" aria-label="[% aria_label | html | trim %]"><strong>Show less</strong></a>
181
                                            <a href="#" aria-label="[% aria_label | html | trim %]"><strong>Show less</strong></a>
164
                                    [% END %]
182
                                        [% END %]
165
                                </li>
183
                                    </li>
166
                            [% END %]
184
                                [% END %]
167
                        </ul>
185
                            </ul>
186
                        </div>
168
                    </li>
187
                    </li>
169
                [% END # / IF facets_loo.facets.size > 0 %]
188
                [% END # / IF facets_loo.facets.size > 0 %]
170
            [% END # / FOREACH facets_loo %]
189
            [% END # / FOREACH facets_loo %]
171
- 

Return to bug 25314