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

78 lines
2.5 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">
JOURS FERIES
</h1>
<p><a class="btn btn-success" href={{ path('app_breakday_submit') }}>Ajouter</a></p>
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des Jours Fériés
</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-sort no-print">Action</th>
<th>Ordre</th>
<th>Date</th>
</tr>
</thead>
<tbody>
{% for breakday in breakdays %}
<tr>
<td class="no-print">
<a href="{{path("app_breakday_update",{id:breakday.id})}}"><i class="fa fa-file"></i></a>
</td>
<td>{{breakday.start|date("Ymd")}}</td>
<td>{{breakday.start|date("d/m/Y")}}</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: [[ 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 %}