Refined the template used by the person-link template tag to do better for document authors without an email address.

- Legacy-Id: 18613
This commit is contained in:
Henrik Levkowetz 2020-10-12 17:02:07 +00:00
parent c296b0b594
commit e815b87750

View file

@ -1,7 +1,15 @@
{# Copyright The IETF Trust 2020, All Rights Reserved #}{% spaceless %}
{% if email %}
<a {% if title %}title="{{ title }}"{% endif %} href="{% url 'ietf.person.views.profile' email_or_name=email %}">
<span class="{{class}}">{{ plain_name }}</span>
</a>&nbsp;<a href="mailto:{{ email|urlencode }}">
<span class="fa fa-envelope-o tiny"></span>
</a>
{% elif name %}
<a {% if title %}title="{{ title }}"{% endif %} href="{% url 'ietf.person.views.profile' email_or_name=name %}">
<span class="{{class}}">{{ plain_name }}</span>
</a>
{% else %}
<span class="{{class}}">{{ plain_name }}</span>
{% endif %}
{% endspaceless %}