Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions ietf/doc/templatetags/wg_menu.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright The IETF Trust 2009-2022, All Rights Reserved

# Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
#
Expand Down Expand Up @@ -50,7 +52,8 @@
models.Q(type="area")
| models.Q(type="irtf", acronym="irtf")
| models.Q(acronym="iab")
| models.Q(acronym="ietfadminllc"),
| models.Q(acronym="ietfadminllc")
| models.Q(acronym="rfceditor"),
state="active",
).order_by("type__order", "type_id", "acronym")

Expand All @@ -72,7 +75,9 @@ def wg_menu(flavor):
p.menu_url = "/program/"
elif p.acronym == "ietfadminllc":
p.menu_url = "/adm/"
elif p.acronym == "rfceditor":
p.menu_url = "/rfcedtyp/"

return render_to_string(
"base/menu_wg.html", {"parents": parents, "flavor": flavor}
)
)
38 changes: 38 additions & 0 deletions ietf/group/migrations/0055_editorial_stream.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright The IETF Trust 2022 All Rights Reserved

from django.db import migrations

def forward(apps, schema_editor):
Group = apps.get_model('group', 'Group')
GroupFeatures = apps.get_model('group', 'GroupFeatures')
Group.objects.create(
acronym='editorial',
name='Editorial Stream',
state_id='active',
type_id='editorial',
parent=None,
)
templ = GroupFeatures.objects.get(type='rfcedtyp')
templ.pk = None
templ.type_id='editorial'
templ.save()



def reverse(apps, schema_editor):
Group = apps.get_model('group', 'Group')
GroupFeatures = apps.get_model('group', 'GroupFeatures')
GroupFeatures.objects.filter(type='editorial').delete()
Group.objects.filter(acronym='editorial').delete()


class Migration(migrations.Migration):

dependencies = [
('group', '0054_enable_delegation'),
('name', '0043_editorial_stream_grouptype'),
]

operations = [
migrations.RunPython(forward, reverse),
]
6 changes: 3 additions & 3 deletions ietf/group/tests_info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright The IETF Trust 2009-2020, All Rights Reserved
# Copyright The IETF Trust 2009-2022, All Rights Reserved
# -*- coding: utf-8 -*-


Expand Down Expand Up @@ -68,7 +68,7 @@ def test_active_groups(self):
self.assertContains(r, group.name)
self.assertContains(r, escape(group.ad_role().person.name))

for t in ('rg','area','ag', 'rag', 'dir','review','team','program','iabasg','adm'):
for t in ('rg','area','ag', 'rag', 'dir','review','team','program','iabasg','adm','rfcedtyp'):
g = GroupFactory.create(type_id=t,state_id='active')
if t in ['dir','review']:
g.parent = GroupFactory.create(type_id='area',state_id='active')
Expand All @@ -84,7 +84,7 @@ def test_active_groups(self):
self.assertContains(r, "Directorate")
self.assertContains(r, "AG")

for slug in GroupTypeName.objects.exclude(slug__in=['wg','rg','ag','rag','area','dir','review','team','program','adhoc','ise','adm','iabasg']).values_list('slug',flat=True):
for slug in GroupTypeName.objects.exclude(slug__in=['wg','rg','ag','rag','area','dir','review','team','program','adhoc','ise','adm','iabasg','rfcedtyp']).values_list('slug',flat=True):
with self.assertRaises(NoReverseMatch):
url=urlreverse('ietf.group.views.active_groups', kwargs=dict(group_type=slug))

Expand Down
11 changes: 9 additions & 2 deletions ietf/group/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright The IETF Trust 2009-2020, All Rights Reserved
# Copyright The IETF Trust 2009-2022, All Rights Reserved
#
# Portion Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
Expand Down Expand Up @@ -295,6 +295,8 @@ def active_groups(request, group_type=None):
return active_iab(request)
elif group_type == "adm":
return active_adm(request)
elif group_type == "rfcedtyp":
return active_rfced(request)
else:
raise Http404

Expand Down Expand Up @@ -332,6 +334,11 @@ def active_adm(request):
adm = Group.objects.filter(type="adm", state="active").order_by("parent","name")
return render(request, 'group/active_adm.html', {'adm' : adm })

def active_rfced(request):
rfced = Group.objects.filter(type="rfcedtyp", state="active").order_by("parent", "name")
return render(request, 'group/active_rfced.html', {'rfced' : rfced})


def active_areas(request):
areas = Group.objects.filter(type="area", state="active").order_by("name")
return render(request, 'group/active_areas.html', {'areas': areas })
Expand Down Expand Up @@ -1293,7 +1300,7 @@ def stream_edit(request, acronym):
@cache_control(public=True, max_age=30*60)
@cache_page(30 * 60)
def group_menu_data(request):
groups = Group.objects.filter(state="active", parent__state="active").filter(Q(type__features__acts_like_wg=True)|Q(type_id__in=['program','iabasg'])|Q(parent__acronym='ietfadminllc')).order_by("-type_id","acronym")
groups = Group.objects.filter(state="active", parent__state="active").filter(Q(type__features__acts_like_wg=True)|Q(type_id__in=['program','iabasg'])|Q(parent__acronym='ietfadminllc')|Q(parent__acronym='rfceditor')).order_by("-type_id","acronym")

