{% 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; } .homecard {width: 100% } {%endif%} {% endblock %} {% block body %}

VALIDATION HORAIRES

{% if not app.session.get('activetimer') %} Horaires à Dévalider {% else %} Horaires à Valider {% endif %}
{% for user in users %} {% for timer in user.timers %} {% endfor %} {% endfor %}
Utilisateur Tâche Description Début Fin Durée
{% if timer.validate %} {% else %} {% endif %} {{ user.user.displayname }} {{ timer.taskname }} {{ timer.activepenalty ? " Astreinte active" : "" }} {{ timer.additionalhour ? " Heures supplémentaires" : "" }}

{{ timer.description }}

{{ timer.start|date("d/m/Y H:i") }} {{ timer.end|date("d/m/Y H:i") }} {{ timer.duration|date("H:i") }}
{% endblock %} {% block localjavascript %} $(document).ready(function() { {% if not fgprint is defined or not fgprint %} $('.table ').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"; } function validate(id) { $.ajax({ type: "POST", data: { id: id, }, url: "{{ path('app_validationtimer_validate') }}", success: function (response) { response=JSON.parse(response); if(response.return=="KO") { alert(response.error); } else { $("#row-"+id).remove(); } } }); } function devalidate(id) { $.ajax({ type: "POST", data: { id: id, }, url: "{{ path('app_validationtimer_devalidate') }}", success: function (response) { response=JSON.parse(response); if(response.return=="KO") { alert(response.error); } else { $("#row-"+id).remove(); } } }); } $('#switchactive').change(function() { window.location="{{ path('app_validationtimer_activetimer' )}}"; }); {% endblock %}