Skip to content

Commit

Permalink
fix: Fix display of RFCs in search_result_row.html
Browse files Browse the repository at this point in the history
n.b., dropped the "(was draft...)" suffix for now - need to revive
that or commit to removing it.
  • Loading branch information
jennifer-richards committed Jul 11, 2023
1 parent e42ac40 commit 7d5b176
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ietf/templates/doc/search/search_result_row.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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 %}
Expand All @@ -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 %}
Expand Down

0 comments on commit 7d5b176

Please sign in to comment.