{% 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 form-reporting'}}) }} {% 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 totals = {} %} {% for month in stats.0.getDateTimes() %} {% set totals = totals|merge({(month|report_date): 0}) %} {% endfor %} {% for userYear in stats|filter(row => row.user is not null) %} {% set usersTotalDuration = 0 %} {% for mid, month in userYear.months %} {% if month.totalDuration > 0 %} {% set usersTotalDuration = usersTotalDuration + month.totalDuration %} {% endif %} {% endfor %} {% for mid, month in userYear.getMonths() %} {% endfor %} {% endfor %} {% for id, total in totals %} {% endfor %}
    {{ month|month_name }}
{{ month|date_format('Y') }}
{{ widgets.label_dot(userYear.user.displayName, userYear.user.color) }} {{ usersTotalDuration|duration }} {% if month.totalDuration > 0 %} {{ month.totalDuration|duration }} {% set totals = totals|merge({(month.date|report_date): (totals[month.date|report_date] + month.totalDuration)}) %} {% endif %}
    {{ total|duration }}
{% endif %} {% endblock %} {% endembed %} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}