{% load i18n %}

{% if not alliance %}
    <div class="alert alert-info" role="alert">
        {% translate "Alliance not found." %}
    </div>
{% else %}
    <div class="card-header bg-primary rounded-top d-flex align-items-center mt-4">
        <h3 class="text-white">{% translate "Alliance" %}</h3>
    </div>
    <div class="card-body bg-secondary">
        <ul class="card-characters">
            <div class="card">
                <!-- Alliance Name -->
                <div class="card-header text-center">
                    {{ alliance.alliance_name }} {{ alliance.get_status.bootstrap_icon }}
                </div>
                <!-- Alliance Logo -->
                <div class="card-body text-center">
                    <a href="{% url 'ledger:alliance_ledger' alliance_id=alliance.alliance_id %}?single=True">
                        <img src="{{ alliance.logo_url_256 }}">
                    </a>
                </div>
                <!-- Alliance Actions -->
                <div class="card-footer text-center">
                    <a class="btn btn-success btn-sm"
                        href="{% url 'ledger:alliance_ledger' alliance_id=alliance.alliance_id %}?single=True"
                        role="button"
                        data-tooltip-toggle="ledger-tooltip"
                        title="{% translate 'View Alliance Ledger' %}">
                        <i class="fas fa-sign-in-alt"></i>
                    </a>
                </div>
            </div>
        </ul>
    </div>
{% endif %}
