Skip to content

Commit f11ef54

Browse files
committed
Merged in personal/fanpeng/v5.5.3-dev0@8005 from fanpeng@chinamobile.com:
Added email subscription and web-archive links to the datatracker wg summary page. Fixes issue ietf-tools#958. - Legacy-Id: 8062
2 parents d2b49ff + 46656c2 commit f11ef54

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

ietf/group/info.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
from ietf.group.utils import get_charter_text, can_manage_group_type, milestone_reviewer_for_group_type
5656
from ietf.group.utils import can_manage_materials, get_group_or_404
5757
from ietf.utils.pipe import pipe
58+
from ietf.settings import MAILING_LIST_INFO_URL
5859

5960
def roles(group, role_name):
6061
return Role.objects.filter(group=group, name=role_name).select_related("email", "person")
@@ -204,6 +205,13 @@ def active_wgs(request):
204205
area.urls = area.groupurl_set.all().order_by("name")
205206
for group in area.groups:
206207
group.chairs = sorted(roles(group, "chair"), key=extract_last_name)
208+
# get the url for mailing list subscription
209+
if group.list_subscribe.startswith('http'):
210+
group.list_subscribe_url = group.list_subscribe
211+
elif group.list_email.endswith('@ietf.org'):
212+
group.list_subscribe_url = MAILING_LIST_INFO_URL % {'list_addr':group.list_email.split('@')[0]}
213+
else:
214+
group.list_subscribe_url = "mailto:"+group.list_subscribe
207215

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

ietf/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ def skip_suspicious_operations(record):
274274
IESG_WG_EVALUATION_DIR = "/a/www/www6/iesg/evaluation"
275275
INTERNET_DRAFT_ARCHIVE_DIR = '/a/www/www6s/draft-archive'
276276

277+
# Mailing list info URL for lists hosted on the IETF servers
278+
MAILING_LIST_INFO_URL = "https://www.ietf.org/mailman/listinfo/%(list_addr)s"
279+
277280
# Ideally, more of these would be local -- but since we don't support
278281
# versions right now, we'll point to external websites
279282
DOC_HREFS = {

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_home" group_type=group.type_id acronym=group.acronym %}">{{ group.acronym }}</a></td>
83+
<td width="8%;"><a href="{% url "ietf.group.info.group_home" 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)