Skip to content

Commit 23cdddf

Browse files
committed
Added overview pages for non-ietf-stream documents (ise, iab, irtf).
- Legacy-Id: 6202
1 parent e096671 commit 23cdddf

6 files changed

Lines changed: 91 additions & 0 deletions

File tree

ietf/group/stream_urls.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright The IETF Trust 2008, All Rights Reserved
2+
3+
from django.conf.urls.defaults import patterns, include
4+
5+
import views
6+
7+
urlpatterns = patterns('',
8+
(r'^$', views.streams),
9+
(r'^(?P<acronym>[a-zA-Z0-9-]+)/$', views.stream_documents, None),
10+
# (r'^(?P<acronym>[a-zA-Z0-9-]+)/history/$', views.stream_history),
11+
# (r'^(?P<acronym>[a-zA-Z0-9-]+)/edit/$', views.stream_edit)
12+
(r'^management/', include('ietf.ietfworkflows.urls')),
13+
14+
)

ietf/group/views.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright The IETF Trust 2008, All Rights Reserved
2+
3+
from django.shortcuts import render_to_response
4+
from django.template import RequestContext, loader
5+
from django.http import Http404, HttpResponse
6+
7+
from ietf.group.models import Group
8+
from ietf.doc.models import Document
9+
from ietf.doc.views_search import SearchForm, retrieve_search_results
10+
from ietf.name.models import StreamName
11+
12+
import debug
13+
14+
def streams(request):
15+
streams = [ s.slug for s in StreamName.objects.all().exclude(slug__in=['ietf', 'legacy']) ]
16+
streams = Group.objects.filter(acronym__in=streams)
17+
return render_to_response('group/index.html', {'streams':streams}, context_instance=RequestContext(request))
18+
19+
def stream_documents(request, acronym):
20+
streams = [ s.slug for s in StreamName.objects.all().exclude(slug__in=['ietf', 'legacy']) ]
21+
if not acronym in streams:
22+
raise Http404("No such stream: %s" % acronym)
23+
stream = StreamName.objects.get(slug=acronym)
24+
form = SearchForm({'by':'stream', 'stream':acronym,
25+
'rfcs':'on', 'activedrafts':'on'})
26+
docs, meta = retrieve_search_results(form)
27+
return render_to_response('group/stream_documents.html', {'stream':stream, 'docs':docs, 'meta':meta }, context_instance=RequestContext(request))
28+
29+

ietf/templates/base_leftmenu.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@
9595
<li class="sect">Drafts&nbsp;&amp;&nbsp;RFCs</li>
9696
<li><a href="/doc/">Document search:</a></li>
9797
<li><form action="/doc/search/" method="get" style="padding-bottom:0;margin-bottom:0;"><input type="text" style="margin-left:10px; width:100px; border:1px solid #89d;" name="name" /><input type="hidden" name="activedrafts" value="on"/><input type="hidden" name="rfcs" value="on"/></form></li>
98+
<li>
99+
<div style="padding: 0 0 0 10px;">Streams:</div>
100+
<a style="padding: 0 0 0 20px;" href="{% url ietf.group.views.streams %}iab/">IAB</a>
101+
<a style="padding: 0;" href="{% url ietf.group.views.streams %}irtf/">IRTF</a>
102+
<a style="padding: 0;" href="{% url ietf.group.views.streams %}ise/">ISE</a>
103+
</li>
98104
<li><a href="{% url submit_index %}">Submit a draft</a></li>
99105
{% if user|in_group:"WG Chair" %}
100106
<li><a href="{% url submit_approvals %}">Approve a draft</a></li>

ietf/templates/group/index.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{# Copyright The IETF Trust 2009, All Rights Reserved #}
2+
3+
{% extends "base.html" %}
4+
{% load ietf_filters %}
5+
{% block title %}Other Streams{% endblock %}
6+
7+
{% block morecss %}
8+
.ietf-wg-table { width: 100%; max-width:50em; }
9+
.ietf-wg-table tr { vertical-align:top; }
10+
{% endblock morecss %}
11+
12+
{% block content %}
13+
<h1>Other Streams</h1>
14+
15+
<div style="margin-left:2em;">
16+
<table class="ietf-wg-table">
17+
{% for stream in streams %}
18+
<tr>
19+
<td width="10%;"><a href="/stream/{{stream.acronym}}/">{{ stream.acronym }}</a></td>
20+
<td width="50%">{{ stream.name }}</td>
21+
<td width="39%">{% with stream.get_chair as role %}<a href="mailto:{{role.person.email_address}}">{{role.person}}</a> ({{role.name}}){% endwith %}</td>
22+
</tr>
23+
{% endfor %}
24+
</table>
25+
</div>
26+
{% endblock %}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{% extends "base.html" %}
2+
{# Copyright The IETF Trust 2013, All Rights Reserved #}
3+
4+
{% block title %}{{ stream }} Stream Documents{% endblock %}
5+
6+
{% block content %}
7+
<h1>{{ stream }} Stream Documents</h1>
8+
9+
{% include "doc/search/search_results.html" %}
10+
{% endblock %}
11+
12+
{% block js %}
13+
<script type="text/javascript" src="/js/utils.js"></script>
14+
<script type="text/javascript" src="/js/doc-search.js"></script>
15+
{% endblock %}

ietf/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
(r'^submit/', include('ietf.submit.urls')),
6767
(r'^sync/', include('ietf.sync.urls')),
6868
(r'^wg/', include('ietf.wginfo.urls')),
69+
(r'^stream/', include('ietf.group.stream_urls')),
6970
(r'^nomcom/', include('ietf.nomcom.urls')),
7071
(r'^templates/', include('ietf.dbtemplate.urls')),
7172

0 commit comments

Comments
 (0)