{% extends "base.html" %}
{% load i18n %}

{% block head_title %}
    {% trans "Member detail" %}
{% endblock %}

{% block content %}

    <div class="content-view">
    <h1>
        {{ member.username }}
    </h1>

    <hr>

    <h3>{% trans "Membership" %}</h3>

    {% if subscription_periods %}
        <table class="table">
            <thead>
            <tr>
                <th>{% trans "Start" %}</th>
                <th>{% trans "End" %}</th>
                <th>{% trans "Has membership" %}</th>
                <th>{% trans "Actions" %}</th>
            </tr>
            </thead>
            <tbody>
            {% for period in subscription_periods %}
                <tr {% if not period.period.upper %}class="table-active"{% endif %}>
                    <td>{{ period.period.lower }}</td>
                    <td>{{ period.period.upper }}</td>
                    <td>{{ period.membership_exists }}</td>
                    <td></td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    {% else %}
        {% trans "No memberships" %}
    {% endif %}
    </div>

{% endblock %}
