Skip to content

Commit 511e500

Browse files
committed
Show default no-photo-available image on bio if no photo is available.
- Legacy-Id: 11298
1 parent fcd8f55 commit 511e500

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

ietf/templates/person/profile.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@
88
{% block content %}
99

1010
{% origin %}
11-
<h1>{{ person }}</h1>
11+
<h1>{{ person.name }}</h1>
1212

1313
<div class="bio-text">
14-
<img class="bio-photo" src="{{ person.photo.url }}" alt="Photo of {{ person }}" />
14+
{% if person.photo %}
15+
<a href="{{person.photo.url}}">
16+
<img class="bio-photo" src="{{ person.photo.url }}" alt="Photo of {{ person }}" />
17+
</a>
18+
{% else %}
19+
<img class="bio-photo" src="{{ MEDIA_URL }}photos/nopictureavailable.jpg" alt="No photo available"/>
20+
{% endif %}
1521
{{ person.biography | apply_markup:"restructuredtext" }}
1622
</div>
1723

0 commit comments

Comments
 (0)