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:
parent
e42ac40ec4
commit
7d5b1767f5
|
@ -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 }}&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 %}
|
||||
|
|
Loading…
Reference in a new issue