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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc (-20 / +54 lines)
Lines 39-56 Link Here
39
                [% IF ( related ) %] <li>(related searches: [% FOREACH relate IN related %][% relate.related_search | html %][% END %])</li>[% END %]
39
                [% IF ( related ) %] <li>(related searches: [% FOREACH relate IN related %][% relate.related_search | html %][% END %])</li>[% END %]
40
            </li>
40
            </li>
41
41
42
            [% SET more_less_labels = {} %]
43
            [% more_less_labels.Authors         = { more = t("Show more authors"),           less = t("Show fewer authors") }           %]
44
            [% more_less_labels.Titles          = { more = t("Show more titles"),            less = t("Show fewer titles") }            %]
45
            [% more_less_labels.Topics          = { more = t("Show more topics"),            less = t("Show fewer topics") }            %]
46
            [% more_less_labels.Places          = { more = t("Show more places"),            less = t("Show fewer places") }            %]
47
            [% more_less_labels.Series          = { more = t("Show more series"),            less = t("Show fewer series") }            %]
48
            [% more_less_labels.ItemTypes       = { more = t("Show more item types"),        less = t("Show fewer item types") }        %]
49
            [% more_less_labels.CollectionCodes = { more = t("Show more collections"),       less = t("Show fewer collections") }       %]
50
            [% more_less_labels.Language        = { more = t("Show more languages"),         less = t("Show fewer languages") }         %]
51
            [% more_less_labels.HomeLibrary     = { more = t("Show more home libraries"),    less = t("Show fewer home libraries") }    %]
52
            [% more_less_labels.HoldingLibrary  = { more = t("Show more holding libraries"), less = t("Show fewer holding libraries") } %]
53
            [% more_less_labels.Location        = { more = t("Show more locations"),         less = t("Show fewer locations") }         %]
54
            [% FOREACH facets_loo IN facets_loop %]
42
            [% FOREACH facets_loo IN facets_loop %]
55
                [% IF facets_loo.facets.size > 0 %]
43
                [% IF facets_loo.facets.size > 0 %]
56
                    <li id="[% facets_loo.type_id | html %]">
44
                    <li id="[% facets_loo.type_id | html %]">
Lines 114-130 Link Here
114
                            [% END %]
102
                            [% END %]
115
                            [% IF facets_loo.facets.size > 5 %]
103
                            [% IF facets_loo.facets.size > 5 %]
116
                                <li class="moretoggle">
104
                                <li class="moretoggle">
117
                                    [% FOR label IN more_less_labels.keys %]
105
                                    [% SET aria_label = t("Show more") %]
118
                                        [% IF facets_loo.item('type_label_' _ label) %]
106
                                    [% SWITCH facets_loo.label %]
119
                                            <a href="#" aria-label="[% more_less_labels.item(label).more || t('Show more') | html | trim %]"><strong>Show more</strong></a>
107
                                    [% CASE 'Authors' %]
120
                                        [% END %]
108
                                        [% aria_label = t("Show more authors") %]
109
                                    [% CASE 'Titles' %]
110
                                        [% aria_label = t("Show more titles") %]
111
                                    [% CASE 'Topics' %]
112
                                        [% aria_label = t("Show more topics") %]
113
                                    [% CASE 'Places' %]
114
                                        [% aria_label = t("Show more places") %]
115
                                    [% CASE 'Series' %]
116
                                        [% aria_label = t("Show more series") %]
117
                                    [% CASE 'ItemTypes' %]
118
                                        [% aria_label = t("Show more item types") %]
119
                                    [% CASE 'Home libraries' %]
120
                                        [% aria_label = t("Show more home libraries") %]
121
                                    [% CASE 'Holding libraries' %]
122
                                        [% aria_label = t("Show more holding libraries") %]
123
                                    [% CASE 'Location' %]
124
                                        [% aria_label = t("Show more home locations") %]
125
                                    [% CASE 'Collections' %]
126
                                        [% aria_label = t("Show more home collections") %]
127
                                    [% CASE 'Languages' %]
128
                                        [% aria_label = t("Show more home languages") %]
121
                                    [% END %]
129
                                    [% END %]
130
131
                                    <a href="#" aria-label="[% aria_label | html | trim %]"><strong>Show more</strong></a>
122
                                </li>
132
                                </li>
123
                                <li class="moretoggle" style="display:none">
