127 lines
6.8 KiB
Twig
127 lines
6.8 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',{week:weeknext|date("Y-m-d")}) }}>Semaine Suivante</a>
|
|
<a class="btn btn-secondary float-right mr-2" href={{ path('app_tallyday_userlist',{week:weekprev|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">Créneaux</th>
|
|
<th class="no-sort" width="70px">Durée</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{%for date in dates %}
|
|
<tr>
|
|
<td>
|
|
{% if not date.isvalideuser and not date.isvalidemaster and (not firstvalidate or firstvalidate.dateof < date["date"]) %}
|
|
<a href="{{path("app_tallyday_uservalidate",{dateof:date["date"]|date("Y-m-d"),week:week|date("Y-m-d"),from:"list"})}}" style="color:var(--green)"><i class="fa fa-thumbs-up fa-2x mr-2"></i></a>
|
|
{% elseif not date.isvalidemaster and (not firstvalidate or firstvalidate.dateof < date["date"]) %}
|
|
<a href="{{ path('app_tallyday_userdevalidate',{dateof:date["date"]|date("Y-m-d"),week:week|date("Y-m-d"),from:"list"}) }}" style="color:var(--red)"><i class="fa fa-thumbs-down fa-2x"></i></i></a>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ trans_day_hash[date["date"]|date('l')] }} {{date["date"]|date("d/m/Y")}}</td>
|
|
|
|
{% if date["tallydays"] is empty %}
|
|
<td>
|
|
{% if not date.isvalideuser and not date.isvalidemaster and (not firstvalidate or firstvalidate.dateof < date["date"]) %}
|
|
<a href="{{ path('app_tallyday_usersubmit',{dateof:date["date"]|date("Y-m-d"),week:week|date("Y-m-d")}) }}" style="color:var(--blue)"><i class="fa fa-plus mr-2"></i>Ajouter un créneau</a>
|
|
{% endif %}
|
|
</td>
|
|
<td class="text-center">00:00</td>
|
|
{% else %}
|
|
<td>
|
|
{% set breakdayall=false %}
|
|
{% for tallyday in date["tallydays"] %}
|
|
{% if tallyday.datestart or tallyday.dateend %}
|
|
{% if tallyday.isbreakday %}
|
|
{% if tallyday.datestart|date("H")==10 %}
|
|
{% set breakdayall=true %}
|
|
{% endif %}
|
|
{{tallyday.name}}
|
|
{% else %}
|
|
{% if not date.isvalideuser and not date.isvalidemaster and (not firstvalidate or firstvalidate.dateof < date["date"]) %}
|
|
<a href="{{ path('app_tallyday_userupdate',{id:tallyday.id,week:week|date("Y-m-d")}) }}" style="color:var(--blue)"><i class="fa fa-file mr-2"></i></a>
|
|
<a href="{{ path('app_tallyday_userdelete',{'id':tallyday.id,week:week|date("Y-m-d")}) }}"
|
|
style="color:var(--red)"
|
|
data-method="delete"
|
|
data-confirm="Êtes-vous sûr de vouloir supprimer cet entregistrement ?">
|
|
<i class="fa fa-trash mr-2"></i>
|
|
</a>
|
|
{% endif %}
|
|
|
|
{% if tallyday.datestart is not null %}
|
|
de {{tallyday.datestart|date("H:i")}}
|
|
{%endif%}
|
|
{% if tallyday.dateend is not null %}
|
|
de {{tallyday.dateend|date("H:i")}}
|
|
{%endif%}
|
|
{% endif %}
|
|
= {{tallyday.timedayformatted}}
|
|
<br>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if not breakdayall and not date.isvalideuser and not date.isvalidemaster and (not firstvalidate or firstvalidate.dateof < date["date"]) %}
|
|
<a href="{{ path('app_tallyday_usersubmit',{dateof:date["date"]|date("Y-m-d"),from:"list",week:week|date("Y-m-d")}) }}" style="color:var(--blue)"><i class="fa fa-plus mr-2 mt-4"></i>Ajouter un créneau</a>
|
|
{% endif %}
|
|
</td>
|
|
|
|
<td class="text-center">
|
|
{{ date.timeday }}
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{%endfor%}
|
|
</table>
|
|
</table>
|
|
|
|
<div class="float-right text-right" style="font-size:35px">
|
|
TOTAL SEMAINE = {{ timeweek }}<br>
|
|
CAPITAL TEMPS = {{capitaltime}}
|
|
</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 %} |