Add WG chartering/rechartering overview page, missing ballot icon

pending on getting ballot situation cleared up, but otherwise done.
 - Legacy-Id: 4087
This commit is contained in:
Ole Laursen 2012-03-15 16:01:59 +00:00
parent 328ecb08c3
commit 618e308ac0
3 changed files with 28 additions and 0 deletions

View file

@ -51,6 +51,16 @@ def get_rfc_number(doc):
qs = doc.docalias_set.filter(name__startswith='rfc')
return qs[0].name[3:] if qs else None
def get_chartering_type(doc):
chartering = ""
if doc.get_state_slug() not in ("notrev", "approved"):
if doc.group.state_id == "proposed":
chartering = "initial"
elif doc.group.state_id == "active":
chartering = "rechartering"
return chartering
def augment_with_telechat_date(docs):
"""Add a telechat_date attribute to each document with the
scheduled telechat or None if it's not scheduled."""

View file

@ -13,6 +13,7 @@ urlpatterns = patterns('',
(r'^1wg-summary-by-acronym.txt', views.wg_summary_acronym),
(r'^1wg-charters.txt', views.wg_charters),
(r'^1wg-charters-by-acronym.txt', views.wg_charters_by_acronym),
(r'^chartering/$', views.chartering_wgs),
(r'^(?P<acronym>[a-zA-Z0-9-]+)/documents/txt/$', views.wg_documents_txt),
(r'^(?P<acronym>[a-zA-Z0-9-]+)/$', views.wg_documents_html),
(r'^(?P<acronym>[a-zA-Z0-9-]+)/charter/$', views.wg_charter),

View file

@ -42,6 +42,8 @@ from ietf.idrfc.views_search import SearchForm, search_query
from ietf.idrfc.idrfc_wrapper import IdRfcWrapper
from ietf.ipr.models import IprDetail
from ietf.group.models import Group
from ietf.doc.models import State
from ietf.doc.utils import get_chartering_type, augment_with_telechat_date
def fill_in_charter_info(wg, include_drafts=False):
@ -111,6 +113,21 @@ def wg_dirREDESIGN(request):
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
wg_dir = wg_dirREDESIGN
def chartering_wgs(request):
charter_states = State.objects.filter(type="charter").exclude(slug__in=("approved", "notrev"))
groups = Group.objects.filter(type="wg", charter__states__in=charter_states).select_related("state", "charter")
augment_with_telechat_date([g.charter for g in groups])
for g in groups:
g.chartering_type = get_chartering_type(g.charter)
return render_to_response('wginfo/chartering_wgs.html',
dict(charter_states=charter_states,
groups=groups),
RequestContext(request))
def wg_documents(request, acronym):
wg = get_object_or_404(IETFWG, group_acronym__acronym=acronym, group_type=1)
concluded = (wg.status_id != 1 and wg.status_id != 4)