nineskeletor/templates/Pagetemplate/list.html.twig

59 lines
1.7 KiB
Twig

{% extends 'base.html.twig' %}
{% block body %}
<h1 class="page-header">
Gestion des Modèles de Page
</h1>
<p>
<a href="{{ path('app_'~access~'_pagetemplate_submit') }}" class="btn btn-success">Ajouter un Modèle</a>
</p>
{% if app.session.flashbag.has('error') %}
<div class='alert alert-danger' style='margin: 5px 0px'>
<strong>Erreur</strong><br>
{% for flashMessage in app.session.flashbag.get('error') %}
{{ flashMessage }}<br>
{% endfor %}
</div>
{% endif %}
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des Modèles
</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="140px" class="no-sort">Action</th>
<th>Ordre</th>
<th>Nom</th>
<th>Pour</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
{% endblock %}
{% block localscript %}
<script>
$(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_'~access~'_pagetemplate_tablelist') }}",
});
});
</script>
{% endblock %}