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

{% block admin_content %}
    <h1>{{ 'ActivityType list'|trans }}</h1>

    <table class="records_list">
        <thead>
            <tr>
                <th>{{ 'Name'|trans }}</th>
                <th>{{ 'Active'|trans }}</th>
                <th>{{ 'Actions'|trans }}</th>
            </tr>
        </thead>
        <tbody>
        {% for entity in entities %}
            <tr>
                <td>{{ entity.name|localize_translatable_string }}</td>
                <td style="text-align:center;">
                {%- if entity.active -%}
                    <i class="fa fa-check-square-o"></i>
                {%- else -%}
                    <i class="fa fa-square-o"></i>
                {%- endif -%}
            </td>
                <td>
                <ul class="record_actions">
                    <li>
                        <a href="{{ path('chill_crud_activity_type_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'edit'|trans }}"></a>
                    </li>
                </ul>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

        <ul class="record_actions sticky-form-buttons">
        <li>
            <a href="{{ path('chill_crud_activity_type_new') }}" class="btn btn-create">
                {{ 'Create a new activity type'|trans }}
            </a>
        </li>
    </ul>
    {% endblock %}
