Skip to content

Commit 3e6a099

Browse files
committed
Refactored/cleaned IESG telechat agenda code (and removed support for ballot sets)
- Legacy-Id: 1873
1 parent 59c2b8f commit 3e6a099

10 files changed

Lines changed: 348 additions & 306 deletions

File tree

ietf/idtracker/templatetags/ietf_filters.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,16 @@ def id_index_wrap(text):
294294
x = x.replace("\n", "\n ")
295295
return " "+x.strip()
296296

297+
@register.filter(name="compress_empty_lines")
298+
def compress_empty_lines(text):
299+
text = re.sub("( *\n){3,}", "\n\n", text)
300+
return text
301+
302+
@register.filter(name="remove_empty_lines")
303+
def remove_empty_lines(text):
304+
text = re.sub("( *\n){2,}", "\n", text)
305+
return text
306+
297307
@register.filter(name='greater_than')
298308
def greater_than(x, y):
299309
return x > int(y)
@@ -306,6 +316,10 @@ def less_than(x, y):
306316
def equal(x, y):
307317
return str(x)==str(y)
308318

319+
@register.filter(name='startswith')
320+
def startswith(x, y):
321+
return unicode(x).startswith(y)
322+
309323
# based on http://www.djangosnippets.org/snippets/847/ by 'whiteinge'
310324
@register.filter
311325
def in_group(user, groups):

ietf/iesg/urls.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright The IETF Trust 2007, All Rights Reserved
22

3-
# Portion Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
3+
# Portion Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
44
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
55
#
66
# Redistribution and use in source and binary forms, with or without
@@ -48,16 +48,16 @@
4848
)
4949

5050
urlpatterns += patterns('',
51-
(r'^agenda/$', views.telechat_agenda),
52-
(r'^agenda/documents.txt$', views.telechat_agenda_documents_txt),
53-
(r'^agenda/documents/$', views.telechat_agenda_documents),
54-
(r'^agenda/scribe_template.html$', views.telechat_agenda_scribe_template),
55-
(r'^discusses/$', views.discusses),
5651
(r'^ann/ind/$',views.inddocs),
5752
(r'^ann/(?P<cat>[^/]+)/$',views.wgdocs),
53+
(r'^agenda/$', views.agenda),
54+
(r'^agenda/scribe_template.html$', views.agenda_scribe_template),
55+
(r'^agenda/documents.txt$', views.agenda_documents_txt),
56+
(r'^agenda/documents/$', views.agenda_documents),
57+
(r'^discusses/$', views.discusses),
5858
)
5959

6060
if settings.SERVER_MODE != 'production':
6161
urlpatterns += patterns('',
62-
(r'^agenda/(?P<date>\d{4}-\d\d-\d\d)/$', views.telechat_agenda),
62+
(r'^agenda/(?P<date>\d{4}-\d\d-\d\d)/$', views.agenda),
6363
)

ietf/iesg/views.py

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright The IETF Trust 2007, All Rights Reserved
22

3-
# Portion Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
3+
# Portion Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
44
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
55
#
66
# Redistribution and use in source and binary forms, with or without
@@ -124,13 +124,9 @@ def agenda_docs(date, next_agenda):
124124
section_key = "s"+get_doc_section(id)
125125
if section_key not in res:
126126
res[section_key] = []
127-
others = id.ballot_others()
128127
if id.note:
129128
id.note = str(id.note).replace("\240","&nbsp;")
130-
if len(others) > 0:
131-
res[section_key].append({'obj':id, 'ballot_set':[id]+list(others)})
132-
else:
133-
res[section_key].append({'obj':id})
129+
res[section_key].append({'obj':id})
134130
return res
135131

136132
def agenda_wg_actions(date):
@@ -149,7 +145,7 @@ def agenda_management_issues(date):
149145
matches = TelechatAgendaItem.objects.filter(type=3).order_by('id')
150146
return [o.title for o in matches]
151147

