git: e20bb4a200 - main - Remove the sort-by-date on the advisories/errata pages

Allan Jude <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by allanjude:

URL: https://cgit.FreeBSD.org/doc/commit/?id=e20bb4a200ea1927729429bff235370138a647d2

commit e20bb4a200ea1927729429bff235370138a647d2
Author:     Allan Jude <[email protected]>
AuthorDate: 2021-01-29 20:13:40 +0000
Commit:     Allan Jude <[email protected]>
CommitDate: 2021-01-29 20:13:40 +0000

    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>
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-doc-all
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.