81 lines
2.7 KiB
Twig
81 lines
2.7 KiB
Twig
{% extends "base.html.twig" %}
|
|
|
|
{% block localstyle %}
|
|
td {
|
|
padding:5px !important;
|
|
}
|
|
|
|
{% 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">
|
|
CLIENTS
|
|
</h1>
|
|
|
|
<p><a class="btn btn-success" href={{ path('app_customer_submit') }}>Ajouter</a></p>
|
|
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<i class="fa fa-table fa-fw"></i> Liste des Clients
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
<div class="dataTable_wrapper">
|
|
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th width="70px" class="no-print no-sort">Action</th>
|
|
<th>Nom</th>
|
|
<th>Clé</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for customer in customers %}
|
|
<tr>
|
|
<td class="no-print">
|
|
<a href="{{path("app_customer_update",{id:customer.id})}}"><i class="fa fa-file"></i></a>
|
|
</td>
|
|
<td>{{customer.name}}</td>
|
|
<td>
|
|
{% if customer.keypass %}
|
|
<a href="{{path("app_customer_report",{"key":customer.keypass})}}">{{customer.keypass}}</a>
|
|
{% endif %}
|
|
</td>
|
|
</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: [[ 1, "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 %} |