{% extends "oscar/communication/email/email_list.html" %}
{% load i18n %}

{% block tabcontent %}
{% if emails %}
<table class="table table-card">
    <thead>
        <tr>
            <th class="border-0">{% trans 'Subject' %}</th>
            <th class="border-0">{% trans 'Date sent' %}</th>
        </tr>
    </thead>
    <tbody>
        {% for email in emails %}
        <tr>
            <td class="table-row-header">
                <a class="text-dark stretched-link" 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 %}