From fb1942a5386873eb48402fd274cc29c5877bf377 Mon Sep 17 00:00:00 2001 From: Matthew Holloway Date: Fri, 2 Aug 2024 07:25:03 +1200 Subject: [PATCH] fix: Sort RFCs by date (#7766) * fix: Sort RFCs by date * fix: concluded wgs and bofs date sort #7350 --- ietf/static/js/list.js | 6 ++++-- ietf/templates/group/concluded_groups.html | 8 ++++---- ietf/templates/person/profile.html | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ietf/static/js/list.js b/ietf/static/js/list.js index d7e9dc944b..c16111ba63 100644 --- a/ietf/static/js/list.js +++ b/ietf/static/js/list.js @@ -5,8 +5,10 @@ import { function text_sort(a, b, options) { function prep(e, options) { - return $($.parseHTML(e.values()[options.valueName])) - .text() + const el = $($.parseHTML(e.values()[options.valueName])); + const cell_el = e.elm.querySelector(`.${options.valueName}`) + const sort_by_number = cell_el?.getAttribute('data-sort-number') + return sort_by_number ?? el.text() .trim() .replaceAll(/\s+/g, ' '); } diff --git a/ietf/templates/group/concluded_groups.html b/ietf/templates/group/concluded_groups.html index c748c2061b..725e8bd3cc 100644 --- a/ietf/templates/group/concluded_groups.html +++ b/ietf/templates/group/concluded_groups.html @@ -40,8 +40,8 @@

{{ label }}

Group Name - Start - Concluded + Start + Concluded @@ -51,8 +51,8 @@

{{ label }}

{{ g.acronym }} {{ g.name }} - {{ g.start_date|date:"Y-m" }} - {{ g.conclude_date|date:"Y-m" }} + {{ g.start_date|date:"Y-m" }} + {{ g.conclude_date|date:"Y-m" }} {% endfor %} diff --git a/ietf/templates/person/profile.html b/ietf/templates/person/profile.html index 42e5d2e43a..1424f037a1 100644 --- a/ietf/templates/person/profile.html +++ b/ietf/templates/person/profile.html @@ -106,7 +106,7 @@

RFC {{ doc.rfc_number }} - {{ doc.pub_date|date:"b Y"|title }} + {{ doc.pub_date|date:"b Y"|title }} {{ doc.title|urlize_ietf_docs }} {% with doc.referenced_by_rfcs_as_rfc_or_draft.count as refbycount %}