groups_by_parent = defaultdict(list)
for g in groups:
Expand Down
6 changes: 3 additions & 3 deletions ietf/ietfauth/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright The IETF Trust 2013-2020, All Rights Reserved
# Copyright The IETF Trust 2013-2022, All Rights Reserved
# -*- coding: utf-8 -*-


Expand Down Expand Up @@ -64,7 +64,7 @@ def has_role(user, role_names, *args, **kwargs):
"Secretariat": Q(person=person, name="secr", group__acronym="secretariat"),
"IAB" : Q(person=person, name="member", group__acronym="iab"),
"IANA": Q(person=person, name="auth", group__acronym="iana"),
"RFC Editor": Q(person=person, name="auth", group__acronym="rfceditor"),
"RFC Editor": Q(person=person, name="auth", group__acronym="rpc"),
"ISE" : Q(person=person, name="chair", group__acronym="ise"),
"IAD": Q(person=person, name="admdir", group__acronym="ietf"),
"IETF Chair": Q(person=person, name="chair", group__acronym="ietf"),
Expand Down Expand Up @@ -305,4 +305,4 @@ def scope_registration(self):
}

return info


6 changes: 3 additions & 3 deletions ietf/name/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright The IETF Trust 2010-2020, All Rights Reserved
# Copyright The IETF Trust 2010-2022, All Rights Reserved
from django.contrib import admin

