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

(-)a/C4/Search.pm (+3 lines)
Lines 587-592 sub getRecords { Link Here
587
                    $f->{facets} = $sorted_facets;
587
                    $f->{facets} = $sorted_facets;
588
                }
588
                }
589
            }
589
            }
590
            if ( C4::Context->preference('FacetOrder') eq 'Stringwise' ) {
591
                @{ $f->{facets} } = sort { $a->{facet_label_value} cmp $b->{facet_label_value} } @{ $f->{facets} };
592
            }
590
        }
593
        }
591
    }
594
    }
592
595
(-)a/Koha/SearchEngine/Elasticsearch/Search.pm (+2 lines)
Lines 575-580 sub _convert_facets { Link Here
575
            if ($sorted_facets) {
575
            if ($sorted_facets) {
576
                $facet->{facets} = $sorted_facets;
576
                $facet->{facets} = $sorted_facets;
577
            }
577
            }
578
        } elsif ( C4::Context->preference('FacetOrder') eq 'Stringwise' ) {
579
            @{ $facet->{facets} } = sort { $a->{facet_label_value} cmp $b->{facet_label_value} } @{ $facet->{facets} };
578
        }
580
        }
579
        push @facets, $facet if exists $facet->{facets};
581
        push @facets, $facet if exists $facet->{facets};
580
    }
582
    }
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 281-287 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
281
('ExtendedPatronAttributes','1',NULL,'Use extended patron IDs and attributes','YesNo'),
281
('ExtendedPatronAttributes','1',NULL,'Use extended patron IDs and attributes','YesNo'),
282
('FacetLabelTruncationLength','20',NULL,'Specify the facet max length in OPAC','Integer'),
282
('FacetLabelTruncationLength','20',NULL,'Specify the facet max length in OPAC','Integer'),
283
('FacetMaxCount','20',NULL,'Specify the max facet count for each category','Integer'),
283
('FacetMaxCount','20',NULL,'Specify the max facet count for each category','Integer'),
284
('FacetOrder','Alphabetical','Alphabetical|Usage','Specify the order of facets within each category','Choice'),
284
('FacetOrder','Alphabetical','Alphabetical|Usage|Stringwise','Specify the order of facets within each category','Choice'),
285
('FacetSortingLocale','default','','Choose the locale for sorting facet names when FacetOrder is set to Alphabetical. This enables proper Unicode-aware sorting of accented characters and locale-specific alphabetical ordering.','Choice'),
285
('FacetSortingLocale','default','','Choose the locale for sorting facet names when FacetOrder is set to Alphabetical. This enables proper Unicode-aware sorting of accented characters and locale-specific alphabetical ordering.','Choice'),
286
('FailedLoginAttempts','','','Number of login attempts before lockout the patron account','Integer'),
286
('FailedLoginAttempts','','','Number of login attempts before lockout the patron account','Integer'),
287
('FallbackToSMSIfNoEmail', 0, 'Enable|Disable', 'Send messages by SMS if no patron email is defined', 'YesNo'),
287
('FallbackToSMSIfNoEmail', 0, 'Enable|Disable', 'Send messages by SMS if no patron email is defined', 'YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref (-3 / +3 lines)
Lines 301-310 Searching: Link Here
301
            - pref: FacetOrder
301
            - pref: FacetOrder
302
              type: choice
302
              type: choice
303
              choices:
303
              choices:
304
                  Alphabetical: "alphabetically"
304
                  Alphabetical: "alphabetically using locale"
305
                  Usage: "by usage count"
305
                  Usage: "by usage count"
306
                  Stringwise: "simple alphabetical"
306
              default: Alphabetical
307
              default: Alphabetical
307
            - for each category.
308
            - for each category. Locale can be set using the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=FacetSortingLocale">FacetSortingLocale</a> preference. 
308
        -
309
        -
309
            - By default, show
310
            - By default, show
310
            - pref: OPACnumSearchResults
311
            - pref: OPACnumSearchResults
311
- 

Return to bug 41287