{% extends "record_base.html.j2" %}
{% block table %}
<table>
    <thead>
        <tr class="table100-head">
            <th>Game</th>
            <th>Time</th>
            <th>Guild</th>
            <th>Channel</th>
            <th>Format</th>
            <th>Link</th>
            <th>User Name</th>
            <th>User ID</th>
            <th>Points</th>
        </tr>
    </thead>
    <tbody id="rows">
        {% for record in records %}
            <tr>
                <td><a href="https://discordapp.com/channels/{{record.guild}}/{{record.channel}}/{{record.message}}">SB#{{record.id}}</a></td>
                {% if tz_offset and tz_name %}
                    <td>{{record.updated_at | humanize(tz_offset, tz_name)}}</td>
                {% else %}
                    <td class="timestamp">{{record.updated_at}}</td>
                {% endif %}
                <td><a href="https://discordapp.com/channels/{{record.guild}}">{{record.guild_name}}</a></td>
                <td><a href="https://discordapp.com/channels/{{record.guild}}/{{record.channel}}">#{{record.channel_name}}</a></td>
                <td>{{record.format}}</td>
                {% if record.link %}
                    <td><a href="{{record.link}}">Open in SpellTable</a><span class="data">{{record.link}}</span></td>
                {% else %}
                    <td>&nbsp;</td>
                {% endif %}
                <td>{{record.user_name | default('Unknown User', true)}}</td>
                <td class="user_id">{{record.user_xid}}</td>
                <td><em>{{record.user_points}}</em></td>
            </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}
