{% extends "base.html" %}
{# Copyright The IETF Trust 2009, All Rights Reserved #}
{% comment %}
Portion Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com> 

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions 
are met:

 * Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above
   copyright notice, this list of conditions and the following
   disclaimer in the documentation and/or other materials provided
   with the distribution.

 * Neither the name of the Nokia Corporation and/or its
   subsidiary(-ies) nor the names of its contributors may be used
   to endorse or promote products derived from this software
   without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{% endcomment %}

{% block title %}Active IETF Working Groups{% endblock %}

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

{% block content %}
<h1>Active IETF Working Groups</h1>

   <p>See also:
      <a href="http://www.ietf.org/wg/concluded/">Concluded Working Groups (www.ietf.org)</a>,
      <a href="http://tools.ietf.org/wg/concluded/">Concluded Working Groups (tools.ietf.org)</a>,
      <a href="http://www.ietf.org/dyn/wg/charter/history/">Historic Charters</a>.
   </p>

   {% for area in areas|dictsort:"area_acronym.name" %}
   <h2 class="ietf-divider" id="{{area.area_acronym.name|cut:" "}}">{{ area.area_acronym.name }}</h2>

   {% for ad in area.areadirector_set.all|dictsort:"person.last_name" %}
   {% if forloop.first %}
   <p>Area Director{{ forloop.revcounter|pluralize }}:</p>
   <table style="margin-left: 2em" class="ietf-wg-table">
      {% endif %}
      <tr><td><span class="square bgcolor{{forloop.counter}}">&nbsp;</span></td> <td><a href="mailto:{{ ad.person.email.1 }}">{{ ad.person }} &lt;{{ ad.person.email.1 }}&gt;</a></td></tr>
      {% if forloop.last %}
   </table>
   {% endif %}
   {% endfor %}

   {% for url in area.additional_urls %}
   {% if forloop.first %}
   <p>Area Specific Web Page{{ forloop.revcounter|pluralize}}:</p>
   <p style="margin-left: 2em">
      {% endif %}
      <a href="{{url.url}}">{{ url.description }}</a>{% if not forloop.last %}<br/>{% endif %}
      {% if forloop.last %}
   </p>
   {% endif %}
   {% endfor %}

   {% for wg in area.active_wgs %}
   {% if forloop.first %}
   <p>Active Working Groups:</p>
   <div style="margin-left:2em;">
      <table class="ietf-wg-table">
	 {% endif %}
	 <tr>
	    <td width="10%;"><a href="/wg/{{wg}}/">{{ wg }}</a></td>
	    <td width="1%">{% for ad in area.areadirector_set.all|dictsort:"person.last_name" %}{% ifequal ad wg.area_director %}<span title="AD for {{wg}}: {{ad.person}}" class="square bgcolor{{forloop.counter}}"></span>{% endifequal %}{% endfor %}</td>
	    <td width="50%">{{ wg.group_acronym.name }}</td>
	    <td width="39%">{% for chair in wg.chairs %}<a href="mailto:{{chair.person.email.1}}">{{chair.person}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</td>
	 </tr>
	 {% if forloop.last %}
      </table>
   </div>
   {% endif %}
   {% empty %}
   <p>No Active Working Groups</p>
   {% endfor %}{# wg #}

   {% endfor %}{# area #}
{% endblock %}
