{% extends "::admin.html.twig" %}

{% block title %}Лог{% endblock %}

{% block body %}

<form action="{{admin_action}}" method="Post">

{% if data %}

<table class="admin-table" cellspacing="0" cellpadding="5" width="100%">
    <tr>
        <th align="left" valign="top" width="0%" nowrap="nowrap">
            x
        </th>
        <th align="left" valign="top" width="0%" nowrap="nowrap">
            ID
        </th>
        <th align="left" valign="top" width="10%" nowrap="nowrap">
            Область
        </th>
        <th align="left" valign="top" width="20%" nowrap="nowrap">
            Пользователь
        </th>
        <th align="left" valign="top" width="40%" nowrap="nowrap">
            Текст
        </th>
        <th align="left" valign="top" width="10%" nowrap="nowrap">
            IP
        </th>
        <th align="left" valign="top" width="10%" nowrap="nowrap">
            Cookie-идентификатор
        </th>
        <th align="left" valign="top" width="10%" nowrap="nowrap">
            Время отправки
        </th>
    </tr>
    {% for item in data %}
    <tr class="admin-table-data-row">
        <td align="left" valign="top">
            <input id="check{{ item.id }}" type="checkbox" name="check[]" value="{{ item.id }}" />
        </td>
        <td align="left" valign="top">
            {{ item.id }}
        </td>
        <td align="left" valign="top">
            {{ item.scope }}
        </td>
        <td align="left" valign="top">
            {{ item.user|raw }}
        </td>
        <td align="left" valign="top">
            {{ item.text|raw }}
        </td>
        <td align="left" valign="top">
            {{ item.ip }}
        </td>
        <td align="left" valign="top">
            {{ item.cookie_id }}
        </td>
        <td align="left" valign="top">
            {{ item.time }}
        </td>
    </tr>
    {% else %}            
    <tr>
        <td align="left" valign="top" colspan="10">
            Нет записей
        </td>
    </tr>
    {% endfor %}        
</table>

{{ pager|raw }}

<div class="comments-admin-submit">
    <div id="comments-admin-submit-label">
        Действия над отмеченными:
    </div>
    <input id="comments-admin-submit-delete" type="submit" name="delete" value="Удалить" />
</div>
</form>     

{% endif %}
{% endblock %}