From 0016c69b61a34834ff2429f5e481be79eed08661 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 22 Sep 2013 18:59:24 +0000 Subject: [PATCH] Added an index page for nomcoms, at /nomcom/, with links to nomcom pages and announcements, where they exist. - Legacy-Id: 6245 --- ietf/nomcom/views.py | 27 +++++++++- .../announcements/nomcomREDESIGN.html | 6 +-- ietf/templates/nomcom/index.html | 51 ++++++++++++------- static/css/base2.css | 2 + 4 files changed, 63 insertions(+), 23 deletions(-) diff --git a/ietf/nomcom/views.py b/ietf/nomcom/views.py index 47b0a1776..7447ea9a7 100644 --- a/ietf/nomcom/views.py +++ b/ietf/nomcom/views.py @@ -20,6 +20,7 @@ from django.forms.models import modelformset_factory, inlineformset_factory from ietf.dbtemplate.models import DBTemplate from ietf.dbtemplate.views import template_edit from ietf.name.models import NomineePositionState, FeedbackType +from ietf.group.models import Group from ietf.nomcom.decorators import nomcom_private_key_required from ietf.nomcom.forms import (NominateForm, FeedbackForm, QuestionnaireForm, @@ -33,9 +34,33 @@ from ietf.nomcom.utils import (get_nomcom_by_year, store_nomcom_private_key, HOME_TEMPLATE, NOMINEE_REMINDER_TEMPLATE) from ietf.ietfauth.utils import role_required +import debug def index(request): - nomcom_list = NomCom.objects.all() + nomcom_list = Group.objects.filter(type__slug='nomcom').order_by('acronym') + for nomcom in nomcom_list: + year = nomcom.acronym[6:] + debug.show('year') + try: + year = int(year) + except ValueError: + year = None + debug.show('year') + nomcom.year = year + nomcom.label = "%s/%s" % (year, year+1) + if year in [ 2005, 2006, 2007, 2008, 2009, 2010 ]: + nomcom.url = "https://tools.ietf.org/group/nomcom/%02d" % (year % 100) + elif year in [ 2011, 2012 ]: + nomcom.url = "https://www.ietf.org/nomcom/%04d" % year + elif year > 2012: + nomcom.url = "/nomcom/%04d" % year + else: + nomcom.url = None + if year >= 2002: + nomcom.ann_url = "/ann/nomcom/#%4d" % year + else: + nomcom.ann_url = None + debug.show('nomcom.url') return render_to_response('nomcom/index.html', {'nomcom_list': nomcom_list,}, RequestContext(request)) diff --git a/ietf/templates/announcements/nomcomREDESIGN.html b/ietf/templates/announcements/nomcomREDESIGN.html index 72ef2350e..c312c99cc 100644 --- a/ietf/templates/announcements/nomcomREDESIGN.html +++ b/ietf/templates/announcements/nomcomREDESIGN.html @@ -9,7 +9,7 @@ {% for regime in regimes %}
-

Messages from {{ regime.group.start_year }} - {{ regime.group.end_year }}

+

Messages from {{ regime.group.start_year }} - {{ regime.group.end_year }}

{# use person email address here rather than the generic nomcom-chair@ietf.org #}

Committee Chair: {{ regime.chair.person.plain_name }}

@@ -33,7 +33,7 @@ {# somebody ought to import these announcements in the DB instead of this mess #} -

Messages from 2003-2004 NomCom

+

Messages from 2003-2004 NomCom

Committee Chair: Rich Draves

  • IETF Nominations Committee Chair Announcement August 25, 2003
  • NomCom call for volunteers September 22, 2003 @@ -51,7 +51,7 @@ Committee Chair: Rich Draves
  • Call for Security AD nominations September 28, 2004
  • Steve Bellovin replacement November 07, 2004 -

    Messages from 2002-2003 NomCom

    +

    Messages from 2002-2003 NomCom

    Committee Chair: Phil Roberts

    diff --git a/ietf/templates/nomcom/index.html b/ietf/templates/nomcom/index.html index 216060266..fe287ad47 100644 --- a/ietf/templates/nomcom/index.html +++ b/ietf/templates/nomcom/index.html @@ -1,24 +1,37 @@ -{% extends "nomcom/nomcom_base.html" %} +{# Copyright The IETF Trust 2009, All Rights Reserved #} + +{% extends "base.html" %} +{% load ietf_filters %} +{% block title %}IAB/IESG NomcOms{% endblock %} -{% load nomcom_tags %} {% block content %} +

    IAB/IESG NomComs

    -

    Nomcom Pages

    - - - -
    - {% if selected == "index" %}Home{% else %}Home{% endif %} | - {% if nomcom|has_publickey %} - {% if selected == "nominate" %}Nominate{% else %}Nominate{% endif %} | - {% if selected == "feedback" %}Provide Comments{% else %}Provide Comments{% endif %} | - {% endif %} - {% if selected == "requirements" %}Requirements{% else %}Requirements{% endif %} | - {% if selected == "questionnaires" %}Questionnaires{% else %}Questionnaires{% endif %} | -
    - - {% block nomcom_content %} - {% endblock %} - +
    + + + + + + + + {% for nomcom in nomcom_list %} + + + + + + + {% endfor %} +
    YearChair
    {{ nomcom.label }}{% with nomcom.get_chair as role %}{{role.person}}{% endwith %} + {% if nomcom.ann_url %} + Announcements + {% endif %} + + {% if nomcom.url %} + Pages + {% endif %} +
    +
    {% endblock %} diff --git a/static/css/base2.css b/static/css/base2.css index fb87345ac..3ac430f1a 100644 --- a/static/css/base2.css +++ b/static/css/base2.css @@ -137,9 +137,11 @@ table.ietf-table { border-collapse:collapse; border:1px solid #7f7f7f; } .ietf-doctable th.status, .ietf-doctable td.status { min-width: 20em;} .ietf-doctable th.ipr { font-variant: small-caps; } .ietf-doctable th.ad, .ietf-doctable td.ad { white-space:nowrap; min-width: 6em; } +.ietf-doctable td { padding-right: 0.5em; padding-left: 0.5em; } .ietf-doctable td.ballot { border-left: hidden; min-width: 37px; } .ietf-doctable td .updated-by { max-width: 20em; } /* some RFCs have really long lists */ + .ietf-doctable .status .milestone, .ietf-box .stream-state .milestone { display: inline-block; font-size: smaller; background-color: #d5dde6; padding: 0 0.2em; margin-left: 0.3em; }