ninenote/src/ninenote-1.0/templates/Responsible/list.html.twig

58 lines
2.1 KiB
Twig

{% extends "base.html.twig" %}
{% block body %}
<h1 class="page-header">
<i class="fas fa-scroll"></i>
RESPONSABLES
</h1>
<p><a class="btn btn-success" href={{ path('app_responsible_submit') }}>Ajouter</a></p>
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des Responsables
</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">Action</th>
<th>Login</th>
<th>Nom</th>
<th>Classe > Elève</th>
</tr>
</thead>
<tbody>
{% for responsible in responsibles %}
<tr>
<td>
<a href="{{path("app_responsible_update",{id:responsible.id,by:'list'})}}"><i class="fa fa-file"></i></a>
</td>
<td>{{responsible.user.username}}</td>
<td>{{responsible.user.displayname}}</td>
<td>
{% for student in responsible.students %}
{{student.classroom.name}} > {{student.user.displayname}}<br>
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}
{% block localjavascript %}
$(document).ready(function() {
$('#dataTables').DataTable({
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
responsive: true,
iDisplayLength: 100,
order: [[ 1, "asc" ]]
});
});
{% endblock %}