94 lines
4.2 KiB
Twig
94 lines
4.2 KiB
Twig
|
{% extends "base.html.twig" %}
|
||
|
|
||
|
{% block localstyle %}
|
||
|
{% endblock %}
|
||
|
{% block body %}
|
||
|
<h1 class="page-header">
|
||
|
GERER MES POINTAGES
|
||
|
</h1>
|
||
|
|
||
|
<a class="btn btn-secondary" href={{ path('app_tallyday') }}>Retour</a>
|
||
|
<a class="btn btn-secondary float-right" href={{ path('app_tallyday_userlist',{date:datenext|date("Y-m-d")}) }}>Semaine Suivante</a>
|
||
|
<a class="btn btn-secondary float-right mr-2" href={{ path('app_tallyday_userlist',{date:dateprev|date("Y-m-d")}) }}>Semaine Précedente</a>
|
||
|
|
||
|
{% if message is defined and not message is empty %}
|
||
|
<div class='alert alert-danger' style='margin: 5px 0px'>
|
||
|
<strong>Erreur</strong><br>
|
||
|
{{ message|raw }}<br>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
|
||
|
<center class="mt-3">
|
||
|
{% set trans_day_hash = {
|
||
|
"Monday": "Lundi",
|
||
|
"Tuesday": "Mardi",
|
||
|
"Wednesday": "Mercredi",
|
||
|
"Thursday": "Jeudi",
|
||
|
"Friday": "Vendredi",
|
||
|
"Saturday": "Samedi",
|
||
|
"Sunday": "Dimanche"
|
||
|
}
|
||
|
%}
|
||
|
|
||
|
<table class="table table-striped table-bordered table-hover" id="dataTables" >
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th width="70px" class="no-sort">Action</th>
|
||
|
<th class="no-sort">Date</th>
|
||
|
<th class="no-sort">AM début</th>
|
||
|
<th class="no-sort">AM fin</th>
|
||
|
<th class="no-sort">PM début</th>
|
||
|
<th class="no-sort">PM fin</th>
|
||
|
<th class="no-sort">Durée</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{%for date in dates %}
|
||
|
<tr>
|
||
|
<td>
|
||
|
{% if date["tallyday"] is empty or not date["tallyday"].validateuser %}
|
||
|
<a href="{{ path('app_tallyday_userupdate',{date:date["date"]|date("Y-m-d"),from:"list"}) }}"><i class="fa fa-file"></i></a>
|
||
|
{% if date["tallyday"] %}
|
||
|
<a href="{{path("app_tallyday_uservalidate",{date:date["date"]|date("Y-m-d"),from:"list"})}}"><i class="fas fa-check"></i></a>
|
||
|
{% endif %}
|
||
|
|
||
|
{% elseif not date["tallyday"].validatemaster %}
|
||
|
<a href="{{ path('app_tallyday_userdevalidate',{date:date["date"]|date("Y-m-d"),from:"list"}) }}"><i class="fas fa-lock"></i></i></a>
|
||
|
{% endif %}
|
||
|
</td>
|
||
|
<td>{{ trans_day_hash[date["date"]|date('l')] }} {{date["date"]|date("d/m/Y")}}</td>
|
||
|
{% if date["tallyday"] is empty %}
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td>00:00</td>
|
||
|
{% else %}
|
||
|
<td>{% if date["tallyday"].datestartam is not null %}{{date["tallyday"].datestartam|date("H:i")}}{%endif%}</td>
|
||
|
<td>{% if date["tallyday"].dateendam is not null %}{{date["tallyday"].dateendam|date("H:i")}}{%endif%}</td>
|
||
|
<td>{% if date["tallyday"].datestartpm is not null %}{{date["tallyday"].datestartpm|date("H:i")}}{%endif%}</td>
|
||
|
<td>{% if date["tallyday"].dateendpm is not null %}{{date["tallyday"].dateendpm|date("H:i")}}{%endif%}</td>
|
||
|
<td>{{ date["tallyday"].timedayformatted }}</td>
|
||
|
{% endif %}
|
||
|
</tr>
|
||
|
{%endfor%}
|
||
|
</table>
|
||
|
</table>
|
||
|
|
||
|
<div class="float-right" style="font-size:35px">TOTAL SEMAINE = {{ timeweek }}</div>
|
||
|
</center>
|
||
|
{% endblock %}
|
||
|
|
||
|
{% block localjavascript %}
|
||
|
$(document).ready(function() {
|
||
|
$('#dataTables').DataTable({
|
||
|
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||
|
responsive: true,
|
||
|
iDisplayLength: 100,
|
||
|
paging: false,
|
||
|
ordering: false,
|
||
|
info: false,
|
||
|
searching: false,
|
||
|
});
|
||
|
});
|
||
|
{% endblock %}
|