{% extends 'Admin/layout.html.twig' %}

{% block javascripts %}
    
{% endblock %}

{% block body %}
    {{ knp_menu_render('actions_actus') }}

    <div class="listDomaines"{% if 'all' == type %} id="sortableLevel1"{% endif %}>
        {% for actu in actus %}
            <div class="containerLevel1 delete-element-container">
                <div class="level1 element row" data-elementid="{{ actu.id|raw }}">
                    <span>
                        <a href="{{ path('admin_actu_edit', {'id':actu.id}) }}">{{ actu.title }}</a> | <strong>{{ actu.menu|raw }}</strong> | <strong>{{ actu.created|date("d/m/Y") }}</strong>
                    </span>

                    <ul class="element-actions">
                        <li>
                            {% if true == actu.featured %}
                                 &hearts;
                            {% endif %}
                        </li>
                        <li>
                            <a class="edit" href="{{ path('admin_actu_edit', {'id':actu.id}) }}">
                                <span>{{ 'action.edit.label'|trans({}, 'action') }}</span>
                            </a>
                        </li>
                        <li>
                            <input
                                {% if true == actu.isactive %} checked="checked"{% endif %}
                                class="input-active"
                                data-type="Content"
                                data-url="{{ path('element_actif')}}"
                                type="checkbox"
                                value="{{ actu.id }}"
                            />
                            <span class="checkbox"></span>
                        </li>
                        <li>
                            <a class="delete-element" href="{{ path('admin_menu_delete', {'id':actu.id, 'type':'Content'}) }}">
                                <span>{{ 'action.delete.label'|trans({}, 'action') }}</span>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        {% endfor %}
    </div>

    {{ include('Admin/Paginator/pagination.html.twig', {pages:pagination|length}) }}
{% endblock %}
