feat: Sort RFCs on subseries views; fix page title (#6704)

* 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
This commit is contained in:
Jennifer Richards 2023-11-29 14:34:18 -04:00 committed by GitHub
parent b011f0ab32
commit b281919d4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View file

@ -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">
@ -26,4 +27,4 @@
Referenced by
</a>
</div>
{% endblock %}
{% endblock %}

View file

@ -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 %}

View file

@ -10,7 +10,7 @@
<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