{% extends "oscar/customer/baseaccountpage.html" %}
{% load i18n %}
{% block tabcontent %}
    {% if emails %}
        <table class="table table-striped table-bordered">
            <thead>
                <tr>
                    <th>{% trans 'Subject' %}</th>
                    <th>{% trans 'Date sent' %}</th>
                </tr>
            </thead>
            <tbody>
                {% for email in emails %}
                    <tr>
                        <td>
                            <a href="{% url 'customer:email-detail' email_id=email.id %}">
                                {{ email.subject }}
                            </a>
                        </td>
                        <td>{{ email.date_sent }}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
        {% include "oscar/partials/pagination.html" %}
    {% else %}
        <p>
            {% trans 'No emails found' %}
        </p>
    {% endif %}
{% endblock tabcontent %}
