Turn text names into links on the stats pages. Fixes #2854

- Legacy-Id: 17178
This commit is contained in:
Russ Housley 2020-01-03 21:50:24 +00:00
parent c13852df46
commit dd07878bb0
2 changed files with 6 additions and 2 deletions

View file

@ -1,4 +1,4 @@
# Copyright The IETF Trust 2011-2019, All Rights Reserved
# Copyright The IETF Trust 2011-2020, All Rights Reserved
# -*- coding: utf-8 -*-
@ -63,6 +63,10 @@ def name_parts(name):
# Handle reverse-order names with uppercase surname correctly
if re.search("^[A-Z-]+$", first):
first, last = last, first.capitalize()
# Handle exception for RFC Editor
if (prefix, first, middle, last, suffix) == ('', 'Editor', '', 'Rfc', ''):
first = 'RFC'
last = 'Editor'
return prefix, first, middle, last, suffix
def initials(name):

View file

@ -1,6 +1,6 @@
{% if content_limit and count <= content_limit %}
{% for n in names %}
{{ n }}<br>
<a href="{% url 'ietf.person.views.profile' email_or_name=n %}">{{ n }}</a><br>
{% endfor %}
{% else %}
{# <a class="popover-details" href="" data-elements="{% for n in names|slice:":20" %}{{ n }}{% if not forloop.last %}|{% endif %}{% endfor %}" data-sliced="{% if count > 20 %}1{% endif %}">{{ count }}</a> #}