nineskeletor/templates/Page/list.html.twig

59 lines
2.0 KiB
Twig
Raw Normal View History

2023-02-16 17:03:53 +01:00
{% extends "base.html.twig" %}
2023-01-12 16:14:31 +01:00
{% block body %}
<h1 class="page-header">
2023-02-16 17:03:53 +01:00
pages
2023-01-12 16:14:31 +01:00
</h1>
2023-02-16 17:03:53 +01:00
<p><a class="btn btn-success" href={{ path('app_page_submit') }}>Ajouter</a></p>
2023-01-12 16:14:31 +01:00
<div class="card">
<div class="card-header">
2023-02-16 17:03:53 +01:00
<i class="fa fa-table fa-fw"></i> Liste des pages
2023-01-12 16:14:31 +01:00
</div>
<div class="card-body">
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead>
2023-02-16 17:03:53 +01:00
<tr>
<th width="90px" class="no-sort">Action</th>
<th class="no-string" width="70px">ID</th>
<th width="70px">Date</th>
<th width="200px">Type</th>
2023-01-12 16:14:31 +01:00
<th>Nom</th>
2023-02-16 17:03:53 +01:00
</tr>
2023-01-12 16:14:31 +01:00
</thead>
2023-02-16 17:03:53 +01:00
<tbody>
{% for page in pages %}
<tr>
<td>
<a href="{{path("app_child",{catparent:"page",idparent:page.id})}}"><i class="fa fa-file fa-2x"></i></a>
</td>
<td>{{page.id}}</td>
<td>{{page.submitdate|date("Y-m-d")}}</td>
<td>{{page.pagetype.name}}</td>
<td>{{page.name}}</td>
</tr>
{% endfor %}
</tbody>
2023-01-12 16:14:31 +01:00
</table>
</div>
</div>
</div>
{% endblock %}
2023-01-23 09:46:34 +01:00
{% block localscript %}
<script>
2023-01-12 16:14:31 +01:00
$(document).ready(function() {
2023-02-16 17:03:53 +01:00
$('#dataTables').DataTable({
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
2023-01-12 16:14:31 +01:00
responsive: true,
iDisplayLength: 100,
2023-02-16 17:03:53 +01:00
order: [[ 2, "asc" ]]
2023-01-12 16:14:31 +01:00
});
});
2023-01-23 09:46:34 +01:00
</script>
2023-01-12 16:14:31 +01:00
{% endblock %}
2023-02-16 17:03:53 +01:00