{% extends "layout.html" %}

{% load i18n %}

{% block title %}
{% trans 'Email history' %} | {{ block.super }}
{% endblock %}

{% block body_class %}account-pages{% 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">{% trans 'Email history' %}</li>
</ul>
{% endblock %}

{% block headertext %}
{% trans 'Account' %}
{% endblock %}

{% block subnavigation %}
    {% include "partials/nav_profile.html" with email_history="active" %}
{% endblock %}

{% block subheader %}
<div class="sub-header">
    <h2>{% trans 'Email history' %}</h2>
</div>
{% endblock subheader %}

{% block content %}
	<table class="table table-striped table-bordered">
		<tr>
			<th>{% trans 'Date sent' %}</th>
			<th>{% trans '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">{% trans 'View' %}</a>
			</td>
		</tr>
		{% endfor %}
	</table>
{% endblock content %}

