{% extends "layout.html" %}
{% load currency_filters %}
{% load i18n %}

{% block title %}
{% trans 'Address book' %} | {{ block.super }}
{% endblock %}

{% block breadcrumbs %}
<ul class="breadcrumb">
    <li>
        <a href="{% url promotions:home %}">{% trans 'Home' %}</a>
        <span class="divider">/</span>
    </li>
    <li>
        <a href="{% url customer:summary %}">{% trans 'Account' %}</a>
        <span class="divider">/</span>
    </li>
    <li class="active"><a href=".">{% trans 'Address book' %}</a></li>
</ul>
{% endblock %}

{% block header %}
<div class="page-header">
    <h2>{% trans 'Address Book' %}</h2>
</div>
{% endblock header %}

{% block content %}

{% if addresses %}
    <table class="table table-striped table-condensed table-bordered">
        <tbody>
            <tr>
                <th>Address</th>
                <th></th>
            </tr>
            {% for address in addresses %}
                <tr>
                    <td>
                        <address>
                        {{ address.summary }}
                        </address>
                    </td>
                    <td>
                        <a class="btn btn-primary" href="{% url customer:address-detail address.id %}">{% trans 'Edit' %}</a>
                        <a class="btn btn-danger" href="{% url customer:address-delete address.id %}">{% trans 'Delete' %}</a>
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% else %}
{% trans 'There are no addresses in your address book.' %}
{% endif %}

<div class="form-actions"><a href="{% url customer:address-create %}" class="btn btn-primary">{% trans 'Add a New Address' %}</a></div>

{% if page_obj %}
    {% include "catalogue/partials/pagination.html" %}
{% endif %}


{% endblock content %}

