
<div id="threads-pagination"></div>
<table class="mm__threads_table">
  <thead>
    <tr>
      <th>
      </th>
      <th>Thread Status</th>
      <th>Thread Title</th>
      <th>Member</th>
      <th>Assigned Admin</th>
      <th>Thread Category</th>
      <th>Date Sent</th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    {% if threads|length > 0 %}
      {% for thread in threads %}
        <tr class=" {{ thread.getUnreadStatusString(true) }}">
          <td>
            <input class="thread-checkbox" type="checkbox" value="{{ thread.id }}">
          </td>
          <td class="thread-status" data-status="{{ thread.status }}">{{ thread.status_name|e }}</td>
          <td>{{ thread.title|e }}</td>
          <td>{{ thread.getThreadMemberName()|e }}</td>
          <td>{{ thread.getThreadAdminName()|e }}</td>
          <td>{{ thread.category_name|e }}</td>
          <td>{{ thread.latestMessage.created_at|e }}</td>
          <td>
            <a class="view-message" href="{{ route('admin.messaging.view_thread', thread.url) }}">
              <i class="fa fa-eye"></i>
            </a>
          </td>
        </tr>
      {% endfor %}
    {% else %}
      <tr>
        <td colspan="7" class="no-messages">
          There are no messages
        </td>
      </tr>
    {% endif %}
  </tbody>
</table>
