{% extends 'base.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% import "macros/datatables.html.twig" as tables %} {% import "macros/toolbar.html.twig" as toolbar %} {% import "@TaskManagement/actions.html.twig" as actions %} {% set tableName = 'tasks' %} {% set columns = { 'title': 'alwaysVisible', 'project': 'hidden-xs hidden-sm hidden-md', 'end': 'hidden-xs', 'duration': 'hidden-xs hidden-sm', } %} {% if seeUserColumn %} {% set columns = columns|merge({ 'user': 'hidden-xs hidden-sm', }) %} {% endif %} {% set columns = columns|merge({ 'team': 'hidden-xs hidden-sm hidden-md', 'actions': 'actions alwaysVisible', }) %} {% block page_title %}{{ 'Tasks'|trans }}{% endblock %} {% block page_search %}{{ toolbar.dropDownSearch(toolbarForm) }}{% endblock %} {% block page_actions %}{{ actions.tasks('index') }}{% endblock %} {% block main_before %} {{ tables.data_table_column_modal(tableName, columns) }} {% endblock %} {% block main %} {% if entries.count == 0 %} {{ widgets.callout('warning', 'error.no_entries_found') }} {% else %} {{ tables.datatable_header(tableName, columns, query, {'reload': 'kimai.taskUpdate', 'class': 'table-responsive'}) }} {% set lastDate = '' %} {% for entry in entries %} {% if entry.status == 'pending' %} {{ entry.title }} {% elseif entry.status == 'progress' %} {{ entry.title }} {% elseif entry.status == 'closed' %} {{ entry.title }} {% endif %} {{ widgets.label_project(entry.project) }}
{{ widgets.label_customer(entry.project.customer) }} {% if entry.end %} {{ entry.end|date_short }} {% else %} – {% endif %} {% set duration = entry.duration %} {% if duration is not null %} {{ widgets.label(entry.duration|duration, 'primary') }} {% endif %} {% if seeUserColumn %} {% if entry.user is not null %} {{ widgets.label_user(entry.user) }} {% endif %} {% endif %} {% if entry.team is not null%} {{ widgets.label_team(entry.team) }} {% endif %} {{- actions.task(entry, 'index') -}} {% endfor %} {{ tables.data_table_footer(entries, 'tasks_paginated') }} {% endif %} {% endblock %}