{% extends 'base.html.twig' %}

{% block pagewrapper %}
    <h1 class="page-title">Gestion des Carrousels</h1>

    <p>
    {% if access=="config" %}
        <a class="btn btn-secondary" href="{{ path('app_portal_config_page_view',{id:idpage}) }}">Retour</a>
    {% else %}
        <a class="btn btn-secondary" href="{{ path('app_portal_user_page_view',{id:idpage,usage:usage,group:group}) }}">Retour</a>
    {% endif %}        
        <a class="btn btn-success" href={{ path('app_portal_'~access~'_slide_submit',{idpage:idpage,idwidget:idwidget,usage:usage,group:group}) }}>Ajouter</a>
    </p>
        

    <div class="card">
        <div class="card-header">
            <h3 style="margin:0px"> <i class="fa fa-table"></i> Liste des Carrousels</h2>
        </div>

        <div class="card-body">
            {% for slide in slides %}
                <a href="{{ path('app_portal_'~access~'_slide_update', {idpage:idpage,id:slide.id,usage:usage,group:group}) }}"><img class="icon" height="200px" src="{{ asset(slide.image) }}"></a>
            {% endfor %}
        </div>
    </div>
{% endblock %}

