{# List school section #}

{% extends 'admin/_base_admin.html.twig' %}
{% set menu_section = true %}
{% block title %}Classe{% 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 classes dans {{ section.name }}</h4>
                    </div>
                    <div class="col-md-6 text-right">
                        <a href="{{ path('class_room_manage',{"section":section.id }) }}" class="btn btn-primary">Nouveau</a>
                    </div>
                </div>
                <div class="col-md-12">
                    {% for classe in classes %}
                        <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">{{ classe.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('class_room_manage',{'section':section.id,'id': classe.id}) }}">
                                            <i class="ti-pencil"></i>
                                        </a>
                                        <a class="btn btn-outline-info" title="Emploi du temps"
                                           href="{{ path('list_edt',{'id': classe.id}) }}">
                                            <i class="ti-calendar"></i>
                                        </a>
                                        <a class="btn btn-outline-primary" title="Liste des matières"
                                           href="{{ path('class_subject_list',{'id': classe.id}) }}">
                                            <i class="ti-book"></i>
                                        </a>
                                        <a class="btn btn-outline-warning" title="Liste des étudiants"
                                           href="{{ path('student_list',{'id': classe.id}) }}">
                                            <i class="fa fa-group"></i>
                                        </a>
                                        <a class="btn btn-outline-danger" title="Supprimer"
                                           href="{{ path('class_room_remove',{'id':classe.id}) }}">
                                            <i class="ti-trash"></i>
                                        </a>
                                    </div>
                                {% endif %}
                            </div>
                        </div>
                    {% endfor %}
                </div>
            </div>
        </div>
    </div>
{% endblock %}
