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

{% block admin_content %}
    {% embed '@ChillMain/CRUD/_index.html.twig' %}
        {% block table_entities_thead_tr %}
            <th>id</th>
            <th>{{ 'label'|trans }}</th>
            <th>{{ 'icon'|trans }}</th>
            <th>{{ 'gender.genderTranslation'|trans }}</th>
            <th>{{ 'active'|trans }}</th>
            <th>{{ 'ordering'|trans }}</th>
            <th></th>
        {% endblock %}
        {% block table_entities_tbody %}
            {% for entity in entities %}
                <tr>
                    <td>{{ entity.id }}</td>
                    <td>{{ entity.label|localize_translatable_string }}</td>
                    <td>{{ entity.icon|chill_entity_render_box }}</td>
                    <td>{{ entity.genderTranslation.value }}</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>{{ entity.order }}</td>
                    <td>
                        <ul class="record_actions">
                            <li>
                                <a href="{{ chill_path_add_return_path('chill_crud_main_gender_edit', { 'id': entity.id}) }}" class="btn btn-sm btn-edit btn-mini"></a>
                            </li>
                        </ul>
                    </td>
                </tr>
            {% endfor %}
        {% endblock %}

        {% block actions_before %}
            <li class='cancel'>
                <a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
            </li>
        {% endblock %}
    {% endembed %}
{% endblock %}
