{% extends "base.html.twig" %} {% block localstyle %} .clock { background-color: #000; color: #fff; padding: 0px 20px 20px 20px; font-size: 40px; border-radius: 5px; text-align: center; line-height:30px; width:250px; } .clock small { font-size: 30%; margin-top:-15px; } .alert { width:250px; } .tallydaydetail { width:250px; text-align: left; margin-top: 20px; } {% endblock %} {% block body %}
{% if message is defined and not message is empty %}
Erreur
{{ message|raw }}
{% endif %} {% if tallyday is null %} Début Pointage {% elseif tallyday.datestartam is not null and tallyday.datestartpm is null and tallyday.dateendam is null %} Fin Pointage
Matin
{% elseif tallyday.datestartpm is null %} Début Pointage
Après-midi
{% elseif tallyday.datestartpm is not null and tallyday.dateendpm is null %} Fin Pointage
Après-midi
{% endif %}
{% if tallyday %} Matin
{%if tallyday.datestartam %}de {{ tallyday.datestartam|date("d/m/y H:i") }}
{%endif%} {%if tallyday.dateendam %}à {{ tallyday.dateendam|date("d/m/y H:i") }}
{%endif%}
Après-midi
{%if tallyday.datestartpm %}de {{ tallyday.datestartpm|date("d/m/y H:i") }}
{%endif%} {%if tallyday.dateendpm %}à {{ tallyday.dateendpm|date("d/m/y H:i") }} {%endif%}
{% else %} Matin =
Après-midi = {% endif %}
{% if not tallyday or (tallyday and not tallyday.validateuser and not tallyday.validatemaster) %} Modifier ma journée {% if tallyday %} Valider ma journée {% endif %}
{% endif %} Gérer mes Pointages {% if tallyday and tallyday.validateuser and not tallyday.validatemaster %}
Dévalider ma journée {% endif %}
{% endblock %} {% block localjavascript %} function showTime(){ // to get current time/ date. var date = new Date(); var dm = date.toLocaleDateString('fr-FR', { weekday: 'long' }); // to get the current hour var h = date.getHours(); // to get the current minutes var m = date.getMinutes(); //to get the current second var s = date.getSeconds(); m = ( m < 10 ) ? m = "0" + m : m; s = ( s < 10 ) ? s = "0" + s : s; // putting time in one variable var time = "" + dm + " " + date.toLocaleDateString("fr") + "
" + h + ":" + m + ":" + s; // putting time in our div $('#clock').html(time); //to change time in every seconds setTimeout( showTime, 1000 ); } showTime(); {% endblock %}