Skip to content

Commit 0016c69

Browse files
committed
Added an index page for nomcoms, at /nomcom/, with links to nomcom pages and announcements, where they exist.
- Legacy-Id: 6245
1 parent c52efca commit 0016c69

4 files changed

Lines changed: 63 additions & 23 deletions

File tree

ietf/nomcom/views.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from ietf.dbtemplate.models import DBTemplate
2121
from ietf.dbtemplate.views import template_edit
2222
from ietf.name.models import NomineePositionState, FeedbackType
23+
from ietf.group.models import Group
2324

2425
from ietf.nomcom.decorators import nomcom_private_key_required
2526
from ietf.nomcom.forms import (NominateForm, FeedbackForm, QuestionnaireForm,
@@ -33,9 +34,33 @@
3334
HOME_TEMPLATE, NOMINEE_REMINDER_TEMPLATE)
3435
from ietf.ietfauth.utils import role_required
3536

37+
import debug
3638

3739
def index(request):
38-
nomcom_list = NomCom.objects.all()
40+
nomcom_list = Group.objects.filter(type__slug='nomcom').order_by('acronym')
41+
for nomcom in nomcom_list:
42+
year = nomcom.acronym[6:]
43+
debug.show('year')
44+
try:
45+
year = int(year)
46+
except ValueError:
47+
year = None
48+
debug.show('year')
49+
nomcom.year = year
50+
nomcom.label = "%s/%s" % (year, year+1)
51+
if year in [ 2005, 2006, 2007, 2008, 2009, 2010 ]:
52+
nomcom.url = "https://tools.ietf.org/group/nomcom/%02d" % (year % 100)
53+
elif year in [ 2011, 2012 ]:
54+
nomcom.url = "https://www.ietf.org/nomcom/%04d" % year
55+
elif year > 2012:
56+
nomcom.url = "/nomcom/%04d" % year
57+
else:
58+
nomcom.url = None
59+
if year >= 2002:
60+
nomcom.ann_url = "/ann/nomcom/#%4d" % year
61+
else:
62+
nomcom.ann_url = None
63+
debug.show('nomcom.url')
3964
return render_to_response('nomcom/index.html',
4065
{'nomcom_list': nomcom_list,}, RequestContext(request))
4166

