{% extends 'base.html' %}

{% block title %}{{title}}{% endblock title %}

{% block content %}

<h3>{{title}}</h3>

<p>Total: {{DATA|length}}</p>

<table class="table table-striped">
    {% include '_headers.html' %}
    {% for item in DATA %}
    <tr>
        <td nowrap="nowrap">{{item._id|default(loop.index, true)}}</td>
        <td nowrap="nowrap">{{item.partner_jid|default('', true)}}</td>
        <td nowrap="nowrap">{{item.display_name|default('', true)}}</td>
        <td>{{item.body|default('', true)|e|nl2br}}</td>
        <td nowrap="nowrap">{{item.type|default('', true)}}</td>
        <td nowrap="nowrap">{{item.timestamp|default('', true)}}</td>
    </tr>
    {% endfor %}
</table>

{% endblock content %}