{% extends "pretixpresale/organizers/customer_base.html" %}
{% load i18n %}
{% load icon %}
{% load eventurl %}
{% block title %}{% trans "Addresses" %}{% endblock %}
{% block inner %}
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">
                {% icon "address-card-o" %}
                <b>{% trans "Addresses" %}</b> ({{ page_obj.paginator.count }})
            </h3>
        </div>
        <div class="panel-body">
            {% if invoice_addresses %}
                <ul class="full-width-list alternating-rows account-addresses">
                    <li class="row">
                    {% for ia in invoice_addresses %}
                        {% if forloop.counter0 and forloop.counter0|divisibleby:4 %}
                            </li>
                            <li class="row">
                        {% endif %}
                        <div class="col-md-3 col-xs-12">
                            <address>{{ ia.describe|linebreaksbr }}</address>
                            <p class="blank-after">
                                <a href="{% abseventurl request.organizer "presale:organizer.customer.address.delete" id=ia.id %}"
                                   class="btn btn-danger btn-sm">
                                    {% icon "trash" %}
                                    {% trans "Delete" %}
                                </a>
                            </p>
                        </div>
                    {% endfor %}
                    </li>
                </ul>
            {% else %}
                <p class="text-center">{% trans "You don’t have any addresses in your account yet." %}</p>
            {% endif %}
        </div>
    </div>
    {% include "pretixcontrol/pagination.html" %}
{% endblock %}
