{% load afat %}
{% load evelinks %}
{% load i18n %}

<div id="tab-members" class="tab-pane fade card card-default border-0" role="tabpanel" aria-labelledby="tab-fats">
    <div class="card-body">
        <h3>
            {{ alliance }} {% translate "Member corporations" as header_title %}
        </h3>

        <table class="table table-striped table-hover w-100" id="member-corps">
            <thead>
                <tr>
                    <th>{% translate "Corporation" %}</th>
                    <th>{% translate "FATs" %}</th>
                    <th>{% translate "Avg FATs" %}</th>
                    <th><!-- {% translate "Corporation statistics" %} --></th>
                </tr>
            </thead>

            <tbody>
                {% for key, value in corps.items %}
                    <tr>
                        <td><img class="rounded me-3" src="{{ value.0|corporation_logo_url:32 }}" alt="{{ key }}">{{ key }}</td>
                        <td>{{ value.1 }}</td>
                        <td>{{ value.2 }}</td>
                        <td class="text-end">
                            <a
                                class="btn btn-primary btn-sm"
                                href="{% url 'afat:statistics_corporation' value.0 year month %}"
                                data-bs-toggle="tooltip"
                                data-bs-html="true"
                                data-bs-title="{% translate 'View detailed corporation statistics for: ' %}<br>{{ month|month_name }} {{ year }}"
                            >
                                <i class="fa-solid fa-eye"></i>
                            </a>
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</div>