152-
def telechat_agenda(request, date=None):
148+
def _agenda_data(request, date=None):
153149
if not date:
154150
date = TelechatDates.objects.all()[0].date1
155151
next_agenda = True
@@ -161,17 +157,25 @@ def telechat_agenda(request, date=None):
161157
docs = agenda_docs(date, next_agenda)
162158
mgmt = agenda_management_issues(date)
163159
wgs = agenda_wg_actions(date)
164-
private = 'private' in request.REQUEST
165160
try:
166161
f = codecs.open(settings.IESG_TASK_FILE, 'r', 'utf-8', 'replace')
167162
action_items = f.read().strip()
168163
f.close()
169164
except IOError:
170165
action_items = "(Error reading task.txt)"
171-
return render_to_response('iesg/agenda.html', {'date':str(date), 'docs':docs,'mgmt':mgmt,'wgs':wgs, 'action_items':action_items,'private':private}, context_instance=RequestContext(request) )
172-
166+
return {'date':str(date), 'docs':docs,'mgmt':mgmt,'wgs':wgs, 'action_items':action_items}
167+
168+
def agenda(request, date=None):
169+
data = _agenda_data(request, date)
170+
data['private'] = 'private' in request.REQUEST
171+
return render_to_response("iesg/agenda.html", data, context_instance=RequestContext(request))
173172

174-
def telechat_agenda_documents_txt(request):
173+
def agenda_scribe_template(request):
174+
date = TelechatDates.objects.all()[0].date1
175+
docs = agenda_docs(date, True)
176+
return render_to_response('iesg/scribe_template.html', {'date':str(date), 'docs':docs}, context_instance=RequestContext(request) )
177+
178+
def agenda_documents_txt(request):
175179
dates = TelechatDates.objects.all()[0].dates()
176180
docs = []
177181
for date in dates:
@@ -180,6 +184,27 @@ def telechat_agenda_documents_txt(request):
180184
c = Context({'docs':docs})
181185
return HttpResponse(t.render(c), mimetype='text/plain')
182186

187+
def agenda_documents(request):
188+
dates = TelechatDates.objects.all()[0].dates()
189+
telechats = []
190+
for date in dates:
191+
matches = IDInternal.objects.filter(telechat_date=date,primary_flag=1,agenda=1)
192+
idmatches = matches.filter(rfc_flag=0).order_by('ballot')
193+
rfcmatches = matches.filter(rfc_flag=1).order_by('ballot')
194+
res = {}
195+
for id in list(idmatches)+list(rfcmatches):
196+
section_key = "s"+get_doc_section(id)
197+
if section_key not in res:
198+
res[section_key] = []
199+
if not id.rfc_flag:
200+
w = IdWrapper(draft=id)
201+
else:
202+
ri = RfcIndex.objects.get(rfc_number=id.draft_id)
203+
w = RfcWrapper(ri)
204+
res[section_key].append(w)
205+
telechats.append({'date':date, 'docs':res})
206+
return direct_to_template(request, 'iesg/agenda_documents.html', {'telechats':telechats})
207+
183208
def discusses(request):
184209
positions = Position.objects.filter(discuss=1)
185210
res = []
@@ -213,30 +238,3 @@ def discusses(request):
213238
pass
214239
return direct_to_template(request, 'iesg/discusses.html', {'docs':res})
215240

216-
def telechat_agenda_documents(request):
217-
dates = TelechatDates.objects.all()[0].dates()
218-
telechats = []
219-
for date in dates:
220-
matches = IDInternal.objects.filter(telechat_date=date,primary_flag=1,agenda=1)
221-
idmatches = matches.filter(rfc_flag=0).order_by('ballot')
222-
rfcmatches = matches.filter(rfc_flag=1).order_by('ballot')
223-
res = {}
224-
for id in list(idmatches)+list(rfcmatches):
225-
section_key = "s"+get_doc_section(id)
226-
if section_key not in res:
227-
res[section_key] = []
228-
if not id.rfc_flag:
229-
w = IdWrapper(draft=id)
230-
else:
231-
ri = RfcIndex.objects.get(rfc_number=id.draft_id)
232-
w = RfcWrapper(ri)
233-
res[section_key].append(w)
234-
telechats.append({'date':date, 'docs':res})
235-
return direct_to_template(request, 'iesg/agenda_documents.html', {'telechats':telechats})
236-
237-
def telechat_agenda_scribe_template(request):
238-
date = TelechatDates.objects.all()[0].date1
239-
docs = agenda_docs(date, True)
240-
return render_to_response('iesg/scribe_template.html', {'date':str(date), 'docs':docs}, context_instance=RequestContext(request) )
241-
242-

ietf/templates/iesg/agenda.html

Lines changed: 12 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% comment %}
2-
Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
2+
Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
33
All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
44

