Skip to content

Commit 31aef86

Browse files
committed
Merge charter branch with the UI hooks disabled for the time being
- Legacy-Id: 3800
2 parents 0745a1f + 30055ce commit 31aef86

88 files changed

Lines changed: 6041 additions & 339 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ietf/idtracker/templatetags/ietf_filters.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,15 @@ def stable_dictsort(value, arg):
431431
decorated.sort(lambda a, b: cmp(a[0], b[0]) if a[0] and b[0] else -1 if b[0] else 1 if a[0] else 0)
432432
return [item[1] for item in decorated]
433433

434+
@register.filter
435+
def ad_area(user):
436+
if user and user.is_authenticated():
437+
from redesign.group.models import Group
438+
g = Group.objects.filter(role__name="ad", role__person__user=user)
439+
if g:
440+
return g[0].acronym
441+
return None
442+
434443
def _test():
435444
import doctest
436445
doctest.testmod()

ietf/ietfworkflows/forms.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from redesign.doc.models import save_document_in_history, DocEvent, Document
2323
from redesign.name.models import DocTagName, StreamName, RoleName
2424
from redesign.group.models import Group, GroupStateTransitions, Role
25+
from redesign.group.utils import save_group_in_history
2526
from redesign.person.models import Person, Email
2627

2728
class StreamDraftForm(forms.Form):
@@ -351,9 +352,10 @@ def clean_email(self):
351352

352353
def save(self):
353354
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
354-
# FIXME: should save group history here
355+
stream_group = Group.objects.get(acronym=self.stream.slug)
356+
save_group_in_history(stream_group)
355357
Role.objects.get_or_create(person=self.person,
356-
group=Group.objects.get(acronym=self.stream.slug),
358+
group=stream_group,
357359
name=RoleName.objects.get(slug="delegate"),
358360
email=Email.objects.get(address=self.cleaned_data.get('email')))
359361
return

ietf/ietfworkflows/views.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
is_chair_of_stream, can_adopt)
2020
from redesign.doc.utils import get_tags_for_stream_id
2121
from redesign.name.models import DocTagName
22+
from redesign.group.utils import save_group_in_history
23+
from redesign.group.models import Group, Role
2224

2325

2426
REDUCED_HISTORY_LEN = 20
@@ -125,9 +127,9 @@ def stream_delegates(request, stream_name):
125127
if request.POST.get('delete', False):
126128
pk_list = request.POST.getlist('remove_delegate')
127129
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
128-
# FIXME: should save group history here
129-
from redesign.group.models import Role
130-
Role.objects.filter(person__in=pk_list, group__acronym=stream.slug, name="delegate").delete()
130+
stream_group = Group.objects.get(acronym=stream.slug)
131+
save_group_in_history(stream_group)
132+
Role.objects.filter(person__in=pk_list, group=stream_group, name="delegate").delete()
131133
else:
132134
StreamDelegate.objects.filter(stream=stream, person__pk__in=pk_list).delete()
133135
else:

ietf/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156
'ietf.submit',
157157
'ietf.ietfworkflows',
158158
'ietf.wgchairs',
159+
'ietf.wgcharter',
159160
)
160161

