{% extends "base_widget.html" %}
{% load extras %}
{% load staticfiles %}
{% block title %}{{ committee.name }}{% endblock %}
{% block content %}
    <div class="row-fluid">
        <div class="col-xs-12">
            <h1>
                <a href="/committee/{{committee.slug}}/" target="_blank" title="View on {{ CITY_NAME_SHORT }} Councilmatic">{{committee.name}}</a>
            </h1>
                <p>Responsible for: {{committee_description}}</p>

        </div>
    </div>

    {% if committee.memberships.all %}
    <div class="row-fluid">
        <div class="col-xs-5">
            <p>
                <strong>
                    <i class='fa fa-fw fa-users'></i>
                    Members
                </strong><br/>
                {{ committee.memberships.all|length }}
            </p>
        </div>
        <div class="col-xs-7">
            <p>
                <strong>
                    <i class='fa fa-fw fa-user'></i>
                    Chairperson
                </strong><br/>
                {% for membership in committee.chairs %}
                {{ membership.person.link_html | safe }}<br/>
                {% endfor %}
            </p>
        </div>
    </div>
    {% endif %}

    {% if committee.upcoming_events %}
    <div class="row-fluid">
        <div class="col-xs-12">
            <p>
                <strong>
                    <i class='fa fa-fw fa-calendar-o'></i> 
                    Next Committee {{ CITY_VOCAB.EVENTS }}
                </strong>
            </p>
            {% for event in committee.upcoming_events|slice:"3" %}
                <p class='event-listing'>
                    {{event.start_time | date:'n/d/Y' }} - {{event.link_html | safe}}
                </p>
            {% endfor %}
        </div>
    </div>
    {% endif %}


{% endblock %}