55
Redistribution and use in source and binary forms, with or without
@@ -42,10 +42,9 @@
4242
.agenda h3 { margin-left: 30px; }
4343
.agenda h4 { margin-left: 60px; margin-top: 0; margin-bottom: 0; }
4444
.agenda table { margin-left: 90px; margin-top:0em; margin-bottom: 1em;}
45-
.agenda #section2 p, #section3 p, #section4 p { margin-left:90px; margin-top: 0; margin-bottom:0; font-style:italic;}
45+
.agenda #section23 p, #section4 p { margin-left:90px; margin-top: 0; margin-bottom:0; font-style:italic;}
4646
.agenda #section1 pre { margin-left: 60px; }
4747
.agenda blockquote { margin-left: 30px; width: 70ex;}
48-
.agenda #section3 blockquote { margin-left: 60px; }
4948
</style>
5049

5150
<title>IESG Agenda</title>
@@ -65,162 +64,23 @@ <h3>1.1 {% if private %}<a href="https://www.ietf.org/iesg/internal/rollcall.txt
6564

6665
<h3>1.2 Bash the Agenda</h3>
6766

68-
<h3>1.3 Approval of the {% if private %}<a href="https://www.ietf.org/iesg/internal/minutes.txt">Minutes</a>{%else%}Minutes{%endif%} of the past telechat</h3>
67+
<h3>1.3 Approval of the {% if private %}<a href="https://www.ietf.org/iesg/internal/minutes.txt">Minutes</a>{%else%}Minutes{%endif%} of Past Telechats</h3>
6968
<h3>1.4 List of Remaining Action Items from Last Telechat</h3>
7069
<pre>
7170
{{ action_items }}
7271
</pre>
7372
</div>
7473

