{% 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() %} {% set totals = totals|merge({(day|report_date): 0}) %} {% endfor %} {% for userDay in stats %} {% set usersTotalDuration = 0 %} {% 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 %} {% for day in userDay.days %} {% endfor %} {% endfor %} {% for id, duration in totals %} {% endfor %}
    {{ day|day_name(true) }}
{{ day|format_date('short') }}
{{ widgets.label_dot(userDay.user.displayName, userDay.user.color) }} {{ usersTotalDuration|duration }} {% if day.totalDuration > 0 %} {{ day.totalDuration|duration }} {% endif %}
  {{ absoluteTotals|duration }} {{ duration|duration }}
{% endif %} {% endblock %} {% endembed %} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}