From 1e3e65fcbfa0b379640ff1ceecdb016ab6b20d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Jim=C3=A9nez?= Date: Thu, 27 Dec 2012 20:16:31 +0000 Subject: [PATCH] Add requeriments and questionnaires views See #919 - Legacy-Id: 5158 --- ietf/nomcom/urls.py | 2 -- ietf/nomcom/views.py | 20 +++--------- ietf/templates/nomcom/questionnaires.html | 40 +++++++++++++++++++++++ ietf/templates/nomcom/requirements.html | 40 +++++++++++++++++++++++ 4 files changed, 84 insertions(+), 18 deletions(-) diff --git a/ietf/nomcom/urls.py b/ietf/nomcom/urls.py index bf118a336..f6f21cd9d 100644 --- a/ietf/nomcom/urls.py +++ b/ietf/nomcom/urls.py @@ -6,8 +6,6 @@ urlpatterns = patterns('ietf.nomcom.views', url(r'^(?P\d{4})/$', 'index', name='nomcom_index'), url(r'^(?P\d{4})/requirements/$', 'requirements', name='nomcom_requirements'), url(r'^(?P\d{4})/questionnaires/$', 'questionnaires', name='nomcom_questionnaires'), - url(r'^(?P\d{4})/requirement/(?P[^/]+)/$', 'requirement_detail', name='nomcom_requirement_detail'), - url(r'^(?P\d{4})/questionnaire/(?P[^/]+)/$', 'questionnaire_detail', name='nomcom_questionnaire_detail'), url(r'^(?P\d{4})/comments/$', 'comments', name='nomcom_comments'), url(r'^(?P\d{4})/nominate/$', 'nominate', name='nomcom_nominate'), url(r'^ajax/position-text/(?P\d+)/$', 'ajax_position_text', name='nomcom_ajax_position_text'), diff --git a/ietf/nomcom/views.py b/ietf/nomcom/views.py index f50842af3..b003bb1a6 100644 --- a/ietf/nomcom/views.py +++ b/ietf/nomcom/views.py @@ -25,36 +25,24 @@ def index(request, year): def requirements(request, year): nomcom = get_nomcom_by_year(year) + positions = nomcom.position_set.all() return render_to_response('nomcom/requirements.html', {'nomcom': nomcom, + 'positions': positions, 'year': year, 'selected': 'requirements'}, RequestContext(request)) def questionnaires(request, year): nomcom = get_nomcom_by_year(year) + positions = nomcom.position_set.all() return render_to_response('nomcom/questionnaires.html', {'nomcom': nomcom, + 'positions': positions, 'year': year, 'selected': 'questionnaires'}, RequestContext(request)) -def questionnaire_detail(request, year, name): - nomcom = get_nomcom_by_year(year) - return render_to_response('nomcom/questionnaire_detail.html', - {'nomcom': nomcom, - 'year': year, - 'selected': 'questionnaires'}, RequestContext(request)) - - -def requirement_detail(request, year, name): - nomcom = get_nomcom_by_year(year) - return render_to_response('nomcom/requirement_detail.html', - {'nomcom': nomcom, - 'year': year, - 'selected': 'requirements'}, RequestContext(request)) - - @login_required def nominate(request, year): nomcom = get_nomcom_by_year(year) diff --git a/ietf/templates/nomcom/questionnaires.html b/ietf/templates/nomcom/questionnaires.html index 8022e5c12..3673b1c1a 100644 --- a/ietf/templates/nomcom/questionnaires.html +++ b/ietf/templates/nomcom/questionnaires.html @@ -1,6 +1,46 @@ {% extends "nomcom/nomcom_base.html" %} +{% block pagehead %} + {{ block.super }} + + + +{% endblock pagehead %} + {% block subtitle %} - Questionnaires {% endblock %} {% block nomcom_content %} +

Questionnaires

+
+ + Pick the position requirements to view from the list immediately above +
+ {% for position in positions %} +
+ {% include position.questionnaire.path %} +
+ {% endfor %} +
+ + + {% endblock %} diff --git a/ietf/templates/nomcom/requirements.html b/ietf/templates/nomcom/requirements.html index 28d2db6c0..efda9038f 100644 --- a/ietf/templates/nomcom/requirements.html +++ b/ietf/templates/nomcom/requirements.html @@ -1,6 +1,46 @@ {% extends "nomcom/nomcom_base.html" %} +{% block pagehead %} + {{ block.super }} + + + +{% endblock pagehead %} + {% block subtitle %} - Requirements {% endblock %} {% block nomcom_content %} +

Requirements

+
+ + Pick the position requirements to view from the list immediately above +
+ {% for position in positions %} +
+ {% include position.requirement.path %} +
+ {% endfor %} +
+ + + {% endblock %}