{# emploi du temps #}

{% extends 'admin/_base_admin.html.twig' %}

{% set menu_section = true %}
{% block title %}Emploie du temps{% 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">Emploie du temps {{ class.name }}</h4>
                    </div>
                    <div class="col-md-6 text-right">
                        <a href="{{ path('edt_manage',{"classe":class.id }) }}"
                           class="btn btn-primary">Nouveau</a>
                    </div>
                </div>
                <table id="dataTable" class="table table-striped table-bordered" cellspacing="0" width="100%">
                    <thead>
                    <tr>
                        <th>Heure</th>
                        <th>Jours</th>
                        <th>Matière</th>
                        <th>Action</th>
                    </tr>
                    </thead>
                    <tfoot>
                    <tr>
                        <th>Heure</th>
                        <th>Jours</th>
                        <th>Matière</th>
                        <th>Action</th>
                    </tr>
                    </tfoot>
                    <tbody>
                    {% for edt in edt %}
                        <tr>
                            <td>{{ edt.heure }}</td>
                            <td>{{ edt.jour }}</td>
                            <td>{{ edt.matiere?edt.matiere.name : '' }}</td>
                            <td>
                                <a class="btn btn-outline-success btn-sm" title="Modifier"
                                   href="{{ path('edt_manage',{'classe':class.id,'id':edt.id}) }}">
                                    <i class="ti-pencil"></i>
                                </a>
                                <a class="btn btn-outline-danger btn-sm" title="Supprimer"
                                   href="{{ path('remove_edt',{'id':edt.id}) }}">
                                    <i class="ti-trash"></i>
                                </a>
                            </td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
{% endblock %}
