{% extends "committees/base.html" %}
{% block page-class %}gov{% endblock %}
{% block title %}{{object}} at {% endblock %}

{% load humanize markup typogrify %}

{% block body %}
  <div class="grid_12 page">
    <h2>Governance</h2>
  </div>

  <div class="grid_4">
    <h3>{{object}}</h3>
    {{object.description|typogrify|markdown}}
  </div>

  <div class="grid_4">
  {% if members or object.members %}
  <h3>Members</h3>
  <ul class="board">
    {% if object.current_terms %}
    {% for t in object.current_terms %}
    <li>{% if t.alternate %}<span class="alt">Alt.</span> {% endif %}{{t.office.title}}<a href="{{t.get_absolute_url}}"> {{t.person}}</a> {{m.start_date|date:"Y"}}</li>
    {% endfor %}
    {% endif %}
    {% if object.members.all %}
    {% for p in object.members.all %}
    <li>{% if p.email %}<a href="mailto:{{p.email}}">{% endif %}{{p}}{% if p.email %}</a>{% endif %}</li>
    {% endfor %}
    {% endif %}
  </ul>
  {% endif %}
</div>

<div class="grid_4 last">
    {% if object.meeting_set.all %}
    <h3>Meetings of the {{object}}</h3>
    <ul>
    {% for m in object.meeting_set.all|dictsortreversed:"start" %}
    <li><a href="{{m.get_absolute_url}}">{{m.start|naturalday}}</a></li>
    {% endfor %}
    </ul>
    {% endif %}
  </div>
{% endblock %}

