nineskeletor/templates/Pin/list.html.twig

56 lines
1.7 KiB
Twig
Raw Normal View History

2023-02-16 17:03:53 +01:00
{% extends "base.html.twig" %}
{% block body %}
<h1 class="page-header">
pins
</h1>
<p><a class="btn btn-success" href={{ path('app_pin_submit') }}>Ajouter</a></p>
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des pins
</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="90px" class="no-sort">Action</th>
<th class="no-string" width="70px">ID</th>
<th>Nom</th>
</tr>
</thead>
<tbody>
{% for pin in pins %}
<tr>
<td>
<a href="{{path("app_pin_update",{id:pin.id})}}"><i class="fa fa-file fa-2x"></i></a>
</td>
<td>{{pin.id}}</td>
<td>{{pin.name}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$('#dataTables').DataTable({
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
responsive: true,
iDisplayLength: 100,
order: [[ 1, "asc" ]]
});
});
</script>
{% endblock %}