{% extends 'reporting/layout.html.twig' %} {% import "macros/datatables.html.twig" as tables %} {% block report_title %}{{ (title|default('report_project_view'))|trans({}, 'reporting') }}{% endblock %} {% set columns = { 'name': {'class': 'alwaysVisible'}, 'lastRecord': {'class': 'hidden text-center hw-min', 'title': 'label.last_record'|trans}, 'today': {'class': 'hidden-md hidden-sm hidden-xs text-center hw-min', 'title': 'stats.durationToday'|trans}, 'week': {'class': 'hidden-md hidden-sm hidden-xs text-center hw-min', 'title': 'stats.durationWeek'|trans}, 'month': {'class': 'hidden-md hidden-sm hidden-xs text-center hw-min', 'title': 'stats.durationMonth'|trans}, 'durationTotal': {'class': 'text-center hw-min', 'title': 'stats.durationTotal'|trans}, 'timeBudget': {'class': 'hidden-xs', 'title': 'label.timeBudget'|trans}, 'budget': {'class': 'hidden-xs', 'title': 'label.budget'|trans}, 'stateDuration': {'class': 'hidden-sm hidden-xs text-center hw-min', 'title': 'label.not_exported'|trans}, 'stateMoney': {'class': 'hidden-sm hidden-xs text-center hw-min', 'title': 'label.not_invoiced'|trans}, 'projectStart': {'class': 'hidden-md hidden-sm hidden-xs hidden text-center w-min', 'title': 'label.project_start'|trans}, 'projectEnd': {'class': 'hidden-md hidden-sm hidden-xs hidden text-center w-min', 'title': 'label.project_end'|trans}, 'comment': {'class': 'hidden-md hidden-sm hidden-xs hidden', 'title': 'label.comment'|trans}, 'actions': {'class': 'actions alwaysVisible'}, } %} {% set tableName = tableName|default('project_view_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-view-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 %} {{ form_widget(form) }} {% endblock %} {% block box_body %} {% if not hasData %} {{ widgets.nothing_found() }} {% else %} {{ tables.datatable_header(tableName, columns, null, {'bordered': true, 'boxClass': ''}) }} {% for id, mapping in entries|sort((a, b) => a.customer.name <=> b.customer.name) %}