Skip to content

Commit

Permalink
feat: Sort RFCs on subseries views; fix page title (#6704)
Browse files Browse the repository at this point in the history
* feat: Sort RFCs on subseries doc pages

* feat: Sort RFCs on subseries index pages

* fix: Show subseries doc name as page title

* refactor: Use prettystdname filter for consistency
  • Loading branch information
jennifer-richards authored Nov 29, 2023
1 parent b011f0a commit b281919
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions ietf/templates/doc/document_subseries.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
{# Copyright The IETF Trust 2023, All Rights Reserved #}
{% load origin %}
{% load static %}
{% block title %}{{doc.type.name}}s{% endblock %}
{% load ietf_filters %}
{% block title %}{{ doc.name|prettystdname }}{% endblock %}
{% block content %}
{% origin %}
{{ top|safe }}
<h2>{{ doc.name|slice:":3"|upper }} {{ doc.name|slice:"3:"}} {% if doc.contains %}consists of:{% else %}currently contains no RFCs{% endif %}</h2>
{% for rfc in doc.contains %}
<h2>{{ doc.name|prettystdname }} {% if doc.contains %}consists of:{% else %}currently contains no RFCs{% endif %}</h2>
{% for rfc in doc.contains|dictsort:"rfc_number" %}
<p><a href="{% url 'ietf.doc.views_doc.document_main' name=rfc.name %}">RFC {{rfc.name|slice:"3:"}}</a> : {{rfc.title}}</p>
{% endfor %}
<div class="buttonlist">
Expand All @@ -26,4 +27,4 @@ <h2>{{ doc.name|slice:":3"|upper }} {{ doc.name|slice:"3:"}} {% if doc.contains
Referenced by
</a>
</div>
{% endblock %}
{% endblock %}
2 changes: 1 addition & 1 deletion ietf/templates/doc/document_subseries_top.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% origin %}
{% load ietf_filters %}
<h1>
{{ doc.name|slice:":3"|upper }} {{ doc.name|slice:"3:"}}
{{ doc.name|prettystdname }}
</h1>
<ul class="nav nav-tabs my-3">
{% for name, t, url, active, tooltip in tabs %}
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/index_subseries.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h1>{{type.name}}s</h1>
<div class="card mb-3" id="{{doc.name}}">
<div class="card-header"><a href="{% url 'ietf.doc.views_doc.document_main' name=doc.name %}">{{doc.name|prettystdname}}</a></div>
<div class="card-body">
{% for rfc in doc.contains %}
{% for rfc in doc.contains|dictsort:"rfc_number" %}
<p><a href="{% url 'ietf.doc.views_doc.document_main' name=rfc.name %}">{{rfc.name|prettystdname}}</a> : {{rfc.title}}</p>
{% empty %}
<p>{{doc.name|prettystdname}} currently contains no RFCs
Expand Down

0 comments on commit b281919

Please sign in to comment.