161162
INTERNAL_IPS = (
@@ -187,6 +188,8 @@
187188
INTERNET_DRAFT_PATH = '/a/www/ietf-ftp/internet-drafts/'
188189
INTERNET_DRAFT_PDF_PATH = '/a/www/ietf-datatracker/pdf/'
189190
RFC_PATH = '/a/www/ietf-ftp/rfc/'
191+
CHARTER_PATH = '/a/www/ietf-ftp/charters/'
192+
CHARTER_TXT_URL = 'http://www.ietf.org/charters/'
190193
AGENDA_PATH = '/a/www/www6s/proceedings/'
191194
AGENDA_PATH_PATTERN = '/a/www/www6s/proceedings/%(meeting)s/agenda/%(wg)s.%(ext)s'
192195
MINUTES_PATH_PATTERN = '/a/www/www6s/proceedings/%(meeting)s/minutes/%(wg)s.%(ext)s'

ietf/templates/base_leftmenu.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242
<li><a href="{% url doc_search_by_ad name=user.get_profile.person.full_name_as_key %}">My Documents</a></li>
4343
<li><a href="{% url ietf.iesg.views.agenda_documents %}">Next Telechat</a></li>
4444
<li><a href="{% url ietf.iesg.views.discusses %}">Discusses</a></li>
45-
<li><a href="{% url iesg_working_group_actions %}">Working Groups</a></li>
45+
{# FIXME: wgcharter <li><a href="{% url wg_search_by_area name=user|ad_area %}">Working Groups</a></li> #}
4646
{% endif %}
4747
{% if user|in_group:"Secretariat" %}
4848
<li class="sect first">Secretariat</li>
4949
<li><a href="{% url ietf.iesg.views.telechat_dates %}">Telechat Dates</a></li>
50-
<li><a href="{% url iesg_working_group_actions %}">Working Groups</a></li>
50+
{# FIXME: wgcharter <li><a href="{% url wg_search_in_process %}">Working Groups</a></li> #}
5151
{% endif %}
5252
{% if user %}
5353
{% get_user_managed_streams user as stream_list %}
@@ -67,6 +67,7 @@
6767
</div></div></li>
6868

6969
<li style="padding-top:0;"><a href="/wg/">Active WGs</a></li>
70+
{# FIXME: wgcharter <li><a href="DEAD_BEEF_TASTY_TASTY">Proposed WGs</a></li> #}
7071
<li><a href="http://tools.ietf.org/wg/concluded">Concluded WGs</a></li>
7172
<li><a href="http://www.ietf.org/list/nonwg.html">Non-WG Lists</a></li>
7273

@@ -83,6 +84,7 @@
8384
<li><a href="http://www.ietf.org/meeting/upcoming.html">Upcoming</a></li>
8485

8586
<li class="sect">Other Documents</li>
87+
{# FIXME: wgcharter <li><a href="/wgcharter/">WG Charters</a></li> #}
8688
<li><a href="/ipr/">IPR Disclosures</a></li>
8789
<li><a href="/liaison/">Liaison&nbsp;Statements</a></li>
8890
<li><a href="/iesg/agenda/">IESG Agenda</a></li>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{# Copyright The IETF Trust 2011, All Rights Reserved #}
2+
{% load ietf_filters %}
3+
{{ obj.info.text|safe }}<br/>
4+
<br/>
5+
{% with obj.group as wg %}
6+
WG name: {{ wg.name }}<br/>
7+
WG acronym: {{ wg.acronym }}<br/>
8+
IETF area: {{ wg.parent|default:"-" }}<br/>
9+
10+
WG chairs: {% for n in obj.chairs %}{{ n }}{% if not forloop.last %}, {% endif %}{% endfor %}<br/>
11+
WG secretaries: {% for n in obj.secr %}{{ n }}{% if not forloop.last %}, {% endif %}{% endfor %}<br/>
12+
WG technical advisors: {% for n in obj.techadv %}{{ n }}{% if not forloop.last %}, {% endif %}{% endfor %}<br/>
13+
Assigned AD: {{ wg.ad }}<br/>
14+
15+
Mailing list: {{ wg.list_email }}<br/>
16+
Mailing list subscribe {{ wg.list_subscribe }}<br/>
17+
Mailing list archive: {{ wg.list_archive }}<br/>
18+
Other web sites: {% for a in wg.groupurl_set.all %}{{ a.url }} {% if a.name %}({{ a.name }}){% endif %}{% if not forloop.last %}, {% endif %}{% endfor %}<br/>
19+
20+
WG State: {{ wg.state|safe }}<br/>
21+
Charter State: {{ wg.charter.charter_state|safe }}<br/>
22+
<br/>
23+
{% if obj.rev %}
24+
{{ obj.charter|safe }}
25+
{% else %}
26+
The WG does not yet have a charter
27+
{% endif %}
28+
{% endwith %}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% load ietf_filters %}WG Charter for {{obj.group.name}} ({{ obj.group.acronym|safe }})
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{% load ietf_filters %}{% autoescape off %}From: The IESG <iesg-secretary@ietf.org>
2+
To: IETF-Announce <ietf-announce@ietf.org>
3+
Subject: WG Action: {{ action_type }} {{ wg.name }} ({{wg.acronym}})
4+
5+
{% filter wordwrap:73 %}{% ifequal action_type "Formed" %}A new IETF working group has been formed in the {{ wg.parent.name }}.{% endifequal %}{% ifequal action_type "Rechartered" %}The {{ wg.name }} ({{wg.acronym}}) working group in the {{ wg.parent.name }} of the IETF has been rechartered.{% endifequal %} For additional information please contact the Area Directors or the WG Chair.
6+
7+
{% include "wgcharter/wg_info.txt" %}
8+
9+
{% endfilter %}
10+
{% endautoescape %}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{% extends "base.html" %}
2+
{% comment %}
3+
Copyright The IETF Trust 2011, All Rights Reserved
4+
{% endcomment %}
5+
6+
{% block title %}Add comment on {{ wg.acronym }}{% endblock %}
7+
8+
{% block morecss %}
9+
form.add-comment #id_comment {
10+
width: 600px;
11+
height: 300px;
12+
}
13+
14+
form.add-comment .actions {
15+
padding-top: 20px;
16+
}
17+
{% endblock %}
18+
19+
{% block content %}
20+
<h1>Add comment on {{ wg.acronym }}</h1>
21+
22+
<p>The comment will be added to the history trail.</p>
23+
24+
<form class="add-comment" action="" method="POST">
25+
<table>
26+
{{ form.as_table }}
27+
<tr>
28+
<td></td>
29+
<td class="actions">
30+
<a href="{% url wg_view name=wg.acronym %}">Back</a>
31+
<input type="submit" value="Add comment"/>
32+
</td>
33+
</tr>
34+
</table>
35+
</form>
36+
{% endblock %}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{% extends "base.html" %}
2+
3+
{% block title %}WG {{ announcement }} announcement writeup for {{ charter.chartered_group.acronym }}{% endblock %}
4+
5+
{% block morecss %}
6+
form #id_announcement_text {
7+
width: 700px;
8+
height: 600px;
9+
}
10+
{% endblock %}
11+
12+
{% block content %}
13+
<h1>WG {{ announcement }} announcement writeup for {{ charter.chartered_group.acronym }}</h1>
14+
15+
<form action="" method="POST">
16+
17+
{{ announcement_text_form.announcement_text }}
18+
19+
<div class="actions">
20+
<a href="{{ back_url }}">Back</a>
21+
<input type="submit" name="save_text" value="Save WG {{ announcement }} announcement text" />
22+
<input type="submit" name="regenerate_text" value="Regenerate {{ announcement }} text" />
23+
</div>
24+
25+
{% load ietf_filters %}
26+
{% if user|in_group:"Secretariat" %}
27+
<div class="actions">
28+
<input type="submit" name="send_text" value="Send WG {{ announcement }} announcement" />
29+
</div>
30+
{% endif %}
31+
32+
</form>
33+
34+
{% endblock%}

0 commit comments

Comments
 (0)