From 7c7c043f32b5fae0b332e954a189e8516eed970a Mon Sep 17 00:00:00 2001 From: Denis Ah-Kang Date: Mon, 26 Aug 2024 18:02:45 +0400 Subject: [PATCH 1/2] for CRD, display the latest CRS of the specification --- .../components/listings/publications/tr_card.html.twig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/templates/components/listings/publications/tr_card.html.twig b/templates/components/listings/publications/tr_card.html.twig index 71754275..7aa72409 100644 --- a/templates/components/listings/publications/tr_card.html.twig +++ b/templates/components/listings/publications/tr_card.html.twig @@ -37,6 +37,15 @@ {% endif %} {% endblock translations %} + {% block crs %} + {% set cr = spec.specification.lastSpecVersionOfType('CR') %} + {% if spec.crd and cr %} +
+
Latest Candidate Recommendation Snapshot
+
{{ w3c_date_format(cr.date)|raw }}
+
+ {% endif %} + {% endblock crs %} {% block description %} {{ spec.specification.description|raw }} From 49b0675d29243dfbc68f65667a6b4626a9e84b31 Mon Sep 17 00:00:00 2001 From: Denis Ah-Kang <1696128+deniak@users.noreply.github.com> Date: Thu, 12 Sep 2024 14:27:10 +0400 Subject: [PATCH 2/2] Update templates/components/listings/publications/tr_card.html.twig Co-authored-by: Vivien Lacourba --- .../listings/publications/tr_card.html.twig | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/templates/components/listings/publications/tr_card.html.twig b/templates/components/listings/publications/tr_card.html.twig index 7aa72409..afea2927 100644 --- a/templates/components/listings/publications/tr_card.html.twig +++ b/templates/components/listings/publications/tr_card.html.twig @@ -38,12 +38,14 @@ {% endif %} {% endblock translations %} {% block crs %} - {% set cr = spec.specification.lastSpecVersionOfType('CR') %} - {% if spec.crd and cr %} -
-
Latest Candidate Recommendation Snapshot
-
{{ w3c_date_format(cr.date)|raw }}
-
+ {% if spec.crd %} + {% set cr = spec.specification.lastSpecVersionOfType('CR') %} %} + {% if cr %} +
+
Latest Candidate Recommendation Snapshot
+
{{ w3c_date_format(cr.date)|raw }}
+
+ {% endif %} {% endif %} {% endblock crs %}