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

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

    <p><a class="btn btn-success" href={{ path('app_core_config_niveau02_submit') }}>Ajouter</a></p>
    
    <div class="card">
        <div class="card-header">
            <i class="fa fa-table fa-fw"></i> Liste des {{ labelsniveau02 }}
        </div>

        <div class="card-body">
            <div class="dataTable_wrapper">
                <table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
                    <thead>
                    <tr>
                        <th width="100px" class="no-sort">Action</th>
                        <th width="50%">{{ labelniveau01 }}</th>
                        <th>{{ labelniveau02 }}</th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
{% endblock %}

{% block localjavascript %}
    $(document).ready(function() {
        $('#dataTables').DataTable({
            columnDefs: [ { "targets": 'no-sort', "orderable": false } ],
            responsive: true,
            iDisplayLength: 100,
            order: [[ 1, "asc" ]],
            processing: true,
            serverSide: true,
        	ajax: "{{ path('app_core_config_niveau02_ajax_list') }}",
        });
    });
{% endblock %}
