Skip to content

Commit 4d8dd3e

Browse files
committed
Format rfc123 -> RFC 123 on references pages
- Legacy-Id: 12867
1 parent d5e98c9 commit 4d8dd3e

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

ietf/doc/templatetags/ietf_filters.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ def rfcnospace(string):
191191
else:
192192
return string
193193

194+
@register.filter
195+
def prettystdname(string):
196+
from ietf.doc.utils import prettify_std_name
197+
return prettify_std_name(unicode(string or ""))
198+
194199
@register.filter(name='rfcurl')
195200
def rfclink(string):
196201
"""

ietf/templates/doc/document_referenced_by.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends "base.html" %}
22
{# Copyright The IETF Trust 2015, All Rights Reserved #}
3-
{% load origin staticfiles %}
3+
{% load origin staticfiles ietf_filters %}
44

55
{% block pagehead %}
66
<link rel="stylesheet" href="{% static "jquery.tablesorter/css/theme.bootstrap.min.css" %}">
@@ -44,7 +44,7 @@ <h1>References to {{alias_name}}</h1>
4444
{% with ref.source.canonical_name as name %}
4545
<tr>
4646
<td>
47-
<a href="{% url 'doc_view' name=name %}">{{name}}</a>
47+
<a href="{% url 'doc_view' name=name %}">{{name|prettystdname}}</a>
4848
{% if ref.target.name != alias_name %}
4949
<br><span class="label label-info">As {{ref.target.name}}</span>
5050
{% endif %}
@@ -72,4 +72,4 @@ <h1>References to {{alias_name}}</h1>
7272

7373
{% block js %}
7474
<script src="{% static "jquery.tablesorter/js/jquery.tablesorter.combined.min.js" %}"></script>
75-
{% endblock %}
75+
{% endblock %}

ietf/templates/doc/document_references.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends "base.html" %}
22
{# Copyright The IETF Trust 2015, All Rights Reserved #}
3-
{% load origin staticfiles %}
3+
{% load origin staticfiles ietf_filters %}
44

55
{% block pagehead %}
66
<link rel="stylesheet" href="{% static "jquery.tablesorter/css/theme.bootstrap.min.css" %}">
@@ -35,7 +35,7 @@ <h1>References from {{doc.canonical_name}}</h1>
3535
{% for ref in refs %}
3636
{% with ref.target.name as name %}
3737
<tr>
38-
<td><a href="{% url 'doc_view' name=name %}">{{name}}</a></td>
38+
<td><a href="{% url 'doc_view' name=name %}">{{name|prettystdname}}</a></td>
3939
<td>
4040
<b>{{ref.target.document.title}}</b><br>
4141
<a class="btn btn-default btn-xs" href="{% url 'doc_references' name %}">Refs</a>
@@ -59,4 +59,4 @@ <h1>References from {{doc.canonical_name}}</h1>
5959

6060
{% block js %}
6161
<script src="{% static "jquery.tablesorter/js/jquery.tablesorter.combined.min.js" %}"></script>
62-
{% endblock %}
62+
{% endblock %}

0 commit comments

Comments
 (0)