{% 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 "timesheet-team/actions.html.twig" as actions %} {% set tableName = 'timesheet_admin' %} {% set columns = { 'date': {'class': 'alwaysVisible', 'orderBy': 'begin'}, } %} {% if showStartEndTime %} {% set columns = columns|merge({ 'starttime': {'class': 'hidden-xs', 'orderBy': 'begin'}, 'endtime': {'class': 'hidden-xs', 'orderBy': 'end'} }) %} {% endif %} {% set columns = columns|merge({ 'duration': '', 'rate': '', 'customer': 'hidden-xs hidden-sm hidden-md', 'project': 'hidden-xs hidden-sm hidden-md', 'activity': 'hidden-xs hidden-sm', 'description': 'hidden-xs hidden-sm', 'username': {'class': 'hidden-xs', 'orderBy': false}, 'tags': {'class': 'hidden-xs hidden-sm', 'orderBy': false}, }) %} {% for field in metaColumns %} {% set columns = columns|merge({ ('mf_' ~ field.name): {'title': field.label, 'class': 'hidden-xs hidden-sm', 'orderBy': false} }) %} {% endfor %} {% set columns = columns|merge({ 'actions': 'actions alwaysVisible', }) %} {% block page_title %}{{ 'admin_timesheet.title'|trans }}{% endblock %} {% block page_search %}{{ toolbar.dropDownSearch(toolbarForm) }}{% endblock %} {% block page_actions %}{{ actions.timesheets_team('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.timesheetUpdate'}) }} {% for entry in entries %} {{ entry.begin|date_short }} {% if showStartEndTime %} {{ entry.begin|time }} {% if entry.end %} {{ entry.end|time }} {% else %} ‐ {% endif %} {% endif %} {% if entry.end %} {{ entry.duration|duration }} {% else %} {{ entry|duration }} {% endif %} {% if not entry.end or not is_granted('view_rate', entry) %} ‐ {% else %} {{ entry.rate|money(entry.project.customer.currency) }} {% endif %} {{ widgets.label_customer(entry.project.customer) }} {{ widgets.label_project(entry.project) }} {{ widgets.label_activity(entry.activity) }} {{ entry.description|nl2br }} {{ widgets.label_user(entry.user) }} {{ widgets.tag_list(entry.tags) }} {% for field in metaColumns %} {{ tables.datatable_meta_column(entry, field) }} {% endfor %} {{- actions.timesheet_team(entry, 'index') -}} {% endfor %} {{ tables.data_table_footer(entries, 'admin_timesheet_paginated') }} {% endif %} {% endblock %}