From 7d5b1767f566b6ec00f4ceb6686ecf7001e933cc Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Tue, 11 Jul 2023 16:35:25 -0300 Subject: [PATCH] fix: Fix display of RFCs in search_result_row.html n.b., dropped the "(was draft...)" suffix for now - need to revive that or commit to removing it. --- ietf/templates/doc/search/search_result_row.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ietf/templates/doc/search/search_result_row.html b/ietf/templates/doc/search/search_result_row.html index d47dd4389c..422ef4b0a9 100644 --- a/ietf/templates/doc/search/search_result_row.html +++ b/ietf/templates/doc/search/search_result_row.html @@ -49,13 +49,13 @@ {% if doc.pages %}{{ doc.pages }} page{{ doc.pages|pluralize }}{% endif %}
- {% if doc.get_state_slug == "rfc" %} + {% if doc.type_id == "rfc" %} RFC {{ doc.rfc_number }} {% else %} {{ doc.name }}-{{ doc.rev }} {% endif %} - {% if doc.get_state_slug == "rfc" and "draft" in doc.name %}(was {{ doc.name }}){% endif %} +{# {% if doc.type_id == "rfc" and "draft" in doc.name %}(was {{ doc.name }}){% endif %} TODO drop this or look up the corresponding draft name#}
{% comment %}
@@ -106,19 +106,19 @@ {% endif %} - {% if doc.latest_revision_date|timesince_days|new_enough:request and doc.get_state_slug != "rfc" %} + {% if doc.latest_revision_date|timesince_days|new_enough:request and doc.type_id != "rfc" %} {% if doc.rev != "00" %} {% elif doc.replaces %} {% endif %} {% endif %} - {% if doc.get_state_slug == "rfc" %} + {% if doc.type_id == "rfc" %} {{ doc.latest_revision_date|date:"Y-m" }} {% else %} {{ doc.latest_revision_date|date:"Y-m-d" }} {% endif %} - {% if doc.latest_revision_date|timesince_days|new_enough:request and doc.get_state_slug != "rfc" %} + {% if doc.latest_revision_date|timesince_days|new_enough:request and doc.type_id != "rfc" %} {% if doc.rev != "00" or doc.replaces %}{% endif %} {% endif %} {% if doc.latest_revision_date|timesince_days|new_enough:request %} @@ -127,7 +127,7 @@ New
{% endif %} - {% if doc.get_state_slug == "active" and doc.expirable and doc.expires|timesince_days|expires_soon:request %} + {% if doc.type_id == "draft" and doc.get_state_slug == "active" and doc.expirable and doc.expires|timesince_days|expires_soon:request %}
Expires soon {% endif %}