Files
schedule/templates/Service/list.html.twig
2025-09-30 21:24:37 +02:00

72 lines
2.4 KiB
Twig

{% 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">
SERVICES
</h1>
<p><a class="btn btn-success" href={{ path('app_service_submit') }}>Ajouter</a></p>
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des Services
</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>Nom</th>
{% if doliActive %}<th>Code Dolibarr</th>{% endif %}
</tr>
</thead>
<tbody>
{% for service in services %}
<tr>
<td class="no-print">
<a href="{{path("app_service_update",{id:service.id})}}"><i class="fa fa-file"></i></a>
</td>
<td>{{service.name}}</td>
{% if doliActive %}<td>{{service.dolibarrcode}}</td>{% endif %}
</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 %}