{% extends 'reporting/layout.html.twig' %} {% import "macros/datatables.html.twig" as tables %} {% block report_title %}{{ 'report_project_daterange'|trans({}, 'reporting') }}{% endblock %} {% set showMoneyBudget = is_granted('budget_money', 'project') %} {% set showTimeBudget = is_granted('budget_time', 'project') %} {% set viewRevenue = is_granted('view_rate_other_timesheet') %} {% set columns = { 'name': {'class': 'alwaysVisible'}, } %} {% if showTimeBudget %} {% set columns = columns|merge({ 'timeBudget': {'class': 'hidden-xs', 'title': 'label.timeBudget'|trans}, }) %} {% endif %} {% if showMoneyBudget %} {% set columns = columns|merge({ 'budget': {'class': 'hidden-xs', 'title': 'label.budget'|trans}, }) %} {% endif %} {% set columns = columns|merge({ 'duration': {'class': 'text-center hw-min', 'title': 'stats.durationMonth'|trans, 'columnClass': 'w-min'}, }) %} {% if viewRevenue %} {% set columns = columns|merge({ 'rate': {'class': 'text-center hw-min', 'title': 'stats.amountMonth'|trans, 'columnClass': 'w-min'}, }) %} {% endif %} {% set columns = columns|merge({ 'billable': {'class': 'text-center hw-min', 'columnClass': 'w-min'}, 'actions': {'class': 'actions alwaysVisible'}, }) %} {% set tableName = 'project_daterange_reporting' %} {% block main_before %} {{ tables.data_table_column_modal(tableName, columns) }} {% endblock %} {% block report %} {% set hasData = entries|length > 0 %} {% embed '@AdminLTE/Widgets/box-widget.html.twig' %} {% import "macros/progressbar.html.twig" as progress %} {% import "macros/widgets.html.twig" as widgets %} {% import "macros/datatables.html.twig" as tables %} {% import "project/actions.html.twig" as projectActions %} {% block box_body_class %}{{ tableName }}-box {% if hasData %}no-padding{% endif %}{% endblock %} {% block box_before %} {{ form_start(form, {'attr': {'class': 'form-inline form-reporting', 'id': 'project-daterange-form'}}) }} {% endblock %} {% block box_after %} {{ form_end(form) }} {% endblock %} {% block box_tools %} {{ widgets.action_button('visibility', {'modal': ('#modal_' ~ tableName), 'class': 'btn-sm'}) }} {% endblock %} {% block box_title %} {% if form.customer is defined %} {{ form_widget(form.customer) }} {% endif %} {% if form.month is defined %} {{ form_widget(form.month) }} {% endif %}