from ietf.name.models import (
Expand All @@ -18,7 +18,7 @@
from ietf.stats.models import CountryAlias

class NameAdmin(admin.ModelAdmin):
list_display = ["slug", "name", "desc", "used"]
list_display = ["slug", "name", "desc", "used", "order"]
search_fields = ["slug", "name"]
prepopulate_from = { "slug": ("name",) }

Expand Down Expand Up @@ -96,4 +96,4 @@ class ProceedingsMaterialTypeNameAdmin(NameAdmin):
admin.site.register(DocUrlTagName, NameAdmin)
admin.site.register(ExtResourceTypeName, NameAdmin)
admin.site.register(SlideSubmissionStatusName, NameAdmin)
admin.site.register(SessionPurposeName, NameAdmin)
admin.site.register(SessionPurposeName, NameAdmin)
21 changes: 21 additions & 0 deletions ietf/name/migrations/0041_update_rfcedtyp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright The IETF Trust 2022 All Rights Reserved

from django.db import migrations

def forward(apps, schema_editor):
GroupTypeName = apps.get_model('name', 'GroupTypeName')
GroupTypeName.objects.filter(slug='rfcedtyp').update(order=2, verbose_name='RFC Editor Group')

def reverse(apps, schema_editor):
GroupTypeName = apps.get_model('name', 'GroupTypeName')
GroupTypeName.objects.filter(slug='rfcedtyp').update(order=0, verbose_name='The RFC Editor')

class Migration(migrations.Migration):

dependencies = [
('name', '0040_remove_constraintname_editor_label'),
]

operations = [
migrations.RunPython(forward,reverse),
]
30 changes: 30 additions & 0 deletions ietf/name/migrations/0042_editorial_stream.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright The IETF Trust 2022 All Rights Reserved

from django.db import migrations

def forward(apps, schema_editor):
StreamName = apps.get_model('name', 'StreamName')
StreamName.objects.create(
slug = 'editorial',
name = 'Editorial',
desc = 'Editorial',
used = True,
order = 5,
)
StreamName.objects.filter(slug='legacy').update(order=6)


def reverse(apps, schema_editor):
StreamName = apps.get_model('name', 'StreamName')
StreamName.objects.filter(slug='editorial').delete()
StreamName.objects.filter(slug='legacy').update(order=5)

class Migration(migrations.Migration):

dependencies = [
('name', '0041_update_rfcedtyp'),
]

operations = [
migrations.RunPython(forward, reverse),
]
26 changes: 26 additions & 0 deletions ietf/name/migrations/0043_editorial_stream_grouptype.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright The IETF Trust 2022 All Rights Reserved

from django.db import migrations

def forward(apps, schema_editor):
GroupTypeName = apps.get_model('name', 'GroupTypeName')
GroupTypeName.objects.create(
slug = 'editorial',
name = 'Editorial',
desc = 'Editorial Stream Group',
used = True,
)

def reverse(apps, schema_editor):
GroupTypeName = apps.get_model('name', 'GroupTypeName')
GroupTypeName.objects.filter(slug='editorial').delete()

class Migration(migrations.Migration):

dependencies = [
('name', '0042_editorial_stream'),
]

operations = [
migrations.RunPython(forward, reverse),
]
6 changes: 6 additions & 0 deletions ietf/templates/base/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@
ISE
</a>
</li>
<li>
<a class="dropdown-item {% if flavor != 'top' %}text-wrap link-primary{% endif %}"
href="{% url "ietf.group.views.stream_documents" acronym="editorial" %}">
Editorial
</a>
</li>
{% if flavor == 'top' %}
</ul>
</li>
Expand Down
42 changes: 42 additions & 0 deletions ietf/templates/group/active_rfced.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{% extends "base.html" %}
{# Copyright The IETF Trust 2022, All Rights Reserved #}
{% load origin static person_filters %}
{% block pagehead %}
<link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
{% endblock %}
{% block title %}Active RFC Editor Groups{% endblock %}
{% block content %}
{% origin %}
<h1>Active RFC Editor Groups</h1>
<table class="table table-sm table-striped tablesorter">
<thead>
<tr>
<th scope="col" data-sort="team">Group</th>
<th scope="col" data-sort="name">Name</th>
</tr>
</thead>
{% regroup rfced by parent as grouped_groups %}
{% for grouptype in grouped_groups %}
<tbody>
<tr>
<th scope="col" colspan="2" class="table-info">
Active {% firstof grouptype.grouper.verbose_name grouptype.grouper.name 'Top-level Organization' %} Groups
</th>
</tr>
</tbody>
<tbody>
{% for group in grouptype.list %}
<tr>
<td>
<a href="{% url "ietf.group.views.group_home" acronym=group.acronym %}">{{ group.acronym }}</a>
</td>
<td>{{ group.name }}</td>
</tr>
{% endfor %}
</tbody>
{% endfor %}
</table>
{% endblock %}
{% block js %}
<script src="{% static "ietf/js/list.js" %}"></script>
{% endblock %}
6 changes: 3 additions & 3 deletions ietf/templates/group/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{# Copyright The IETF Trust 2015-2022, All Rights Reserved #}
{% load origin static person_filters %}
{% load ietf_filters %}
{% block pagehead %}
Expand Down Expand Up @@ -27,7 +27,7 @@ <h1>Other RFC streams</h1>
<td>
{% with stream.get_chair as role %}
{% person_link role.person %}
<span class="badge bg-info">{{ role.name }}</span>
{% if role %}<span class="badge bg-info">{{ role.name }}</span>{% endif %}
{% endwith %}
</td>
</tr>
Expand All @@ -37,4 +37,4 @@ <h1>Other RFC streams</h1>
{% endblock %}
{% block js %}
<script src="{% static "ietf/js/list.js" %}"></script>
{% endblock %}
{% endblock %}
6 changes: 3 additions & 3 deletions ietf/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright The IETF Trust 2007-2019, All Rights Reserved
# Copyright The IETF Trust 2007-2022, All Rights Reserved

from django.conf import settings
from django.conf.urls import include
Expand Down Expand Up @@ -67,7 +67,7 @@
url(r'^submit/', include('ietf.submit.urls')),
url(r'^sync/', include('ietf.sync.urls')),
url(r'^templates/', include('ietf.dbtemplate.urls')),
url(r'^(?P<group_type>(wg|rg|ag|rag|team|dir|review|area|program|iabasg|adhoc|ise|adm))/', include(grouptype_urls)),
url(r'^(?P<group_type>(wg|rg|ag|rag|team|dir|review|area|program|iabasg|adhoc|ise|adm|rfcedtyp))/', include(grouptype_urls)),

# Redirects
url(r'^(?P<path>public)/', include('ietf.redirects.urls')),
Expand Down Expand Up @@ -96,4 +96,4 @@
import debug_toolbar
urlpatterns = urlpatterns + [path('__debug__/', include(debug_toolbar.urls)), ]
except ImportError:
pass
pass
6 changes: 3 additions & 3 deletions ietf/utils/test_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright The IETF Trust 2011-2020, All Rights Reserved
# Copyright The IETF Trust 2011-2022, All Rights Reserved
# -*- coding: utf-8 -*-


Expand Down Expand Up @@ -89,8 +89,8 @@ def make_immutable_base_data():
iana = create_group(name="IANA", acronym="iana", type_id="iana")
create_person(iana, "auth", name="Iña Iana", username="iana", email_address="iana@ia.na")

rfc_editor = create_group(name="RFC Editor", acronym="rfceditor", type_id="rfcedtyp")
create_person(rfc_editor, "auth", name="Rfc Editor", username="rfc", email_address="rfc@edit.or")
rpc = create_group(name="RFC Production Center", acronym="rpc", type_id="rfcedtyp")
create_person(rpc, "auth", name="Rfc Editor", username="rfc", email_address="rfc@edit.or")

iesg = create_group(name="Internet Engineering Steering Group", acronym="iesg", type_id="ietf", parent=ietf) # pyflakes:ignore
irsg = create_group(name="Internet Research Steering Group", acronym="irsg", type_id="irtf", parent=irtf) # pyflakes:ignore
Expand Down