Skip to content

Commit 5e0f403

Browse files
committed
Added direct links to list subscription and archive for each WG to http://datatracker.ietf.org/wg/. Addresses issue ietf-tools#958.
- Legacy-Id: 8004
1 parent d334c8f commit 5e0f403

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

ietf/group/info.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
from ietf.name.models import GroupTypeName
5353
from ietf.group.utils import get_charter_text, can_manage_group_type, milestone_reviewer_for_group_type
5454
from ietf.utils.pipe import pipe
55+
from ietf.settings import MAILING_LIST_INFO_URL
5556

5657
def roles(group, role_name):
5758
return Role.objects.filter(group=group, name=role_name).select_related("email", "person")
@@ -162,6 +163,13 @@ def active_wgs(request):
162163
area.urls = area.groupurl_set.all().order_by("name")
163164
for group in area.groups:
164165
group.chairs = sorted(roles(group, "chair"), key=extract_last_name)
166+
# get the url for list subscription
167+
if group.list_subscribe.startswith('http'):
168+
group.list_subscribe_url = group.list_subscribe
169+
elif group.list_email.endswith('@ietf.org'):
170+
group.list_subscribe_url = MAILING_LIST_INFO_URL % {'list_addr':group.list_email.split('@')[0]}
171+
else:
172+
group.list_subscribe_url = "mailto:"+group.list_subscribe
165173

166174
return render(request, 'group/active_wgs.html', { 'areas':areas })
167175

ietf/templates/group/active_wgs.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
{% block title %}Active IETF Working Groups{% endblock %}
3838

3939
{% block morecss %}
40-
.ietf-wg-table { width: 100%; max-width:50em; }
40+
.ietf-wg-table { width: 100%; max-width:70em; }
4141
.ietf-wg-table tr { vertical-align:top; }
4242
{% endblock morecss %}
4343

@@ -80,10 +80,12 @@ <h2 class="ietf-divider" id="{{area.name|cut:" "}}">{{ area.name }}</h2>
8080
<table class="ietf-wg-table">
8181
{% for group in area.groups %}
8282
<tr>
83-
<td width="10%;"><a href="{% url "ietf.group.info.group_documents" group_type=group.type_id acronym=group.acronym %}">{{ group.acronym }}</a></td>
83+
<td width="8%;"><a href="{% url "ietf.group.info.group_documents" group_type=group.type_id acronym=group.acronym %}">{{ group.acronym }}</a></td>
8484
<td width="1%">{% for ad in area.ads %}{% if ad.person_id == group.ad_id %}<span title="AD for {{ group.acronym }}: {{ ad.person }}" class="square bgcolor{{forloop.counter}}"></span>{% endif %}{% endfor %}</td>
85-
<td width="50%">{{ group.name }}</td>
86-
<td width="39%">{% for chair in group.chairs %}<a href="mailto:{{ chair.email.address }}">{{ chair.person.plain_name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</td>
85+
<td width="35%">{{ group.name }}</td>
86+
<td width="15%"><a href="{{ group.list_archive }}"><span title="Click to view list archive">{{ group.list_email }}</span></a></td>
87+
<td width="8%"><a href="{{ group.list_subscribe_url }}">subscribe</a></td>
88+
<td width="33%">{% for chair in group.chairs %}<a href="mailto:{{ chair.email.address }}">{{ chair.person.plain_name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</td>
8789
</tr>
8890
{% endfor %}
8991
</table>

0 commit comments

Comments
 (0)