Skip to content

Commit 71e513d

Browse files
author
Peter Musgrave
committed
Some basic plumbing to get a list of recent agendas to the template. Incomplete.
- Legacy-Id: 2411
1 parent 0201f45 commit 71e513d

4 files changed

Lines changed: 76 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{% extends "wginfo/wg_base.html" %}
2+
{% comment %}
3+
Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
4+
All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions
8+
are met:
9+
10+
* Redistributions of source code must retain the above copyright
11+
notice, this list of conditions and the following disclaimer.
12+
13+
* Redistributions in binary form must reproduce the above
14+
copyright notice, this list of conditions and the following
15+
disclaimer in the documentation and/or other materials provided
16+
with the distribution.
17+
18+
* Neither the name of the Nokia Corporation and/or its
19+
subsidiary(-ies) nor the names of its contributors may be used
20+
to endorse or promote products derived from this software
21+
without specific prior written permission.
22+
23+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34+
{% endcomment %}
35+
{% load ietf_filters %}
36+
{% block wg_titledetail %}Agenda{% endblock %}
37+
38+
{% block wg_content %}
39+
40+
<div class="ietf-box ietf-wg-details">
41+
{% if concluded %}
42+
<span class="ietf-concluded-warning">Note: The data for concluded WGs
43+
is occasionally incorrect.</span>
44+
{% endif %}
45+
46+
<p>New stuff</p>
47+
{% for a in agenda_files %}
48+
<p>{{a}}</p>
49+
{% endfor %}
50+
51+
52+
{% endblock wg_content %}
53+

peter/ietf/templates/wginfo/wg_base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ <h1>{{wg.group_acronym.name}} ({{wg.group_acronym.acronym}}){% if concluded %}<b
5858
<div class="ietf-navset">
5959
{% ifequal selected "documents" %}<span class="selected">Documents</span>{% else %}<a href="/wg/{{wg}}/">Documents</a>{% endifequal %} |
6060
{% ifequal selected "charter" %}<span class="selected">Charter</span>{% else %}<a href="/wg/{{wg}}/charter/">Charter</a>{% endifequal %} |
61+
{% ifequal selected "agenda" %}<span class="selected">Agenda</span>{% else %}<a href="/wg/{{wg}}/agenda/">Agenda</a>{% endifequal %} |
6162
{% if wg.clean_email_archive|startswith:"http:" or wg.clean_email_archive|startswith:"ftp:" %}
6263
<a href="{{ wg.clean_email_archive }}">List Archive &#187;</a> |
6364
{% endif %}

peter/ietf/wginfo/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515
(r'^1wg-charters-by-acronym.txt', views.wg_charters_by_acronym),
1616
(r'^(?P<acronym>[^/]+)/$', views.wg_documents),
1717
(r'^(?P<acronym>[^/]+)/charter/$', views.wg_charter),
18+
(r'^(?P<acronym>[^/]+)/agenda/$', views.wg_agenda),
1819
)

peter/ietf/wginfo/views.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
from django.http import HttpResponse
3939
from ietf.idrfc.views_search import SearchForm, search_query
4040
from ietf.idrfc.idrfc_wrapper import IdRfcWrapper
41+
from ietf.proceedings.models import Meeting, WgAgenda
42+
43+
4144

4245
def wg_summary_acronym(request):
4346
areas = Area.active_areas()
@@ -86,3 +89,21 @@ def wg_charter(request, acronym):
8689
wg = get_object_or_404(IETFWG, group_acronym__acronym=acronym, group_type=1)
8790
concluded = (wg.status_id != 1)
8891
return render_to_response('wginfo/wg_charter.html', {'wg': wg, 'concluded':concluded, 'selected':'charter'}, RequestContext(request))
92+
93+
def wg_agenda(request, acronym):
94+
wg = get_object_or_404(IETFWG, group_acronym__acronym=acronym, group_type=1)
95+
# do the latest 5 meeting
96+
meetings =list(Meeting.objects.all())
97+
meetings.reverse()
98+
meetings = [ meeting.meeting_num for meeting in meetings[0:4] ]
99+
agendaFiles = []
100+
agendaMtgs = []
101+
for m in meetings:
102+
a = WgAgenda.objects.filter(meeting=m).filter(group_acronym_id=wg.group_acronym_id) # returns a QuerySet of size 0 or 1
103+
if len(a) == 1:
104+
agendaFiles.append( a[0].filename)
105+
agendaMtgs.append('IETF' + str(m) )
106+
print agendaFiles
107+
print agendaMtgs
108+
concluded = (wg.status_id != 1)
109+
return render_to_response('wginfo/wg_agenda.html', {'wg': wg, 'concluded':concluded, 'agenda_files':agendaFiles}, RequestContext(request))

0 commit comments

Comments
 (0)