{% extends "layout.html" %}

{% block title %}
Email history | {{ 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=".">Email history</a></li>
</ul>
{% endblock %}

{% block header %}
<div class="page-header">
    <h2>Email history</h2>
</div>
{% endblock header %}

{% block content %}
	<table class="table table-striped table-bordered">
		<tr>
			<th>Date sent</th>
			<th>Subject</th>
			<th></th>
		</tr>
		{% for email in emails %}
		<tr>
			<td>{{ email.date_sent }}</td>
			<td>{{ email.subject }}</td>
			<td>
				<a href="{% url customer:email-detail email.id %}" class="btn btn-info">View</a>
			</td>
		</tr>
		{% endfor %}
	</table>
{% endblock content %}