133
                                <li class="moretoggle" style="display:none">
124
                                    [% FOR label IN more_less_labels.keys %]
134
                                    [% SET aria_label = t("Show more") %]
125
                                        [% IF facets_loo.item('type_label_' _ label) %]
135
                                    [% SWITCH facets_loo.label %]
126
                                            <a href="#" aria-label="[% more_less_labels.item(label).less || t('Show less') | html | trim %]"><strong>Show less</strong></a>
136
                                    [% CASE 'Authors' %]
127
                                        [% END %]
137
                                        [% aria_label = t("Show fewer authors") %]
138
                                    [% CASE 'Titles' %]
139
                                        [% aria_label = t("Show fewer titles") %]
140
                                    [% CASE 'Topics' %]
141
                                        [% aria_label = t("Show fewer topics") %]
142
                                    [% CASE 'Places' %]
143
                                        [% aria_label = t("Show fewer places") %]
144
                                    [% CASE 'Series' %]
145
                                        [% aria_label = t("Show fewer series") %]
146
                                    [% CASE 'ItemTypes' %]
147
                                        [% aria_label = t("Show fewer item types") %]
148
                                    [% CASE 'Home libraries' %]
149
                                        [% aria_label = t("Show fewer home libraries") %]
150
                                    [% CASE 'Holding libraries' %]
151
                                        [% aria_label = t("Show fewer holding libraries") %]
152
                                    [% CASE 'Location' %]
153
                                        [% aria_label = t("Show fewer home locations") %]
154
                                    [% CASE 'Collections' %]
155
                                        [% aria_label = t("Show fewer home collections") %]
156
                                    [% CASE 'Languages' %]
157
                                        [% aria_label = t("Show fewer home languages") %]
158
                                    [% END %]
159
160
                                    [% IF aria_label %]
161
                                        <a href="#" aria-label="[% aria_label | html | trim %]"><strong>Show less</strong></a>
128
                                    [% END %]
162
                                    [% END %]
129
                                </li>
163
                                </li>
130
                            [% END %]
164
                            [% END %]
(-)a/t/db_dependent/Search.t (-6 / +5 lines)
Lines 825-833 ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' Link Here
825
    my $facets_info = C4::Search::_get_facets_info( $facets );
825
    my $facets_info = C4::Search::_get_facets_info( $facets );
826
    my $expected_facets_info_marc21 = {
826
    my $expected_facets_info_marc21 = {
827
                   'au' => { 'label_value' => "Authors" },
827
                   'au' => { 'label_value' => "Authors" },
828
                'ccode' => { 'label_value' => "CollectionCodes" },
828
                'ccode' => { 'label_value' => "Collections" },
829
        'holdingbranch' => { 'label_value' => "HoldingLibrary" },
829
        'holdingbranch' => { 'label_value' => "Holding libraries" },
830
                'itype' => { 'label_value' => "ItemTypes" },
830
                'itype' => { 'label_value' => "Item types" },
831
             'location' => { 'label_value' => "Location" },
831
             'location' => { 'label_value' => "Location" },
832
                   'se' => { 'label_value' => "Series" },
832
                   'se' => { 'label_value' => "Series" },
833
               'su-geo' => { 'label_value' => "Places" },
833
               'su-geo' => { 'label_value' => "Places" },
Lines 925-932 sub run_unimarc_search_tests { Link Here
925
    my $facets_info = C4::Search::_get_facets_info( $facets );
925
    my $facets_info = C4::Search::_get_facets_info( $facets );
926
    my $expected_facets_info_unimarc = {
926
    my $expected_facets_info_unimarc = {
927
                   'au' => { 'label_value' => "Authors" },
927
                   'au' => { 'label_value' => "Authors" },
928
                'ccode' => { 'label_value' => "CollectionCodes" },
928
                'ccode' => { 'label_value' => "Collections" },
929
        'holdingbranch' => { 'label_value' => "HoldingLibrary" },
929
        'holdingbranch' => { 'label_value' => "Holding libraries" },
930
             'location' => { 'label_value' => "Location" },
930
             'location' => { 'label_value' => "Location" },
931
                   'se' => { 'label_value' => "Series" },
931
                   'se' => { 'label_value' => "Series" },
932
               'su-geo' => { 'label_value' => "Places" },
932
               'su-geo' => { 'label_value' => "Places" },
933
- 

Return to bug 36750