{% extends 'reporting/layout.html.twig' %} {% block report_title %}{{ 'report_user_week'|trans({}, 'reporting') }}{% endblock %} {% block report %} {% set hasData = false %} {% for day in days %} {% if day.details is not empty %} {% set hasData = true %} {% endif %} {% endfor %} {% embed '@AdminLTE/Widgets/box-widget.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% block box_before %} {{ form_start(form, {'action': path('report_user_week'), 'attr': {'class': 'form-inline'}}) }} {% endblock %} {% block box_after %} {{ form_end(form) }} {% endblock %} {% block box_title %} {% if form.user is defined %} {{ form_row(form.user, {'label': false}) }} {% else %} {{ widgets.username(user) }} {% endif %} {{ form_widget(form.date) }} {% endblock %} {% block box_body_class %}user-week-reporting-box table-responsive{% if hasData %} no-padding{% endif %}{% endblock %} {% block box_body %} {% if not hasData %} {{ widgets.nothing_found() }} {% else %} {% for day in days %} {% endfor %} {% for project in rows %} {% for day in project.days %} {% endfor %} {% for activity in project.activities %} {% for day in activity.days %} {% endfor %} {% endfor %} {% endfor %} {% set total = 0 %} {% for day in days %} {% set total = total + day.totalDuration %} {% endfor %} {% for day in days %} {% endfor %}
    {{ day.day|day_name(true) }}
{{ day.day|date_format('d.m') }}
{{ widgets.label_project(project.project) }} {{ project.duration|duration }} {% if day.duration > 0 %} {{ day.duration|duration }} {% endif %}
{{ widgets.label_activity(activity.activity) }} {{ activity.duration|duration }} {% if day.duration > 0 %} {{ day.duration|duration }} {% endif %}
{{ total|duration }} {% if day.totalDuration > 0 %} {{ day.totalDuration|duration }} {% endif %}
{% endif %} {% endblock %} {% endembed %} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}