{% extends "webapp:base.html" %}
{% block content %}

{% load i18n %}

<div class="contact_div">
    {% load static %}
    <link rel="stylesheet" href="{% static "css/contact.css" %}">
        <h2>{% trans "Contact" %}</h2>
                               
        {% if committees %}
            {% for committee in committees %}
                <!--Committee title-->
                <h4>{{ committee.name }}</h4>
                {% for role in committee.current_roles %}
                    {% for official in role.official.all %}
                        <div class="role-container">
                            <div class="row">
                                <div class="col">
                                    <img src="static/img/missing.png">
                                </div>
                            </div>
                            <div class="row">
                                    <div class="col">
                                        <h5>{{role.name}}</h5>
                                        <p>{{official.first_name}} 
                                            {{official.last_name}}
                                            {{official.email}}</p>
                                    </div>
                            </div>
                        </div>
                    {% endfor %}
                {% endfor %}
            {% endfor %}
        {% else%}
            <p>Ei Toimikuntia</p>
        {% endif %}
</div>

{% endblock %}
