Added overview pages for non-ietf-stream documents (ise, iab, irtf).
- Legacy-Id: 6202
This commit is contained in:
parent
e09667122a
commit
23cdddf696
14
ietf/group/stream_urls.py
Normal file
14
ietf/group/stream_urls.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Copyright The IETF Trust 2008, All Rights Reserved
|
||||
|
||||
from django.conf.urls.defaults import patterns, include
|
||||
|
||||
import views
|
||||
|
||||
urlpatterns = patterns('',
|
||||
(r'^$', views.streams),
|
||||
(r'^(?P<acronym>[a-zA-Z0-9-]+)/$', views.stream_documents, None),
|
||||
# (r'^(?P<acronym>[a-zA-Z0-9-]+)/history/$', views.stream_history),
|
||||
# (r'^(?P<acronym>[a-zA-Z0-9-]+)/edit/$', views.stream_edit)
|
||||
(r'^management/', include('ietf.ietfworkflows.urls')),
|
||||
|
||||
)
|
29
ietf/group/views.py
Normal file
29
ietf/group/views.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Copyright The IETF Trust 2008, All Rights Reserved
|
||||
|
||||
from django.shortcuts import render_to_response
|
||||
from django.template import RequestContext, loader
|
||||
from django.http import Http404, HttpResponse
|
||||
|
||||
from ietf.group.models import Group
|
||||
from ietf.doc.models import Document
|
||||
from ietf.doc.views_search import SearchForm, retrieve_search_results
|
||||
from ietf.name.models import StreamName
|
||||
|
||||
import debug
|
||||
|
||||
def streams(request):
|
||||
streams = [ s.slug for s in StreamName.objects.all().exclude(slug__in=['ietf', 'legacy']) ]
|
||||
streams = Group.objects.filter(acronym__in=streams)
|
||||
return render_to_response('group/index.html', {'streams':streams}, context_instance=RequestContext(request))
|
||||
|
||||
def stream_documents(request, acronym):
|
||||
streams = [ s.slug for s in StreamName.objects.all().exclude(slug__in=['ietf', 'legacy']) ]
|
||||
if not acronym in streams:
|
||||
raise Http404("No such stream: %s" % acronym)
|
||||
stream = StreamName.objects.get(slug=acronym)
|
||||
form = SearchForm({'by':'stream', 'stream':acronym,
|
||||
'rfcs':'on', 'activedrafts':'on'})
|
||||
docs, meta = retrieve_search_results(form)
|
||||
return render_to_response('group/stream_documents.html', {'stream':stream, 'docs':docs, 'meta':meta }, context_instance=RequestContext(request))
|
||||
|
||||
|
|
@ -95,6 +95,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
<li class="sect">Drafts & RFCs</li>
|
||||
<li><a href="/doc/">Document search:</a></li>
|
||||
<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>
|
||||
<li>
|
||||
<div style="padding: 0 0 0 10px;">Streams:</div>
|
||||
<a style="padding: 0 0 0 20px;" href="{% url ietf.group.views.streams %}iab/">IAB</a>
|
||||
<a style="padding: 0;" href="{% url ietf.group.views.streams %}irtf/">IRTF</a>
|
||||
<a style="padding: 0;" href="{% url ietf.group.views.streams %}ise/">ISE</a>
|
||||
</li>
|
||||
<li><a href="{% url submit_index %}">Submit a draft</a></li>
|
||||
{% if user|in_group:"WG Chair" %}
|
||||
<li><a href="{% url submit_approvals %}">Approve a draft</a></li>
|
||||
|
|
26
ietf/templates/group/index.html
Normal file
26
ietf/templates/group/index.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
{# Copyright The IETF Trust 2009, All Rights Reserved #}
|
||||
|
||||
{% extends "base.html" %}
|
||||
{% load ietf_filters %}
|
||||
{% block title %}Other Streams{% endblock %}
|
||||
|
||||
{% block morecss %}
|
||||
.ietf-wg-table { width: 100%; max-width:50em; }
|
||||
.ietf-wg-table tr { vertical-align:top; }
|
||||
{% endblock morecss %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Other Streams</h1>
|
||||
|
||||
<div style="margin-left:2em;">
|
||||
<table class="ietf-wg-table">
|
||||
{% for stream in streams %}
|
||||
<tr>
|
||||
<td width="10%;"><a href="/stream/{{stream.acronym}}/">{{ stream.acronym }}</a></td>
|
||||
<td width="50%">{{ stream.name }}</td>
|
||||
<td width="39%">{% with stream.get_chair as role %}<a href="mailto:{{role.person.email_address}}">{{role.person}}</a> ({{role.name}}){% endwith %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
15
ietf/templates/group/stream_documents.html
Normal file
15
ietf/templates/group/stream_documents.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% extends "base.html" %}
|
||||
{# Copyright The IETF Trust 2013, All Rights Reserved #}
|
||||
|
||||
{% block title %}{{ stream }} Stream Documents{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ stream }} Stream Documents</h1>
|
||||
|
||||
{% include "doc/search/search_results.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript" src="/js/utils.js"></script>
|
||||
<script type="text/javascript" src="/js/doc-search.js"></script>
|
||||
{% endblock %}
|
|
@ -66,6 +66,7 @@ urlpatterns = patterns('',
|
|||
(r'^submit/', include('ietf.submit.urls')),
|
||||
(r'^sync/', include('ietf.sync.urls')),
|
||||
(r'^wg/', include('ietf.wginfo.urls')),
|
||||
(r'^stream/', include('ietf.group.stream_urls')),
|
||||
(r'^nomcom/', include('ietf.nomcom.urls')),
|
||||
(r'^templates/', include('ietf.dbtemplate.urls')),
|
||||
|
||||
|
|
Loading…
Reference in a new issue