Skip to content

Commit 087c543

Browse files
committed
Changed the links to profile pages to apply to both photo and name, for an easier click target. Added links to group names.
- Legacy-Id: 11296
1 parent 637c1a0 commit 087c543

3 files changed

Lines changed: 72 additions & 19 deletions

File tree

ietf/templates/group/all_photos.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,21 @@ <h1>{{ group_type | upper }} {{ role }} Photos</h1>
2828
{% for person_with_groups in person_groups %}
2929
<li>
3030
<div class="well photo-thumbnail">
31+
{% if person_with_groups.grouper.photo %}<a href="{% url 'ietf.person.views.profile' email_or_name=person_with_groups.grouper.plain_name %}">{% endif %}
3132
<div>
3233
{% if person_with_groups.grouper.photo_thumb %}
33-
<a href="{{person_with_groups.grouper.photo.url}}">
34-
<img width=100px src="{{person_with_groups.grouper.photo_thumb.url}}"/>
35-
</a>
34+
<img width=100 src="{{person_with_groups.grouper.photo_thumb.url}}" alt="Photo of {{person_with_groups.grouper.name}}"/>
3635
{% else %}
37-
<img width=100px src="{{ MEDIA_URL }}photos/nopictureavailable.jpg"/>
36+
<img width=100 src="{{ MEDIA_URL }}photos/nopictureavailable.jpg" alt="No picture available"/>
3837
{% endif %}
3938
</div>
4039
<div class="photo-name">
41-
{% if person_with_groups.grouper.photo %}
42-
<a href="{% url 'ietf.person.views.profile' email_or_name=person_with_groups.grouper.name %}"><strong>{{person_with_groups.grouper.plain_name}}</strong></a>
43-
{% else %}
4440
<strong>{{person_with_groups.grouper.plain_name}}</strong>
45-
{% endif %}
4641
</div>
42+
{% if person_with_groups.grouper.photo %}</a>{% endif %}
4743
<div class="photo-role-list">
4844
{% for role in person_with_groups.list %}
49-
{{role.group.acronym}}
45+
<a href="{% url 'ietf.group.views.group_home' acronym=role.group.acronym %}">{{role.group.acronym}}</a>
5046
{% endfor %}
5147
</div>
5248
</div>
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{% extends "group/group_base.html" %}
2+
{# Copyright The IETF Trust 2015, All Rights Reserved #}
3+
{% load origin staticfiles %}
4+
5+
{% block morecss %}
6+
.well { max-width: 150px;}
7+
{% endblock %}
8+
9+
{% block title %}{{ group }} ({{group.acronym}}) Photos{% endblock %}
10+
11+
{% block bodyAttrs %}data-spy="scroll" data-target="#affix"{% endblock %}
12+
13+
{% block group_content %}
14+
{% origin %}
15+
{% load ietf_filters %}
16+
17+
<h1>{{ group }} ({{group.acronym}}) Photos</h1>
18+
19+
{% regroup roles by name as role_groups %}
20+
<div class="col-md-10">
21+
{% for role_name in role_groups %}
22+
<div class="row anchor-target" id="{{role_name.grouper|urlencode}}">
23+
<div class="panel panel-default">
24+
<div class="panel-heading">{{role_name.grouper}}{{role_name.list|pluralize}}</div>
25+
<div class="panel-body">
26+
<ul class="list-inline">
27+
{% regroup role_name.list by person as person_groups %}
28+
{% for person_with_groups in person_groups %}
29+
<li>
30+
{% if person_with_groups.grouper.photo %}<a href="{% url 'ietf.person.views.profile' email_or_name=person_with_groups.grouper.plain_name %}">{% endif %}
31+
<div class="well photo-thumbnail">
32+
<div>
33+
{% if person_with_groups.grouper.photo_thumb %}
34+
<img width=100 src="{{person_with_groups.grouper.photo_thumb.url}}" alt="Photo of {{person_with_groups.grouper.name}}" />
35+
{% else %}
36+
<img width=100 src="{{ MEDIA_URL }}photos/nopictureavailable.jpg" alt="No picture available"/>
37+
{% endif %}
38+
</div>
39+
<div >
40+
<strong>{{person_with_groups.grouper.plain_name}}</strong>
41+
</div>
42+
</div>
43+
{% if person_with_groups.grouper.photo %}</a>{% endif %}
44+
</li>
45+
{% endfor %}
46+
</ul>
47+
</div>
48+
</div>
49+
</div>
50+
{% endfor %}
51+
</div>
52+
53+
<div class="col-md-1 hidden-print bs-docs-sidebar" id="affix">
54+
<ul class="nav nav-pills nav-stacked small fixed" data-spy="affix">
55+
{% for role_name in role_groups %}
56+
<li><a href="#{{role_name.grouper|urlencode}}">{{role_name.grouper}}</a></li>
57+
{% endfor %}
58+
</ul>
59+
</div>
60+
61+
{% endblock %}

ietf/templates/iesg/photos.html

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,25 @@ <h1>{{ group_type | upper }} {{ role }} Photos</h1>
3636
{% regroup letter.list by person as person_groups %}
3737
{% for person_with_groups in person_groups %}
3838
<li>
39+
{% if person_with_groups.grouper.photo %}<a href="{% url 'ietf.person.views.profile' email_or_name=person_with_groups.grouper.plain_name %}">{% endif %}
3940
<div class="well photo-thumbnail">
4041
<div>
4142
{% if person_with_groups.grouper.photo_thumb %}
42-
<a href="{{person_with_groups.grouper.photo.url}}">
43-
<img width=100px src="{{person_with_groups.grouper.photo_thumb.url}}"/>
44-
</a>
43+
<img width=100 src="{{person_with_groups.grouper.photo_thumb.url}}" alt="Photo of {{person_with_groups.grouper.name}}"/>
4544
{% else %}
46-
<img width=100px src="{{ MEDIA_URL }}photos/nopictureavailable.jpg"/>
45+
<img width=100 src="{{ MEDIA_URL }}photos/nopictureavailable.jpg" alt="No photo available"/>
4746
{% endif %}
4847
</div>
4948
<div class="photo-name">
50-
{% if person_with_groups.grouper.photo %}
51-
<a href="{% url 'ietf.person.views.profile' email_or_name=person_with_groups.grouper.name %}"><strong>{{person_with_groups.grouper.plain_name}}</strong></a>
52-
{% else %}
53-
<strong>{{person_with_groups.grouper.plain_name}}</strong>
54-
{% endif %}
49+
<strong>{{person_with_groups.grouper.plain_name}}</strong>
5550
</div>
5651
<div class="photo-role-list">
5752
{% for role in person_with_groups.list %}
58-
{{role.group.acronym}}
53+
<a href="{% url 'ietf.group.views.group_home' acronym=role.group.acronym %}">{{role.group.acronym}}</a>
5954
{% endfor %}
6055
</div>
6156
</div>
57+
{% if person_with_groups.grouper.photo %}</a>{% endif %}
6258
</li>
6359
{% endfor %}
6460
</ul>

0 commit comments

Comments
 (0)