Skip to content

Commit 5159349

Browse files
committed
Added an IESG photo page. Replaced navigation pills with a navtab on the IESG pages.
- Legacy-Id: 11277
1 parent e4e2ced commit 5159349

6 files changed

Lines changed: 111 additions & 9 deletions

File tree

ietf/iesg/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@
5353
(r'^agenda/telechat-(?:(?P<date>\d{4}-\d{2}-\d{2})-)?docs.tgz', "ietf.iesg.views.telechat_docs_tarfile"),
5454
(r'^discusses/$', "ietf.iesg.views.discusses"),
5555
(r'^milestones/$', "ietf.iesg.views.milestones_needing_review"),
56+
(r'^photos/$', "ietf.iesg.views.photos"),
5657
)

ietf/iesg/views.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
from ietf.doc.models import Document, TelechatDocEvent, LastCallDocEvent, ConsensusDocEvent, DocEvent, IESG_BALLOT_ACTIVE_STATES
5656
from ietf.doc.utils import update_telechat, augment_events_with_revision
57-
from ietf.group.models import GroupMilestone
57+
from ietf.group.models import GroupMilestone, Role
5858
from ietf.iesg.agenda import agenda_data, agenda_sections, fill_in_agenda_docs, get_agenda_date
5959
from ietf.iesg.models import TelechatDate
6060
from ietf.iesg.utils import telechat_page_count
@@ -474,3 +474,10 @@ def milestones_needing_review(request):
474474
),
475475
context_instance=RequestContext(request))
476476

477+
def photos(request):
478+
roles = sorted(Role.objects.filter(group__type='area', group__state='active', name_id='ad'),key=lambda x: "" if x.group.acronym=="gen" else x.group.acronym)
479+
for role in roles:
480+
role.last_initial = role.person.last_name()[0]
481+
return render(request, 'iesg/photos.html', {'group_type': 'IESG', 'role': '', 'roles': roles })
482+
483+

ietf/templates/iesg/agenda.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020

2121
{% block content %}
2222
{% origin %}
23-
<div class="row">
24-
<div class="col-md-10">
2523

2624
<h1>IESG agenda: {{ date }} </h1>
2725

28-
<p class="buttonlist">
29-
<a class="btn btn-default" role="button" href="/iesg/agenda/documents/">Documents on future agendas</a>
30-
<a class="btn btn-default" role="button" href="/iesg/discusses/">DISCUSS positions</a>
31-
</p>
26+
<ul class="nav nav-tabs" role="tablist">
27+
<li class="active"><a href="/iesg/agenda/">IESG Agenda</a></li>
28+
<li class=" "><a href="/iesg/agenda/documents/">Documents on future agendas</a></li>
29+
<li class=" "><a href="/iesg/discusses/">DISCUSS positions</a></li>
30+
<li class=" "><a href="{% url "ietf.iesg.views.photos" %}">IESG Photos</a></li>
31+
</ul>
3232

3333
{% for num, section in sections %}
3434

@@ -130,6 +130,4 @@ <h1>IESG agenda: {{ date }} </h1>
130130
{% endif %}
131131
{% endfor %}
132132
</ul>
133-
</div>
134-
</div>
135133
{% endblock content %}

ietf/templates/iesg/agenda_documents.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222
{% origin %}
2323
<h1>Documents on future IESG telechat agendas</h1>
2424

25+
<ul class="nav nav-tabs" role="tablist">
26+
<li class=" "><a href="/iesg/agenda/">IESG Agenda</a></li>
27+
<li class="active"><a href="/iesg/agenda/documents/">Documents on future agendas</a></li>
28+
<li class=" "><a href="/iesg/discusses/">DISCUSS positions</a></li>
29+
<li class=" "><a href="{% url "ietf.iesg.views.photos" %}">IESG Photos</a></li>
30+
</ul>
31+
32+
33+
2534
{% if user|has_role:"Secretariat" %}
2635
<form class="form-inline" method="post">
2736
{% csrf_token %}

