nineskeletor/templates/Pagetemplate/list.html.twig

59 lines
1.7 KiB
Twig
Raw Normal View History

2023-01-12 16:14:31 +01:00
{% extends 'base.html.twig' %}
{% block body %}
<h1 class="page-header">
Gestion des Modèles de Page
</h1>
<p>
2023-01-23 09:46:34 +01:00
<a href="{{ path('app_'~access~'_template_submit') }}" class="btn btn-success">Ajouter un Modèle</a>
2023-01-12 16:14:31 +01:00
</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,
2023-01-23 09:46:34 +01:00
ajax: "{{ path('app_'~access~'_page_template_tablelist') }}",
2023-01-12 16:14:31 +01:00
});
});
</script>
{% endblock %}