Replaced some cases of using person.plain_name when linking to a person's profile with person.name, as plain_name can fail.

- Legacy-Id: 15427
This commit is contained in:
Henrik Levkowetz 2018-08-12 20:55:05 +00:00
parent b2bfc7858a
commit e060cae5df
4 changed files with 6 additions and 4 deletions

View file

@ -28,7 +28,7 @@
{% for person_with_groups in person_groups %}
<li>
<div class="well photo-thumbnail">
<a href="{% url 'ietf.person.views.profile' email_or_name=person_with_groups.grouper.plain_name %}">
<a href="{% url 'ietf.person.views.profile' email_or_name=person_with_groups.grouper.name %}">
<div>
{% if person_with_groups.grouper.photo_thumb %}
<img width=100 src="{{person_with_groups.grouper.photo_thumb.url}}" alt="Photo of {{person_with_groups.grouper.name}}"/>

View file

@ -27,11 +27,13 @@
{% regroup role_name.list by person as person_groups %}
{% for person_with_groups in person_groups %}
<li>
<a href="{% url 'ietf.person.views.profile' email_or_name=person_with_groups.grouper.plain_name %}">
<a href="{% url 'ietf.person.views.profile' email_or_name=person_with_groups.grouper.name %}">
<div class="well photo-thumbnail">
<div>
{% if person_with_groups.grouper.photo_thumb %}
<img width=100 src="{{person_with_groups.grouper.photo_thumb.url}}" alt="Photo of {{person_with_groups.grouper.name}}" />
{% elif person_with_groups.grouper.photo %}
<img width=100 src="{{person_with_groups.grouper.photo.url}}" alt="Photo of {{person_with_groups.grouper.name}}" />
{% else %}
<img width=100 src="{{ MEDIA_URL }}photo/nopictureavailable.jpg" alt="No picture available"/>
{% endif %}

View file

@ -41,7 +41,7 @@
{% regroup letter.list by person as person_groups %}
{% for person_with_groups in person_groups %}
<li>
{% if person_with_groups.grouper.photo %}<a href="{% url 'ietf.person.views.profile' email_or_name=person_with_groups.grouper.plain_name %}">{% endif %}
{% if person_with_groups.grouper.photo %}<a href="{% url 'ietf.person.views.profile' email_or_name=person_with_groups.grouper.name %}">{% endif %}
<div class="well photo-thumbnail">
<div>
{% if person_with_groups.grouper.photo_thumb %}

View file

@ -26,7 +26,7 @@
{% for p in eligible_persons %}
<tr>
<td><a href="{% url 'ietf.person.views.profile' p.plain_name %}">{{p.last_name}}</a></td>
<td><a href="{% url 'ietf.person.views.profile' p.name %}">{{p.last_name}}</a></td>
<td>{{p.first_name}}</td>
<td>{% for e in p.email_set.all %}{{e.address}}{% if not forloop.last %}, {% endif %}{% endfor %}</td>
</tr>