<commit_before>{% load i18n avatar_tags pagination_tags truncchar_tag %}
{% load cms_tags sekizai_tags shared_azul shared_verde threaded_azul %}

    <form id="batch-update" action="{% url 'tm:messages_batch_update' %}" method="post">
        {% csrf_token %}
        <table class="inbox table table-striped table-hover">
            <thead>
                <tr class="message message-header">
                    <!--Row table headers: (1)Bulk action dropdown, (2)Participants/Sender, (3)Date/Time, (4)Subject -->
                    <th class="span1" style="padding-left: 0;">
                        <div class="btn-group dropdown">
                            <button class="btn btn-small btn-default dropdown-toggle bulkaction" style="padding: 2px 7px;"
                                    data-toggle="dropdown" disabled=true>
                                <i class="icon-cog"></i><span class="caret"></span></button>
                            <ul class="dropdown-menu">
                                {% if page_type == "archive" %}
                                <li id="undelete-li" class="batch-action"><i class="icon-inbox"></i>&nbsp;{% trans "unarchive" %}</li>
                                {% else %}
                                <li id="delete-li" class="batch-action"><i class="icon-folder-close"></i>&nbsp;{% trans "archive" %}</li>
                                {% endif %}
                                <li id="unread-li" class="batch-action"><i class="icon-envelope"></i>&nbsp;{% trans "unread" %}</li>
                                <li id="read-li" class="batch-action"><i class="icon-check"></i>&nbsp;{% trans "read" %}</li>
                            </ul>
                        </div>
                        <button id="unread-btn" type="submit" name="action" value="unread" class="hidden"></button>
                        <button id="read-btn" type="submit" name="action" value="read" class="hidden"></button>
                        <button id="delete-btn" type="submit" name="action" value="delete" class="hidden"></button>
                        <button id="undelete-btn" type="submit" name="action" value="undelete" class="hidden"></button>
                    </th>
                    <th class="sender span5"><h5>{{header}}</h5></th>
                    <th class="subject span6"><h5>{% trans "Subject" %}</h5></th>
                </tr>
            </thead>
            <tbody>
            {% for message in thread_list %}
              <tr class="{% if message.new %}success{% endif %}" data-url="{{ message.thread.get_absolute_url }}">
                  <td class="checkbox span1">
                    <input name="batchupdateids" type="checkbox" value="{{message.thread.pk}}" />
                  </td>
                  <td class="clickablerow sender span5">
                      {% if header == "Sender" %}
                        {% with message.thread.latest_msg.sender as sender %}
                            <span class="participant" title="{{ message.thread.latest_msg.sender }}">{{ sender.first_name }} {{ sender.last_name }}</span>&nbsp; &nbsp;
                        {% endwith %}
                      {% else %}
                        {% if message.others|length < 1 %}
                          <span class="participant" title="{{ message.thread.creator.full_name }}">{{ message.thread.creator.first_name }}</span>
                        {% endif %}
                        {% for p in message.others %}
                            {% if forloop.counter < 3 %}
                              <span class="participant" title="{{ p.user.full_name }}">{{ p.user.first_name }}</span>{% if forloop.last %}&nbsp;{% else %}, {% endif %}
                            {% elif forloop.last %}
                              <span class="participant" title="{{ p.user.full_name }}">{{ p.user.first_name }}</span>
                                  {% if forloop.counter != 3 %}
                                  <span class="participant others">+ {{ forloop.counter|add:"-3" }} others</span>
                                  {% endif %}
                            {% endif %}
                        {% endfor %}
                      {% endif %}
                      <span class="date"><em>{{ message.thread.latest_msg.sent_at|pretty_date }}</em></span>
                  </td>

                  <td class="clickablerow subject span6">
                    <a href="{{ message.thread.get_absolute_url }}">{% if message.new %}
                        <strong>{% endif %}{{ message.thread.subject|truncchar:30|safe }}{% if message.new %}</strong>{% endif %}</a>
                    <span class="message-tease muted">{{ message.thread.latest_msg.body|truncatewords:6|clean_with_bleach|safe }}</span>
                    <span class="pull-right label">{{ message.thread.all_msgs.count }}</span>
                  </td>

                  {% if message.replied %}{% endif %}
                  {% if message.new %}{% endif %}
              </tr>
            {% empty %}
                <tr class="message unread">
                    <td class="no-message"><em>{% trans "No messages found" %}</em></td><td></td><td></td>
                </tr>
            {% endfor %}
            </tbody>
