Skip to content

Commit

Permalink
Added direct links to list subscription and archive for each WG to ht…
Browse files Browse the repository at this point in the history
…tp://datatracker.ietf.org/wg/. Addresses issue #958.

 - Legacy-Id: 8004
  • Loading branch information
fanpenggithub committed Jul 1, 2014
1 parent d334c8f commit 5e0f403
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 8 additions & 0 deletions ietf/group/info.py
Expand Up @@ -52,6 +52,7 @@
from ietf.name.models import GroupTypeName
from ietf.group.utils import get_charter_text, can_manage_group_type, milestone_reviewer_for_group_type
from ietf.utils.pipe import pipe
from ietf.settings import MAILING_LIST_INFO_URL

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

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

Expand Down
10 changes: 6 additions & 4 deletions ietf/templates/group/active_wgs.html
Expand Up @@ -37,7 +37,7 @@
{% block title %}Active IETF Working Groups{% endblock %}

{% block morecss %}
.ietf-wg-table { width: 100%; max-width:50em; }
.ietf-wg-table { width: 100%; max-width:70em; }
.ietf-wg-table tr { vertical-align:top; }
{% endblock morecss %}

Expand Down Expand Up @@ -80,10 +80,12 @@ <h2 class="ietf-divider" id="{{area.name|cut:" "}}">{{ area.name }}</h2>
<table class="ietf-wg-table">
{% for group in area.groups %}
<tr>
<td width="10%;"><a href="{% url "ietf.group.info.group_documents" group_type=group.type_id acronym=group.acronym %}">{{ group.acronym }}</a></td>
<td width="8%;"><a href="{% url "ietf.group.info.group_documents" group_type=group.type_id acronym=group.acronym %}">{{ group.acronym }}</a></td>
<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>
<td width="50%">{{ group.name }}</td>
<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>
<td width="35%">{{ group.name }}</td>
<td width="15%"><a href="{{ group.list_archive }}"><span title="Click to view list archive">{{ group.list_email }}</span></a></td>
<td width="8%"><a href="{{ group.list_subscribe_url }}">subscribe</a></td>
<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>
</tr>
{% endfor %}
</table>
Expand Down

0 comments on commit 5e0f403

Please sign in to comment.