2024-11-23 16:06:38 +01:00
|
|
|
{% extends 'base.html.twig' %}
|
|
|
|
|
|
|
|
{% block title %} = {{title}}{% endblock %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
<h1>{{title}}</h1>
|
2024-11-26 20:42:13 +01:00
|
|
|
<a href="{{ path(routesubmit) }}" class="btn btn-success">Ajouter</a>
|
|
|
|
|
|
|
|
<div class="dataTable_wrapper">
|
|
|
|
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th width="70px" class="no-sort">Action</th>
|
|
|
|
<th width="70px" class="no-sort">Avatar</th>
|
|
|
|
<th>Login</th>
|
|
|
|
<th>Rôles</th>
|
|
|
|
<th>Compagnies</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for user in users %}
|
|
|
|
<tr>
|
|
|
|
<td><a href="{{ path(routeupdate,{id:user.id}) }}"><i class="fas fa-file fa-2x"></i></a></td>
|
|
|
|
<td><img class="avatar" src="{{ asset(user.avatar)}}"></td>
|
|
|
|
<td>{{user.username}}</td>
|
|
|
|
<td>
|
|
|
|
{% for role in user.roles %}
|
|
|
|
{{role}}<br>
|
|
|
|
{% endfor %}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% for company in user.companys %}
|
|
|
|
{{company.title}}<br>
|
|
|
|
{% endfor %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block localscript %}
|
|
|
|
<script type="module">
|
|
|
|
import $ from 'jquery';
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#dataTables').DataTable({
|
|
|
|
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
|
|
|
responsive: true,
|
|
|
|
iDisplayLength: 100,
|
|
|
|
order: [[ 2, "asc" ]]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2024-11-23 16:06:38 +01:00
|
|
|
{% endblock %}
|