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.
This commit is contained in:
Jennifer Richards 2023-07-11 16:35:25 -03:00
parent e42ac40ec4
commit 7d5b1767f5
No known key found for this signature in database
GPG key ID: 9B2BF5C5ADDA6A6E

View file

@ -49,13 +49,13 @@
{% if doc.pages %}<small class="float-end text-muted d-none d-sm-block">{{ doc.pages }} page{{ doc.pages|pluralize }}</small>{% endif %}
<div>
<a href="{{ doc.get_absolute_url }}">
{% if doc.get_state_slug == "rfc" %}
{% if doc.type_id == "rfc" %}
RFC {{ doc.rfc_number }}
{% else %}
{{ doc.name }}-{{ doc.rev }}
{% endif %}
</a>
{% if doc.get_state_slug == "rfc" and "draft" in doc.name %}<i class="text-muted">(was {{ doc.name }})</i>{% endif %}
{# {% if doc.type_id == "rfc" and "draft" in doc.name %}<i class="text-muted">(was {{ doc.name }})</i>{% endif %} TODO drop this or look up the corresponding draft name#}
<br>
{% comment %}
<div class="float-end">
@ -106,19 +106,19 @@
{% endif %}
</td>
<td>
{% 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" %}
<a href="{{ rfcdiff_base_url }}?url2={{ doc.name }}-{{ doc.rev }}">
{% elif doc.replaces %}
<a href="{{ rfcdiff_base_url }}?url1={{ doc.replaces_canonical_name }}&amp;url2={{ doc.name }}-{{ doc.rev }}">
{% 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 %}</a>{% endif %}
{% endif %}
{% if doc.latest_revision_date|timesince_days|new_enough:request %}
@ -127,7 +127,7 @@
<span class="badge rounded-pill bg-success">New</span>
</div>
{% 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 %}
<br>
<span class="badge rounded-pill bg-warning">Expires soon</span>
{% endif %}