{% extends 'reporting/layout.html.twig' %} {% block report_title %}{{ report_title|trans({}, 'reporting') }}{% endblock %} {% block report %} {% embed '@AdminLTE/Widgets/box-widget.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% block box_before %} {{ form_start(form, {'attr': {'class': 'form-inline'}}) }} {% endblock %} {% block box_after %} {{ form_end(form) }} {% endblock %} {% block box_title %} {{ form_widget(form.date) }} {% endblock %} {% block box_body_class %}{{ box_id }} table-responsive {% if hasData %}no-padding{% endif %}{% endblock %} {% block box_body %} {% if not hasData %} {{ widgets.nothing_found() }} {% else %} {% set absoluteTotals = 0 %} {% set totals = {} %}
| {% for day in stats.0.getDateTimes() %} |
{{ day|day_name(true) }} {{ day|format_date('short') }} |
{% set totals = totals|merge({(day|report_date): 0}) %}
{% endfor %}
|
|---|---|---|
| {{ widgets.label_dot(userDay.user.displayName, userDay.user.color) }} | {% for day in userDay.days %} {% if day.totalDuration > 0 %} {% set usersTotalDuration = usersTotalDuration + day.totalDuration %} {% set absoluteTotals = absoluteTotals + day.totalDuration %} {% endif %} {% set totals = totals|merge({(day.date|report_date): (totals[day.date|report_date] + day.totalDuration)}) %} {% endfor %}{{ usersTotalDuration|duration }} | {% for day in userDay.days %}{% if day.totalDuration > 0 %} {{ day.totalDuration|duration }} {% endif %} | {% endfor %}
| {{ absoluteTotals|duration }} | {% for id, duration in totals %}{{ duration|duration }} | {% endfor %}