{% load i18n %}
<table class="table table-striped table-bordered table-hover">
    <tbody>
        <tr>
            <th>{% trans "Product" %}</th>
            <td>
                <a href="{{ alert.product.get_absolute_url }}">
                    {{ alert.product }}
                </a>
            </td>
        </tr>
        <tr>
            <th>{% trans "User" %}</th>
            <td>
                {% if alert.user %}
                    {{ alert.user }}
                {% else %}
                    {{ alert.email }}
                {% endif %}
            </td>
        </tr>
        <tr>
            <th>{% trans "Status" %}</th>
            <td>{{ alert.status }}</td>
        </tr>
        <tr>
            <th>{% trans "Date created" %}</th>
            <td>{{ alert.date_created }}</td>
        </tr>
        {% if not alert.user %}
            <tr>
                <th>{% trans "Date confirmed" %}</th>
                <td>{{ alert.date_confirmed|default:"-" }}</td>
            </tr>
        {% endif %}
        {% if alert.is_cancelled %}
            <tr>
                <th>{% trans "Date cancelled" %}</th>
                <td>{{ alert.date_cancelled }}</td>
            </tr>
        {% else %}
            <tr>
                <th>{% trans "Date alert sent" %}</th>
                <td>{{ alert.date_closed|default:"-" }}</td>
            </tr>
        {% endif %}
    </tbody>
</table>
