<table class="threads-list {% if sender_id == -2 %}trash{% endif %}"
    data-sender-id="{{ sender_id }}"
>
{% if threads %}
    {% for thread in threads %}
        {% set thread_data = threads_data[thread.id] %}
        <tr class="thread-heading {{ thread_data['status'] }}"
            data-thread-id="{{ thread.id }}"
        >
            <td class="delete-or-restore"></td>
            <td class="senders">{{ thread_data['senders_info']|escape }}</td>
            <td class="subject">
                {{ thread.headline|escape }}
                {% if thread_data['responses_count'] > 0 %}
                <span class="messages-count">
                    ({{ thread_data['responses_count'] + 1 }})
                </span>
                {% endif %}
            </td>
            <td class="timestamp">{{ thread.last_active_at|timesince }}</td>
        </tr>
    {% endfor %}
{% else %}
    <tr>
        <td class="empty" colspan="3">{% trans %}there are no messages yet...{% endtrans %}</td>
    </tr>
{% endif %}
</table>
