{% trans_default_domain 'contao_tl_undo' %}

<div class="tl_undo_header">
    <div class="tstamp">
        <span class="date">{{ row.tstamp|date(dateFormat) }}</span>
        <span class="time">{{ row.tstamp|date(timeFormat) }}</span>
    </div>
    <div>
        {{ 'tl_undo.pid.0'|trans }}: <strong>{% if user %}{{ user.username }}{% else %}{{ row.pid }}{% endif %}</strong>
    </div>
    <div class="source">
        {{ 'tl_undo.fromTable.0'|trans }}: <strong>{{ fromTable }}.{{ originalRow.id }}</strong>
    </div>
    {% if parent %}
        <div>
            {{ 'MSC.parent'|trans({}, 'contao_default') }}: <strong>{{ parent.table }}.{{ parent.id }}</strong>
        </div>
    {% endif %}
</div>

{% if preview is not empty %}
    <div class="tl_undo_preview" inert>
        {% if preview is not iterable %}
            {{ preview|sanitize_html('contao') }}
        {% else %}
            <table>
                <tr>
                    {% for value in preview %}
                        <td>{{ value|sanitize_html('contao') }}</td>
                    {% endfor %}
                </tr>
            </table>
        {% endif %}
    </div>
{% endif %}
