svg
This commit is contained in:
106
templates/User/list.html.twig
Normal file
106
templates/User/list.html.twig
Normal file
@@ -0,0 +1,106 @@
|
||||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block localstyle %}
|
||||
{% if fgprint is defined and fgprint %}
|
||||
table { font-size:10px;}
|
||||
th,td {
|
||||
border: 1px solid #37474F;
|
||||
}
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
tr { page-break-inside: avoid; }
|
||||
{%endif%}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body %}
|
||||
<h1 class="page-header">
|
||||
UTILISATEURS
|
||||
</h1>
|
||||
|
||||
<p><a class="btn btn-success" href={{ path('app_user_submit') }}>Ajouter</a></p>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-table fa-fw"></i> Liste des Utilisateurs
|
||||
</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="70px" class="no-sort no-print">Action</th>
|
||||
<th width="70px" class="no-sort no-print">Avatar</th>
|
||||
<th>Login</th>
|
||||
<th>Prénom</th>
|
||||
<th>Nom</th>
|
||||
<th>Rôles</th>
|
||||
<th>Activité</th>
|
||||
<th>Métiers</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td class="no-print">
|
||||
<a href="{{path("app_user_update",{id:user.id})}}"><i class="fa fa-file"></i></a>
|
||||
</td>
|
||||
<td class="no-print"><img id="user_avatar_img" src="/{{ appAlias }}/uploads/avatar/{{ user.avatar }}" class="avatar" ></td>
|
||||
<td>{{user.username}}</td>
|
||||
<td>{{user.firstname}}</td>
|
||||
<td>{{user.lastname}}</td>
|
||||
<td>
|
||||
{%for role in user.roles %}
|
||||
{%if role=="ROLE_ADMIN" %}
|
||||
Administrateur<br>
|
||||
{%elseif role=="ROLE_VALIDATOR" %}
|
||||
Valideur<br>
|
||||
{%elseif role=="ROLE_MASTER" %}
|
||||
Master<br>
|
||||
{%elseif role=="ROLE_USER" %}
|
||||
Intervenant<br>
|
||||
{%elseif role=="ROLE_VISITOR" %}
|
||||
Invité<br>
|
||||
{%endif%}
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
{% if user.service %}
|
||||
{{ user.service.name }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% for job in user.jobs %}
|
||||
{{ job.type }} - {{ job.name }}<br>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
$(document).ready(function() {
|
||||
{% if not fgprint is defined or not fgprint %}
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 2, "asc" ]]
|
||||
});
|
||||
{%else%}
|
||||
$('#dataTables').removeClass("table table-striped table-bordered table-hover small dataTable no-footer");
|
||||
{% endif %}
|
||||
});
|
||||
|
||||
function myprint() {
|
||||
href=document.location.href;
|
||||
document.location.href=href+"?fgprint=true";
|
||||
}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user