{# List school section #}

{% extends 'admin/_base_admin.html.twig' %}
{% set menu_section = true %}
{% block title %}Niveau{% endblock %}
{% block content %}
    <div class="row">
        <div class="col-md-12">
            <div class="bgc-white bd bdrs-3 p-20 mB-20">
                <div class="row">
                    <div class="col-md-6">
                        <h4 class="c-grey-900 mB-20">Liste des sections</h4>
                    </div>
                    <div class="col-md-6 text-right">
                        <a href="{{ path('section_manage') }}" class="btn btn-primary">Nouveau</a>
                    </div>
                </div>
                <div class="col-md-12">
                    {% for section in sections %}
                        <div class="col-md-3">
                            <div class="layers bd bgc-white p-20 google-shadow">
                                <div class="layer w-100 text-center mB-10">
                                    <h4 class="lh-1">{{ section.name }}</h4>
                                </div>
                                {% if is_granted('ROLE_ADMIN') or is_granted('ROLE_DIRECTION') %}
                                    <div class="w-100 d-block text-center">
                                        <a class="btn btn-outline-success" title="Modifier"
                                           href="{{ path('section_manage',{'id': section.id}) }}">
                                            <i class="ti-pencil"></i>
                                        </a>
                                        <a class="btn btn-outline-primary" title="Liste classe"
                                           href="{{ path('class_room_list',{'id': section.id}) }}">
                                            <i class="ti-list"></i>
                                        </a>
                                        <a class="btn btn-outline-danger" title="Supprimer"
                                           href="{{ path('section_remove',{'id':section.id}) }}">
                                            <i class="ti-trash"></i>
                                        </a>
                                    </div>
                                {% endif %}
                            </div>
                        </div>
                    {% endfor %}
                </div>
            </div>
        </div>
    </div>
{% endblock %}
