{% extends 'base.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% import "macros/datatables.html.twig" as tables %} {% import "macros/search.html.twig" as search %} {% import "activity/actions.html.twig" as actions %} {% set columns = { 'name': {'class': 'alwaysVisible'}, 'project': {'class': 'hidden-xs'}, 'comment': {'class': 'hidden-xs hidden-sm', 'title': 'label.description'|trans}, } %} {% for field in metaColumns %} {% set columns = columns|merge({ ('mf_' ~ field.name): {'title': field.label|trans, 'class': 'hidden-xs hidden-sm', 'orderBy': false} }) %} {% endfor %} {% set columns = columns|merge({ 'budget': {'class': 'hidden-xs hidden-sm hidden text-center w-min', 'title': 'label.budget'|trans}, 'timeBudget': {'class': 'hidden-xs hidden-sm hidden text-center w-min', 'title': 'label.timeBudget'|trans}, 'team': {'class': 'text-center w-min', 'orderBy': false}, 'visible': {'class': 'text-center hidden w-min'}, 'actions': {'class': 'actions alwaysVisible'}, }) %} {% set tableName = 'activity_admin' %} {% block page_title %}{{ 'admin_activity.title'|trans }}{% endblock %} {% block page_search %}{{ search.searchModal(toolbarForm) }}{% endblock %} {% block page_actions %}{{ actions.activities('index') }}{% endblock %} {% block main_before %} {{ tables.data_table_column_modal(tableName, columns) }} {% endblock %} {% block main %} {% if entries.count == 0 %} {{ widgets.nothing_found('kimai.activityUpdate') }} {% else %} {{ tables.datatable_header(tableName, columns, query, {'reload': 'kimai.activityUpdate kimai.activityDelete kimai.activityTeamUpdate'}) }} {% for entry in entries %} {{ widgets.label_color_dot('activity', true, entry.name, null, entry.color) }} {# only none-global activities have a project and customer assigned #} {% if entry.project %} {{ widgets.label_project(entry.project) }} {% if entry.project.customer %}
{{ widgets.label_customer(entry.project.customer) }} {% endif %} {% endif %} {{ entry.comment|comment1line }} {% for field in metaColumns %} {{ tables.datatable_meta_column(entry, field) }} {% endfor %} {% if entry.hasBudget() %} {{ entry.budget|money((entry.project is null ? defaultCurrency : entry.project.customer.currency)) }} {% else %} – {% endif %} {% if entry.hasTimeBudget() %} {{ entry.timeBudget|duration }} {% else %} – {% endif %} {{ widgets.badge_team_access(entry.teams) }} {{ widgets.label_visible(entry.visible) }} {{ actions.activity(entry, 'index') }} {% endfor %} {{ tables.data_table_footer(entries, 'admin_activity_paginated') }} {% endif %} {% endblock %}