50 lines
2.0 KiB
Twig
50 lines
2.0 KiB
Twig
|
{% extends 'base.html.twig' %}
|
||
|
|
||
|
{% block title %} = {{title}}{% endblock %}
|
||
|
|
||
|
{% block body %}
|
||
|
<h1>{{title}}</h1>
|
||
|
<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="120px" class="no-sort">Action</th>
|
||
|
<th width="120px">Date</th>
|
||
|
<th width="120px">Type</th>
|
||
|
<th>Client</th>
|
||
|
<th width="120px">Montant</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{% for bill in bills %}
|
||
|
<tr>
|
||
|
<td>
|
||
|
<a href="{{ path(routeupdate,{id:bill.id}) }}"><i class="fas fa-file fa-2x"></i></a>
|
||
|
<a href="{{ path(routeprint,{id:bill.id}) }}" class="ms-2"><i class="fas fa-print fa-2x"></i></a>
|
||
|
</td>
|
||
|
<td>{{ bill.billDate|date("Y-m-d") }}</td>
|
||
|
<td>{{ bill.isBill?'Facture':'Devis' }}</td>
|
||
|
<td>{{ bill.clientName }}</td>
|
||
|
<td>{{ bill.total }}</td>
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</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, "desc" ]]
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
{% endblock %}
|