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

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

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

{% block header %}
<div class="page-header">
    <h2>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 %}">Edit</a> 
						<a class="btn btn-danger" href="{% url customer:address-delete address.id %}">Delete</a>
            		</td>
            	</tr>
            {% endfor %}
    	</tbody>
    </table>
{% else %}
There are no addresses in your address book.
{% endif %}

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

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


{% endblock content %}