75-
<h2>2. Protocol Actions</h2>
76-
<div id="section2">
77-
78-
<blockquote>
79-
Reviews should focus on these questions: "Is this document a
80-
reasonable basis on which to build the salient part of the Internet
81-
infrastructure? If not, what changes would make it so?"
82-
</blockquote>
83-
84-
<h3>2.1 WG Submissions</h3>
85-
86-
<h4>2.1.1 New Item</h4>
87-
{% if not docs.s211 %}<p>NONE</p>{% endif %}
88-
{% for doc in docs.s211 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
89-
90-
<h4>2.1.2 Returning Item</h4>
91-
{% if not docs.s212 %}<p>NONE</p>{% endif %}
92-
{% for doc in docs.s212 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
93-
94-
{% if docs.s213 %}
95-
<h4>2.1.3 For Action</h4>
96-
{% for doc in docs.s213 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
97-
{% endif %}
98-
99-
<h3>2.2 Individual Submissions</h3>
100-
101-
<h4>2.2.1 New Item</h4>
102-
{% if not docs.s221 %}<p>NONE</p>{% endif %}
103-
{% for doc in docs.s221 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
104-
105-
<h4>2.2.2 Returning Item</h4>
106-
{% if not docs.s222 %}<p>NONE</p>{% endif %}
107-
{% for doc in docs.s222 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
108-
109-
{% if docs.s223 %}
110-
<h4>2.2.3 For Action</h4>
111-
{% for doc in docs.s223 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
112-
{% endif %}
113-
114-
</div> <!-- section2 -->
115-
116-
<h2>3. Document Actions</h2>
117-
<div id="section3">
118-
119-
<h3>3.1 WG Submissions</h3>
120-
121-
<blockquote>
122-
Reviews should focus on these questions: "Is this document a
123-
reasonable contribution to the area of Internet engineering
124-
which it covers? If not, what changes would make it so?"
125-
</blockquote>
126-
127-
<h4>3.1.1 New Item</h4>
128-
{% if not docs.s311 %}<p>NONE</p>{% endif %}
129-
{% for doc in docs.s311 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
130-
131-
<h4>3.1.2 Returning Item</h4>
132-
{% if not docs.s312 %}<p>NONE</p>{% endif %}
133-
{% for doc in docs.s312 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
134-
135-
{% if docs.s313 %}
136-
<h4>3.1.3 For Action</h4>
137-
{% for doc in docs.s313 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
138-
{% endif %}
139-
140-
<h3>3.2 Individual Submissions Via AD</h3>
141-
142-
<blockquote>
143-
Reviews should focus on these questions: "Is this document a
144-
reasonable contribution to the area of Internet engineering
145-
which it covers? If not, what changes would make it so?"
146-
</blockquote>
147-
148-
<h4>3.2.1 New Item</h4>
149-
{% if not docs.s321 %}<p>NONE</p>{% endif %}
150-
{% for doc in docs.s321 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
151-
152-
<h4>3.2.2 Returning Item</h4>
153-
{% if not docs.s322 %}<p>NONE</p>{% endif %}
154-
{% for doc in docs.s322 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
155-
156-
{% if docs.s323 %}
157-
<h4>3.2.3 For Action</h4>
158-
{% for doc in docs.s323 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
159-
{% endif %}
160-
161-
<h3>3.3 Independent Submissions Via RFC Editor</h3>
162-
163-
<blockquote>
164-
The IESG will use RFC 3932 responses: 1) The IESG has not
165-
found any conflict between this document and IETF work; 2) The
166-
IESG thinks that this work is related to IETF work done in WG
167-
&lt;X&gt;, but this does not prevent publishing; 3) The IESG thinks
168-
that publication is harmful to work in WG &lt;X&gt; and recommends
169-
not publishing at this time; 4) The IESG thinks that this
170-
document violates the IETF procedures for &lt;X&gt; and should
171-
therefore not be published without IETF review and IESG
172-
approval; 5) The IESG thinks that this document extends an
173-
IETF protocol in a way that requires IETF review and should
174-
therefore not be published without IETF review and IESG approval.<br />
175-
<br />
176-
The document shepherd must propose one of these responses in
177-
the Data Tracker note and supply complete text in the IESG
178-
Note portion of the write-up. The Area Director ballot positions
179-
indicate consensus with the response proposed by the
180-
document shepherd.<br />
181-
<br />
182-
Other matters may be recorded in comments, and the comments will
183-
be passed on to the RFC Editor as community review of the document.
184-
</blockquote>
185-
186-
<h4>3.3.1 New Item</h4>
187-
{% if not docs.s331 %}<p>NONE</p>{% endif %}
188-
{% for doc in docs.s331 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
189-
190-
<h4>3.3.2 Returning Item</h4>
191-
{% if not docs.s332 %}<p>NONE</p>{% endif %}
192-
{% for doc in docs.s332 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
193-
194-
{% if docs.s333 %}
195-
<h4>3.3.3 For Action</h4>
196-
{% for doc in docs.s333 %}{% include "iesg/agenda_doc.html" %}{%endfor%}
197-
{% endif %}
198-
199-
</div> <!-- section3 -->
200-
201-
<h2>4. Working Group Actions</h2>
202-
<div id="section4">
203-
204-
<h3>4.1 WG Creation</h3>
205-
206-
<h4>4.1.1 Proposed for IETF Review</h4>
207-
{% if not wgs.s411 %}<p>NONE</p>{% endif %}
208-
{% for wg in wgs.s411 %}{% include "iesg/agenda_wg.html" %}{%endfor%}
209-
210-
<h4>4.1.2 Proposed for Approval</h4>
211-
{% if not wgs.s412 %}<p>NONE</p>{% endif %}
212-
{% for wg in wgs.s412 %}{% include "iesg/agenda_wg.html" %}{%endfor%}
213-
214-
<h3>4.2 WG Rechartering</h3>
215-
216-
<h4>4.2.1 Under evaluation for IETF Review</h4>
217-
{% if not wgs.s421 %}<p>NONE</p>{% endif %}
218-
{% for wg in wgs.s421 %}{% include "iesg/agenda_wg.html" %}{%endfor%}
219-
220-
<h4>4.2.2 Proposed for Approval</h4>
221-
{% if not wgs.s422 %}<p>NONE</p>{% endif %}
222-
{% for wg in wgs.s422 %}{% include "iesg/agenda_wg.html" %}{%endfor%}
74+
<div id="section23">
75+
{% with "iesg/agenda_doc.html" as doc_template %}
76+
{% include "iesg/agenda_outline_23.html" %}
77+
{% endwith %}
78+
</div>
22379

80+
<div id="section4">
81+
{% with "iesg/agenda_wg.html" as wg_template %}
82+
{% include "iesg/agenda_outline_4.html" %}
83+
{% endwith %}
22484
</div>
22585

22686
<h2>5. IAB News We Can Use</h2>

0 commit comments

Comments
 (0)