{% 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 "customer/actions.html.twig" as actions %} {% set columns = { 'name': {'class': 'alwaysVisible'}, 'comment': {'class': 'hidden-xs hidden-sm', 'title': 'label.description'|trans}, 'number': {'class': 'hidden-xs hidden-sm hidden'}, 'company': {'class': 'hidden-xs hidden-sm hidden'}, 'vat_id': {'class': 'hidden-xs hidden-sm hidden', 'orderBy': 'vatId'}, 'contact': {'class': 'hidden-xs hidden-sm hidden'}, 'address': {'class': 'hidden-xs hidden-sm hidden'}, 'country': {'class': 'hidden-xs hidden-sm hidden'}, 'currency': {'class': 'hidden-xs hidden-sm hidden'}, 'phone': {'class': 'hidden-xs hidden-sm hidden'}, 'fax': {'class': 'hidden-xs hidden-sm hidden'}, 'mobile': {'class': 'hidden-xs hidden-sm hidden'}, 'email': {'class': 'hidden-xs hidden-sm hidden'}, 'homepage': {'class': 'hidden-xs hidden-sm hidden'}, } %} {% 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({ 'team': {'class': 'text-center w-min', 'orderBy': false}, 'visible': {'class': 'text-center hidden w-min'}, 'actions': {'class': 'actions alwaysVisible'}, }) %} {% set tableName = 'customer_admin' %} {% block page_title %}{{ 'admin_customer.title'|trans }}{% endblock %} {% block page_search %}{{ toolbar.dropDownSearch(toolbarForm) }}{% endblock %} {% block page_actions %}{{ actions.customers('index') }}{% endblock %} {% block main_before %} {{ tables.data_table_column_modal(tableName, columns) }} {% endblock %} {% block main %} {% if entries.count == 0 %} {{ widgets.nothing_found('kimai.customerUpdate kimai.customerTeamUpdate') }} {% else %} {{ tables.datatable_header(tableName, columns, query, {'reload': 'kimai.customerUpdate kimai.customerTeamUpdate'}) }} {% for entry in entries %} {{ widgets.label_color_dot('customer', true, entry.name, null, entry.color) }} {{ entry.comment|comment2html }} {{ entry.number }} {{ entry.company }} {{ entry.vatId }} {{ entry.contact }} {{ entry.address }} {{ entry.country|country }} {{ entry.currency|currency }} {{ entry.phone }} {{ entry.fax }} {{ entry.mobile }} {{ entry.email }} {{ entry.homepage }} {% for field in metaColumns %} {{ tables.datatable_meta_column(entry, field) }} {% endfor %} {{ widgets.badge_team_access(entry.teams) }} {{ widgets.label_visible(entry.visible) }} {{ actions.customer(entry, 'index') }} {% endfor %} {{ tables.data_table_footer(entries, 'admin_customer_paginated') }} {% endif %} {% endblock %}