{% extends "wgcharter/wg_tab_base.html" %}

{% comment %}
Copyright The IETF Trust 2011, All Rights Reserved
{% endcomment %}

{% load ietf_filters %}

{% block wg_revision %}
Snapshots: {% for d in versions reversed %}{% if forloop.first %}<strong>{% ifnotequal rev wg.charter.rev %}<a href="{% url wg_view name=wg.acronym %}">{% endifnotequal %}{% else %}{% ifnotequal rev d.rev %}{% ifequal d.rev wg.charter.rev %}<a href="{% url wg_view name=wg.acronym %}">{% else %}<a href="{% url wg_view name=wg.acronym %}{{d.rev}}/">{% endifequal %}{% endifnotequal %}{% endif %}{{ d.rev }}{% ifnotequal rev d.rev %}</a>{% endifnotequal %}{% if forloop.first %}{% ifnotequal rev wg.charter.rev %}</a>{% endifnotequal %}</strong>{% endif %} {% endfor %}
{% endblock %}

{% block wg_metatable %}
<tr><td style="width: 15em">WG name:</td><td>{% if not snapshot %}{{ wg.name }}{% else %} {{ gh.name }} {% endif %}</td></tr>
<tr><td>WG acronym:</td><td>{% if not snapshot %}{{ wg.acronym }} {% if info.prev_acronyms %}(previous acronyms: {% for a in info.prev_acronyms %}{{ a }}{% if not forloop.last %}, {% endif %}{% endfor %}){% endif %}{% else %}{{ gh.acronym }}{% endif %}</td></tr>
<tr><td>IETF area:</td><td>{% if not snapshot %}{{ wg.parent|default:"-" }}{% else %}{{ gh.parent|default:"-" }}{% endif %}</td></tr>

<tr><td colspan='2'><hr size='1' noshade /></td></tr>

<tr><td>WG chairs:</td><td>{% if not snapshot %}{% for n in info.chairs %}{{ n }}{% if not forloop.last %}, {% endif %}{% endfor %}{% else %}{% for n in info.history_chairs %}{{ n }}{% if not forloop.last %}, {% endif %}{% endfor %}{% endif %}</td></tr>
{% if not snapshot %}
<tr><td>WG secretaries:</td><td>{% for n in info.secr %}{{ n }}{% if not forloop.last %}, {% endif %}{% endfor %}</td></tr>
<tr><td>WG technical advisors:</td><td>{% for n in info.techadv %}{{ n }}{% if not forloop.last %}, {% endif %}{% endfor %}</td></tr>
{% endif %}
<tr><td>Assigned AD:</td><td>{% if not snapshot %}{{ wg.ad }}{% else %}{{ gh.ad }}{% endif %}</td></tr>

{% if not snapshot %}
<tr><td colspan='2'><hr size='1' noshade /></td></tr>

<tr><td>Mailing list:</td><td><a href="mailto:{{ wg.list_email }}">{{ wg.list_email }}</a>{% if info.prev_list_email %}<br />(previous lists: {% for a in info.prev_list_email %}{{ a }}{% if not forloop.last %}, {% else %}){% endif %}{% endfor %}{% endif %}</td></tr>
<tr><td>Mailing list subscribe:</td><td><a href="{{ wg.list_subscribe }}">{{ wg.list_subscribe }}</a>{% if info.prev_list_subscribe %}<br />(previous archives: {% for a in info.prev_list_subscribe %}<a href="{{ a }}">{{ a }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}){% endif %}</td></tr>
<tr><td>Mailing list archive:</td><td><a href="{{ wg.list_archive }}">{{ wg.list_archive }}</a>{% if info.prev_list_archive %}<br />(previous archives: {% for a in info.prev_list_archive %}<a href="{{ a }}">{{ a }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}){% endif %}</td></tr>
<tr><td>Other web sites:</td><td>{% for a in wg.groupurl_set.all %}<a href="{{ a.url }}">{{ a.url }}</a> {% if a.name %}({{ a.name }}){% endif %}{% if not forloop.last %}<br />{% endif %}{% endfor %}</td></tr>

<tr><td colspan='2'><hr size='1' noshade /></td></tr>

<tr><td>WG State:</td><td> {{ wg.state|safe }} </td>
{% ifnotequal wg.state_id "conclude" %}<tr><td><a href="/wgcharter/help/state/">Charter State</>:</td><td> {{ wg.charter.get_state|safe }} {% ifequal wg.state_id "proposed" %}{% ifnotequal wg.charter.get_state_slug "notrev" %}(Initial Chartering){% endifnotequal %}{% else %}{% ifnotequal wg.charter.get_state_slug "approved" %}(Rechartering){% endifnotequal %}{% endifequal %}</td>{% endifnotequal %}
{% ifequal wg.state_id "proposed" %}
{% if wg.comments %}
<tr><td>Reason for chartering:</td><td>{{ wg.comments }}</td></tr>
{% endif %}
{% endifequal %}
{% ifequal wg.state_id "active" %}
{% ifnotequal wg.charter.get_state_slug "approved" %}
{% if wg.comments %}
<tr><td>Reason for rechartering:</td><td>{{ wg.comments }}</td></tr>
{% endif %}
{% endifnotequal %}
{% endifequal %}

<tr><td colspan='2'><hr size='1' noshade /></td></tr>

<tr><td>Last updated:</td><td> {{ info.last_update|date:"Y-m-d"|default:"(data missing)" }}</td></tr>
<tr><td colspan='2'><hr size='1' noshade /></td></tr>

{% endif %}{# if not snapshot #}

{% endblock wg_metatable %}

{% block wg_metalinks %}
{% if not snapshot %}
<a href="/feed/wgcomments/{{ wg.acronym }}/">Atom feed</a>
{% endif %}
{% endblock %}

{% block charter_text %}
{% ifnotequal charter.rev "" %}
<p>Other versions: <a href="{{ charter_text_url }}{{charter.name}}-{{rev}}.txt">plain text</a></p>

<h3>Charter {{ charter.name }}-{{ rev }}</h3>

<div class="markup_draft">
{{ content|fill:"80"|safe|linebreaksbr|keep_spacing|sanitize_html|safe }}
</div>

{% else %}
<h3>The WG does not yet have a charter</h3>
{% endifnotequal %}
{% endblock %}{# charter_text #}