ietf/templates/iesg/discusses.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
{% origin %}
1616
<h1>IESG discuss positions</h1>
1717

18+
<ul class="nav nav-tabs" role="tablist">
19+
<li class=" "><a href="/iesg/agenda/">IESG Agenda</a></li>
20+
<li class=" "><a href="/iesg/agenda/documents/">Documents on future agendas</a></li>
21+
<li class="active"><a href="/iesg/discusses/">DISCUSS positions</a></li>
22+
<li class=" "><a href="{% url "ietf.iesg.views.photos" %}">IESG Photos</a></li>
23+
</ul>
24+
25+
26+
1827
{% if user|has_role:"Area Director" %}
1928
<p class="btn-group" data-toggle="buttons">
2029
<label class="btn btn-default active discuss">

ietf/templates/iesg/photos.html

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{% extends "base.html" %}
2+
{# Copyright The IETF Trust 2015, All Rights Reserved #}
3+
{% load origin staticfiles %}
4+
{% load ietf_filters %}
5+
6+
{% block morecss %}
7+
.well { max-width: 150px;}
8+
.nav-tabs { position: relative; z-index: 100; }
9+
.anchor-target { position: relative; z-index: 0; }
10+
{% endblock %}
11+
12+
{% block title %}{{ group_type | upper }} {{ role }} Photos{% endblock %}
13+
14+
{% block bodyAttrs %}data-spy="scroll" data-target="#affix"{% endblock %}
15+
16+
{% block content %}
17+
{% origin %}
18+
19+
<h1>{{ group_type | upper }} {{ role }} Photos</h1>
20+
21+
<ul class="nav nav-tabs" role="tablist">
22+
<li ><a href="/iesg/agenda/documents/">IESG Agenda</a></li>
23+
<li ><a href="/iesg/agenda/documents/">Documents on future agendas</a></li>
24+
<li ><a href="/iesg/discusses/">DISCUSS positions</a></li>
25+
<li class="active"><a href="{% url "ietf.iesg.views.photos" %}">IESG Photos</a></li>
26+
</ul>
27+
28+
{% regroup roles by group.acronym as alphabet_blocks %}
29+
<div class="col-md-11" >
30+
{% for letter in alphabet_blocks %}
31+
<div class="row anchor-target" id="{{letter.grouper}}">
32+
<div class="panel panel-default">
33+
<div class="panel-heading">{{letter.grouper}}</div>
34+
<div class="panel-body">
35+
<ul class="list-inline">
36+
{% regroup letter.list by person as person_groups %}
37+
{% for person_with_groups in person_groups %}
38+
<li>
39+
<div class="well photo-thumbnail">
40+
<div>
41+
{% 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>
45+
{% else %}
46+
<img width=100px src="{{ MEDIA_URL }}photos/nopictureavailable.jpg"/>
47+
{% endif %}
48+
</div>
49+
<div class="photo-name">
50+
{% if person_with_groups.grouper.photo %}
51+
<a href="{{person_with_groups.grouper.photo.url}}"><strong>{{person_with_groups.grouper.plain_name}}</strong></a>
52+
{% else %}
53+
<strong>{{person_with_groups.grouper.plain_name}}</strong>
54+
{% endif %}
55+
</div>
56+
<div class="photo-role-list">
57+
{% for role in person_with_groups.list %}
58+
{{role.group.acronym}}
59+
{% endfor %}
60+
</div>
61+
</div>
62+
</li>
63+
{% endfor %}
64+
</ul>
65+
</div>
66+
</div>
67+
</div>
68+
{% endfor %}
69+
</div>
70+
71+
<div class="col-md-1 hidden-print bs-docs-sidebar" id="affix">
72+
<ul class="nav nav-pills nav-stacked small fixed" data-spy="affix">
73+
{% for letter in alphabet_blocks %}
74+
<li><a href="#{{letter.grouper}}">{{letter.grouper}}</a></li>
75+
{% endfor %}
76+
</ul>
77+
</div>
78+
{% endblock %}

0 commit comments

Comments
 (0)