File: /home/timetracker.panomity.com/tm.old/Resources/views/report-assigned-tasks.html.twig
{% extends 'reporting/layout.html.twig' %}
{% block report_title %}{{ 'report_tasks_assigned'|trans({}, 'reporting') }}{% endblock %}
{% block report %}
{% set hasData = data|length > 0 %}
{% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
{% import "macros/widgets.html.twig" as widgets %}
{% import "macros/progressbar.html.twig" as progress %}
{% block box_title %}
{{ 'report_tasks_assigned'|trans({}, 'reporting') }}
{% endblock %}
{% block box_body_class %}tasks-assigned-reporting-box table-responsive{% if hasData %} no-padding{% endif %}{% endblock %}
{% block box_body %}
{% if not hasData %}
{{ widgets.nothing_found() }}
{% else %}
<table class="table table-hover dataTable">
<tr>
<th colspan="2">{{ 'label.username'|trans }}</th>
<th class="text-center">{{ 'label.amount'|trans }}</th>
<th class="text-center">{{ 'label.duration'|trans }}</th>
<th class="text-center">{{ 'label.estimation'|trans }}</th>
{% if hasEstimation %}
<th class="text-center">{{ 'label.progress'|trans }}</th>
{% endif %}
<th class="text-center">{{ 'label.task_no_estimation'|trans }}</th>
<th class="text-center">{{ 'label.task_with_estimation'|trans }}</th>
<th class="text-center">{{ 'label.task_started'|trans }}</th>
<th class="text-center">{{ 'label.task_not_started'|trans }}</th>
<th class="text-center">{{ 'label.task_overdue'|trans }}</th>
</tr>
{% for id, user in data %}
<tr>
<td class="w-min">
{{ widgets.user_avatar(user.user) }}
</td>
<td>
<strong>{{ widgets.username(user.user) }}</strong>
</td>
<td class="text-center total">
{{ user.total }}
</td>
<td class="text-nowrap text-center">
{{ user.duration|duration }}
</td>
<td class="text-nowrap text-center">
{{ user.estimation|duration }}
</td>
{% if hasEstimation %}
<td class="text-nowrap">
{% if user.estimation > 0 %}
{{ progress.progressbar(user.estimation, user.duration|default(0), user.duration|duration ~ ' / ' ~ user.estimation|duration, '') }}
{% endif %}
</td>
{% endif %}
<td class="text-center">
{{ user.no_estimation }}
</td>
<td class="text-center">
{{ user.with_estimation }}
</td>
<td class="text-center">
{{ user.started }}
</td>
<td class="text-center">
{{ user.not_started }}
</td>
<td class="text-center{% if user.overdue > 0 %} danger{% endif %}">
{{ user.overdue }}
</td>
</tr>
{% endfor %}
<tr class="summary">
<td class="w-min"></td>
<td class="text-nowrap"> </td>
<td class="text-center total">
{{ totals.total }}
</td>
<td class="text-nowrap text-center">
{{ totals.duration|duration }}
</td>
<td class="text-nowrap text-center">
{{ totals.estimation|duration }}
</td>
{% if hasEstimation %}
<td class="text-nowrap">
{% if totals.estimation > 0 %}
{{ progress.progressbar(totals.estimation, totals.estimation_duration|default(0), totals.estimation_duration|duration ~ ' / ' ~ totals.estimation|duration, '') }}
{% endif %}
</td>
{% endif %}
<td class="text-center">
{{ totals.no_estimation }}
</td>
<td class="text-center">
{{ totals.with_estimation }}
</td>
<td class="text-center">
{{ totals.started }}
</td>
<td class="text-center">
{{ totals.not_started }}
</td>
<td class="text-center{% if totals.overdue > 0 %} danger{% endif %}">
{{ totals.overdue }}
</td>
</tr>
</table>
{% endif %}
{% endblock %}
{% endembed %}
{% endblock %}