{% extends '@Approval/layout.html.twig' %} {% from '@Approval/macros.html.twig' import status_color_class %} {% import "macros/datatables.html.twig" as tables %} {% block report_title %}{{ report_title|trans }}{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block report %} {{ tables.actions(all_rows_datatable) }} {{ tables.header(all_rows_datatable) }} {% set sortedColumns = all_rows_datatable.sortedColumnNames %} {% if past_rows is not empty %}

{{ 'table.past_weeks'|trans }}

{% for entry in past_rows %} {{ block('datatable_row') }} {% endfor %} {% endif %} {% if current_rows is not empty %}

{{ 'table.current_week'|trans }}

{% for entry in current_rows %} {{ block('datatable_row') }} {% endfor %} {% endif %} {% if future_rows is not empty %}

{{ 'table.future_week'|trans }}

{% for entry in future_rows %} {{ block('datatable_row') }} {% endfor %} {% endif %} {{ tables.footer(all_rows_datatable) }} {% endblock %} {% block datatable_row %} {% for column, data in sortedColumns %} {{ block('datatable_column') }} {% endfor %} {% endblock %} {% block datatable_column %} {% if column == 'user' %} {{ entry['user'] }} {% elseif column == 'week' %} {{ entry['week'].label }} {% elseif column == 'status' %} {{ entry['status']|trans }} {% elseif column == 'actions' %} {% endif %} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}