</table>
    </form>
    <div class="messages-footer">
        <div class="pagination">
            <ul>
                {% if thread_list.has_previous %}<commit_msg>Added date column<commit_after>{% load i18n avatar_tags pagination_tags truncchar_tag %}
{% load cms_tags sekizai_tags shared_azul shared_verde threaded_azul %}

    <form id="batch-update" action="{% url 'tm:messages_batch_update' %}" method="post">
        {% csrf_token %}
        <table class="inbox table table-striped table-hover">
            <thead>
                <tr class="message message-header">
                    <!--Row table headers: (1)Bulk action dropdown, (2)Participants/Sender, (3)Date/Time, (4)Subject -->
                    <th class="span1" style="padding-left: 0;">
                        <div class="btn-group dropdown">
                            <button class="btn btn-small btn-default dropdown-toggle bulkaction" style="padding: 2px 7px;"
                                    data-toggle="dropdown" disabled=true>
                                <i class="icon-cog"></i><span class="caret"></span></button>
                            <ul class="dropdown-menu">
                                {% if page_type == "archive" %}
                                <li id="undelete-li" class="batch-action"><i class="icon-inbox"></i>&nbsp;{% trans "unarchive" %}</li>
                                {% else %}
                                <li id="delete-li" class="batch-action"><i class="icon-folder-close"></i>&nbsp;{% trans "archive" %}</li>
                                {% endif %}
                                <li id="unread-li" class="batch-action"><i class="icon-envelope"></i>&nbsp;{% trans "unread" %}</li>
                                <li id="read-li" class="batch-action"><i class="icon-check"></i>&nbsp;{% trans "read" %}</li>
                            </ul>
                        </div>
                        <button id="unread-btn" type="submit" name="action" value="unread" class="hidden"></button>
                        <button id="read-btn" type="submit" name="action" value="read" class="hidden"></button>
                        <button id="delete-btn" type="submit" name="action" value="delete" class="hidden"></button>
                        <button id="undelete-btn" type="submit" name="action" value="undelete" class="hidden"></button>
                    </th>
                    <th class="sender span2"><h5>{{header}}</h5></th>
                    <th class="span2">Date</th>
                    <th class="subject span7"><h5>{% trans "Subject" %}</h5></th>
                </tr>
            </thead>
            <tbody>
            {% for message in thread_list %}
              <tr class="{% if message.new %}success{% endif %}" data-url="{{ message.thread.get_absolute_url }}">
                  <td class="checkbox">
                    <input name="batchupdateids" type="checkbox" value="{{message.thread.pk}}" />
                  </td>
                  <td class="clickablerow sender">
                      {% if header == "Sender" %}
                        {% with message.thread.latest_msg.sender as sender %}
                            <span class="participant" title="{{ message.thread.latest_msg.sender }}">{{ sender.first_name }} {{ sender.last_name }}</span>&nbsp; &nbsp;
                        {% endwith %}
                      {% else %}
                        {% if message.others|length < 1 %}
                          <span class="participant" title="{{ message.thread.creator.full_name }}">{{ message.thread.creator.first_name }}</span>
                        {% endif %}
                        {% for p in message.others %}
                            {% if forloop.counter < 3 %}
                              <span class="participant" title="{{ p.user.full_name }}">{{ p.user.first_name }}</span>{% if forloop.last %}&nbsp;{% else %}, {% endif %}
                            {% elif forloop.last %}
                              <span class="participant" title="{{ p.user.full_name }}">{{ p.user.first_name }}</span>
                                  {% if forloop.counter != 3 %}
                                  <span class="participant others">+ {{ forloop.counter|add:"-3" }} others</span>
                                  {% endif %}
                            {% endif %}
                        {% endfor %}
                      {% endif %}
                  </td>
                    <td><span class="date"><em>{{ message.thread.latest_msg.sent_at|pretty_date }}</em></span></td>
                  <td class="clickablerow subject">
                    <a href="{{ message.thread.get_absolute_url }}">{% if message.new %}
                        <strong>{% endif %}{{ message.thread.subject|truncchar:30|safe }}{% if message.new %}</strong>{% endif %}</a>
                    <span class="message-tease muted">{{ message.thread.latest_msg.body|truncatewords:6|clean_with_bleach|safe }}</span>
                    <span class="pull-right label">{{ message.thread.all_msgs.count }}</span>
                  </td>

                  {% if message.replied %}{% endif %}
                  {% if message.new %}{% endif %}
              </tr>
            {% empty %}
                <tr class="message unread">
                    <td class="no-message"><em>{% trans "No messages found" %}</em></td><td></td><td></td>
                </tr>
            {% endfor %}
            </tbody>
</table>
    </form>
    <div class="messages-footer">
        <div class="pagination">
            <ul>
                {% if thread_list.has_previous %}
{'fraction_non_alphanumeric': 0.16366145354185832, 'fraction_numerical': 0.004599816007359705, 'mean_word_length': 1.4985060905538956, 'pattern_counts': {'":': 0, '<': 209, '<?xml version=': 0, '>': 205, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '835657', 'n_tokens_mistral': 3072, 'n_tokens_neox': 2753, 'n_words': 569}