ietf/templates/announcements/nomcomREDESIGN.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h3>Current Committee Chair: <a href="mailto:{{ curr_chair.email.address }}">{{
99

1010
{% for regime in regimes %}
1111
<hr>
12-
<h1>Messages from {{ regime.group.start_year }} - {{ regime.group.end_year }}</h1>
12+
<h1 id="{{regime.group.start_year}}">Messages from {{ regime.group.start_year }} - {{ regime.group.end_year }}</h1>
1313

1414
{# use person email address here rather than the generic nomcom-chair@ietf.org #}
1515
<h4>Committee Chair: <a href="mailto:{{ regime.chair.person.email_address }}">{{ regime.chair.person.plain_name }}</a></h4>
@@ -33,7 +33,7 @@ <h4>Committee Chair: <a href="mailto:{{ regime.chair.person.email_address }}">{{
3333

3434
{# somebody ought to import these announcements in the DB instead of this mess #}
3535

36-
<h3>Messages from 2003-2004 NomCom</h3>
36+
<h3 id="2003">Messages from 2003-2004 NomCom</h3>
3737
Committee Chair: <A HREF="mailto:richdr@microsoft.com">Rich Draves</A>
3838
<br><br><li><a href="http://www.ietf.org/old/2009/nomcom/msg08-25-2003.txt">IETF Nominations Committee Chair Announcement</a> August 25, 2003
3939
<LI><a href="http://www.ietf.org/old/2009/nomcom/msg09.22.txt">NomCom call for volunteers</a> September 22, 2003
@@ -51,7 +51,7 @@ <h3>Messages from 2003-2004 NomCom</h3>
5151
<LI><A HREF="http://www.ietf.org/old/2009/nomcom/msg09.28.txt">Call for Security AD nominations</a> September 28, 2004
5252
<LI><A HREF="http://www.ietf.org/old/2009/nomcom/msg11.07.04.txt">Steve Bellovin replacement</a> November 07, 2004
5353

54-
<h3>Messages from 2002-2003 NomCom</h3>
54+
<h3 id="2002">Messages from 2002-2003 NomCom</h3>
5555

5656
Committee Chair: <A HREF="mailto:PRoberts@MEGISTO.com">Phil Roberts</A>
5757
<br><br>

ietf/templates/nomcom/index.html

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
1-
{% extends "nomcom/nomcom_base.html" %}
1+
{# Copyright The IETF Trust 2009, All Rights Reserved #}
22

3-
{% load nomcom_tags %}
3+
{% extends "base.html" %}
4+
{% load ietf_filters %}
5+
{% block title %}IAB/IESG NomcOms{% endblock %}
46

5-
{% block content %}
6-
7-
<h1>Nomcom Pages</h1>
8-
9-
107

11-
<div class="ietf-navset">
12-
{% if selected == "index" %}<span class="selected">Home</span>{% else %}<a href="{% url nomcom_year_index year %}">Home</a>{% endif %} |
13-
{% if nomcom|has_publickey %}
14-
{% if selected == "nominate" %}<span class="selected">Nominate</span>{% else %}<a href="{% url nomcom_public_nominate year %}">Nominate</a>{% endif %} |
15-
{% if selected == "feedback" %}<span class="selected">Provide Comments</span>{% else %}<a href="{% url nomcom_public_feedback year %}">Provide Comments</a>{% endif %} |
16-
{% endif %}
17-
{% if selected == "requirements" %}<span class="selected">Requirements</span>{% else %}<a href="{% url nomcom_requirements year %}">Requirements</a>{% endif %} |
18-
{% if selected == "questionnaires" %}<span class="selected">Questionnaires</span>{% else %}<a href="{% url nomcom_questionnaires year %}">Questionnaires</a>{% endif %} |
19-
</div>
20-
21-
{% block nomcom_content %}
22-
{% endblock %}
8+
{% block content %}
9+
<h1>IAB/IESG NomComs</h1>
2310

11+
<div style="margin-left:2em;">
12+
<table class="ietf-doctable">
13+
<tr>
14+
<th>Year</th>
15+
<th>Chair</th>
16+
<th></th>
17+
<th></th>
18+
</tr>
19+
{% for nomcom in nomcom_list %}
20+
<tr>
21+
<td>{{ nomcom.label }}</td>
22+
<td >{% with nomcom.get_chair as role %}<a href="mailto:{{role.person.email_address}}">{{role.person}}</a>{% endwith %}</td>
23+
<td >
24+
{% if nomcom.ann_url %}
25+
<a href="{{ nomcom.ann_url }}">Announcements</a>
26+
{% endif %}
27+
</td>
28+
<td >
29+
{% if nomcom.url %}
30+
<a href="{{ nomcom.url }}">Pages</a>
31+
{% endif %}
32+
</td>
33+
</tr>
34+
{% endfor %}
35+
</table>
36+
</div>
2437
{% endblock %}

static/css/base2.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,11 @@ table.ietf-table { border-collapse:collapse; border:1px solid #7f7f7f; }
137137
.ietf-doctable th.status, .ietf-doctable td.status { min-width: 20em;}
138138
.ietf-doctable th.ipr { font-variant: small-caps; }
139139
.ietf-doctable th.ad, .ietf-doctable td.ad { white-space:nowrap; min-width: 6em; }
140+
.ietf-doctable td { padding-right: 0.5em; padding-left: 0.5em; }
140141
.ietf-doctable td.ballot { border-left: hidden; min-width: 37px; }
141142
.ietf-doctable td .updated-by { max-width: 20em; } /* some RFCs have really long lists */
142143

144+
143145
.ietf-doctable .status .milestone,
144146
.ietf-box .stream-state .milestone
145147
{ display: inline-block; font-size: smaller; background-color: #d5dde6; padding: 0 0.2em; margin-left: 0.3em; }

0 commit comments

Comments
 (0)