From e20bb4a200ea1927729429bff235370138a647d2 Mon Sep 17 00:00:00 2001 From: Allan Jude <allanjude@FreeBSD.org> Date: Fri, 29 Jan 2021 20:13:40 +0000 Subject: [PATCH] Remove the sort-by-date on the advisories/errata pages Use the existing order from the .toml files in data/security This resolves an issue where multiple advisories from the same date would be sorted in an "unnatural" order. Reported by: emaste Sponsored by: Klara Inc. --- website/themes/beastie/layouts/security/list.html | 6 +++--- website/themes/beastie/layouts/security/single.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/website/themes/beastie/layouts/security/list.html b/website/themes/beastie/layouts/security/list.html index 66dc5364d5..fab09a2323 100644 --- a/website/themes/beastie/layouts/security/list.html +++ b/website/themes/beastie/layouts/security/list.html @@ -12,7 +12,7 @@ <table> <thead> <tr> - <th>Data</th> + <th>Date</th> {{ if eq $.Params.security "notices" }} <th>Errata Notice name</th> {{ end }} @@ -24,7 +24,7 @@ <tbody> {{ if eq $.Params.security "notices" }} {{ with .Site.Data.security.errata }} - {{ range (sort .notices "date" "desc") }} + {{ range .notices }} <tr> <td class="txtdate">{{ .date }}</td> <td><a href="{{.Site.BaseURL | absLangURL }}security/advisories/{{ .name }}.asc">{{ .name }}</a></td> @@ -34,7 +34,7 @@ {{ end }} {{ if eq $.Params.security "advisories" }} {{ with .Site.Data.security.advisories }} - {{ range (sort .advisories "date" "desc") }} + {{ range .advisories }} <tr> <td class="txtdate">{{ .date }}</td> <td><a href="{{.Site.BaseURL | absLangURL }}security/advisories/{{ .name }}.asc">{{ .name }}</a></td> diff --git a/website/themes/beastie/layouts/security/single.html b/website/themes/beastie/layouts/security/single.html index 66dc5364d5..fab09a2323 100644 --- a/website/themes/beastie/layouts/security/single.html +++ b/website/themes/beastie/layouts/security/single.html @@ -12,7 +12,7 @@ <table> <thead> <tr> - <th>Data</th> + <th>Date</th> {{ if eq $.Params.security "notices" }} <th>Errata Notice name</th> {{ end }} @@ -24,7 +24,7 @@ <tbody> {{ if eq $.Params.security "notices" }} {{ with .Site.Data.security.errata }} - {{ range (sort .notices "date" "desc") }} + {{ range .notices }} <tr> <td class="txtdate">{{ .date }}</td> <td><a href="{{.Site.BaseURL | absLangURL }}security/advisories/{{ .name }}.asc">{{ .name }}</a></td> @@ -34,7 +34,7 @@ {{ end }} {{ if eq $.Params.security "advisories" }} {{ with .Site.Data.security.advisories }} - {{ range (sort .advisories "date" "desc") }} + {{ range .advisories }} <tr> <td class="txtdate">{{ .date }}</td> <td><a href="{{.Site.BaseURL | absLangURL }}security/advisories/{{ .name }}.asc">{{ .name }}</a></td>