Added direct links to list subscription and archive for each WG to http://datatracker.ietf.org/wg/. Addresses issue #958.

- Legacy-Id: 8004
This commit is contained in:
Peng Fan 2014-07-01 03:39:43 +00:00
parent d334c8f17b
commit 5e0f4032d7
2 changed files with 14 additions and 4 deletions

View file

@ -52,6 +52,7 @@ from ietf.group.models import Group, Role, ChangeStateGroupEvent
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")
@ -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 })

View file

@ -37,7 +37,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{% 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 %}
@ -80,10 +80,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<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>