{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}

{% block title %}{{ 'Permissions group list'|trans }}{% endblock %}

{% block admin_content -%}
    <h1>{{ 'Permissions group list'|trans }}</h1>

    <table class="table table-bordered border-dark align-middle">
        <thead>
            <tr>
                <th>{{ 'Name'|trans }}</th>
                <th>{{ 'Actions'|trans }}</th>
            </tr>
        </thead>
        <tbody>
        {% for entity in entities %}
            <tr>
                <td>{{ entity.name }}</td>
                <td>
                    <ul class="record_actions">
                        <li>
                            <a href="{{ path('admin_permissionsgroup_show', { 'id': entity.id }) }}" class="btn btn-show">{{ 'Show'|trans }}</a>
                        </li>
                        <li>
                            <a href="{{ path('admin_permissionsgroup_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'Edit'|trans }}</a>
                        </li>
                    </ul>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    <ul class="record_actions sticky-form-buttons">
        <li class='cancel'>
            <a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
        </li>
        <li>
            <a href="{{ path('admin_permissionsgroup_new') }}" class="btn btn-create">
                {{ 'Create a new permissions group'| trans }}
            </a>
        </li>
    </ul>
{% endblock %}
