From 60db718dbbe847ac1f9bd0ddfc84436dd91b633d Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 9 Aug 2022 14:31:05 +0000 Subject: [PATCH] Bug 31331: Add data-order attribute for better sorting of dates To test: 1. I used the following suggestiondates: MariaDB [koha_kohadev]> select suggesteddate from suggestions; +---------------+ | suggesteddate | +---------------+ | 2022-01-03 | | 2022-08-09 | | 2022-02-22 | | 2021-01-21 | +---------------+ 2. Set the dateformat system preference to 'mm/dd/yyyy'. 3. Try sorting the suggestion table by date, ascending and descending, it is not right. 4. Apply patch 5. Try sorting by date again, ascending and descending, it should now sort correctly. Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt index 9cfd86c2f1..576178db7d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -409,7 +409,7 @@ [% IF ( suggestion.itemtype ) %] - [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestion.itemtype, 1 ) | html %][% END %]

- + [% IF ( suggestion.suggesteddate ) %][% suggestion.suggesteddate |$KohaDates %][% END %] -- 2.20.1