{% 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() %} |
{{ month|month_name }} {{ month|date_format('Y') }} |
{% set totals = totals|merge({(month|report_date): 0}) %}
{% endfor %}
|
|---|---|---|
| {{ widgets.label_dot(userYear.user.displayName, userYear.user.color) }} | {% for mid, month in userYear.months %} {% if month.totalDuration > 0 %} {% set usersTotalDuration = usersTotalDuration + month.totalDuration %} {% endif %} {% endfor %}{{ usersTotalDuration|duration }} | {% for mid, month in userYear.getMonths() %}{% if month.totalDuration > 0 %} {{ month.totalDuration|duration }} {% set totals = totals|merge({(month.date|report_date): (totals[month.date|report_date] + month.totalDuration)}) %} {% endif %} | {% endfor %}
| {% for id, total in totals %} | {{ total|duration }} | {% endfor %}