Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)
This commit is contained in:
@@ -1,9 +1,3 @@
|
||||
{% macro customers(view, query) %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% set event = actions(app.user, 'customers', view, {'query': query}) %}
|
||||
{{ widgets.page_actions(event.actions) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro customer(customer, view, options) %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% set event = actions(app.user, 'customer', view, {'customer': customer}) %}
|
||||
|
||||
@@ -1,23 +1,14 @@
|
||||
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
|
||||
{% import "customer/actions.html.twig" as actions %}
|
||||
|
||||
{% block page_title %}{{ 'customers'|trans }}{% endblock %}
|
||||
{% block page_actions %}{{ actions.customer(customer, 'delete') }}{% endblock %}
|
||||
{% extends kimai_context.modalRequest ? 'form.html.twig' : 'base.html.twig' %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
{% set inUse = (stats.counter > 0) %}
|
||||
|
||||
{% set params = {
|
||||
'%records%': stats.counter,
|
||||
'%duration%': stats.duration|duration
|
||||
} %}
|
||||
|
||||
{{ include(app.request.xmlHttpRequest ? 'default/_form_delete_modal.html.twig' : 'default/_form_delete.html.twig', {
|
||||
{{ include(kimai_context.modalRequest ? 'default/_form_delete_modal.html.twig' : 'default/_form_delete.html.twig', {
|
||||
'message': ("delete_warning.short_stats"|trans(params) ~ "admin_entity.delete_confirm"|trans),
|
||||
'form': form,
|
||||
'used': inUse,
|
||||
'used': (stats.counter > 0),
|
||||
'back': path('admin_customer')
|
||||
}) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% import "customer/actions.html.twig" as actions %}
|
||||
|
||||
{% block page_actions %}{{ actions.customer(customer, 'customer_details') }}{% endblock %}
|
||||
{% block page_title %}{{ 'customers'|trans }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{% set can_edit = is_granted('edit', customer) %}
|
||||
|
||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
|
||||
{% embed '@theme/embeds/card.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% block box_attributes %}id="customer_details_box"{% endblock %}
|
||||
{% block box_title %}
|
||||
@@ -17,26 +13,27 @@
|
||||
{% endblock %}
|
||||
{% block box_tools %}
|
||||
{% if can_edit %}
|
||||
<a class="modal-ajax-form open-edit btn btn-default btn-sm" data-href="{{ path('admin_customer_edit', {'id': customer.id}) }}" data-toggle="tooltip" data-placement="top" title="{{ 'action.edit'|trans }}"><i class="{{ 'edit'|icon }}"></i></a>
|
||||
{{ widgets.card_tool_button('vcard', {'title': 'vcard', 'translation_domain': 'actions', 'icon': 'far fa-address-card', 'url': path('customer_vcard', {'id': customer.id})}) }}
|
||||
{{ widgets.card_tool_button('edit', {'class': 'modal-ajax-form open-edit', 'title': 'action.edit', 'url': path('admin_customer_edit', {'id': customer.id})}) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block box_body_class %}no-padding{% endblock %}
|
||||
{% block box_body_class %}p-0{% endblock %}
|
||||
{% block box_body %}
|
||||
{% if customer.comment is not empty %}
|
||||
<div class="comment">
|
||||
<div class="comment p-3">
|
||||
{{ customer.comment|comment2html(true) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<table class="table table-hover dataTable">
|
||||
{% if not customer.visible %}
|
||||
<tr class="{{ widgets.class_customer_row(customer, now) }}">
|
||||
<th>{{ 'label.visible'|trans }}</th>
|
||||
<th>{{ 'visible'|trans }}</th>
|
||||
<td>{{ widgets.label_boolean(customer.visible) }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if not customer.billable %}
|
||||
<tr>
|
||||
<th>{{ 'label.billable'|trans }}</th>
|
||||
<th>{{ 'billable'|trans }}</th>
|
||||
<td colspan="3">
|
||||
{{ widgets.label_boolean(customer.billable) }}
|
||||
</td>
|
||||
@@ -44,74 +41,74 @@
|
||||
{% endif %}
|
||||
{% if customer.address is not empty %}
|
||||
<tr>
|
||||
<th>{{ 'label.address'|trans }}</th>
|
||||
<th>{{ 'address'|trans }}</th>
|
||||
<td>{{ customer.address|nl2br }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if customer.country is not empty %}
|
||||
<tr>
|
||||
<th>{{ 'label.country'|trans }}</th>
|
||||
<td>{{ customer.country|country }}</td>
|
||||
<th>{{ 'country'|trans }}</th>
|
||||
<td>{{ customer.country|country_name }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if customer.contact is not empty %}
|
||||
<tr>
|
||||
<th>{{ 'label.contact'|trans }}</th>
|
||||
<th>{{ 'contact'|trans }}</th>
|
||||
<td>{{ customer.contact }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if customer.phone is not empty %}
|
||||
<tr>
|
||||
<th>{{ 'label.phone'|trans }}</th>
|
||||
<th>{{ 'phone'|trans }}</th>
|
||||
<td><a href="tel:{{ customer.phone }}">{{ customer.phone }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if customer.mobile is not empty %}
|
||||
<tr>
|
||||
<th>{{ 'label.mobile'|trans }}</th>
|
||||
<th>{{ 'mobile'|trans }}</th>
|
||||
<td><a href="tel:{{ customer.mobile }}">{{ customer.mobile }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if customer.email is not empty %}
|
||||
<tr>
|
||||
<th>{{ 'label.email'|trans }}</th>
|
||||
<th>{{ 'email'|trans }}</th>
|
||||
<td><a href="mailto:{{ customer.email }}">{{ customer.email }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if customer.homepage is not empty %}
|
||||
<tr>
|
||||
<th>{{ 'label.homepage'|trans }}</th>
|
||||
<th>{{ 'homepage'|trans }}</th>
|
||||
<td><a href="{{ customer.homepage }}" target="_blank">{{ customer.homepage|replace({'https://': '', 'http://': ''}) }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if customer.fax is not empty %}
|
||||
<tr>
|
||||
<th>{{ 'label.fax'|trans }}</th>
|
||||
<th>{{ 'fax'|trans }}</th>
|
||||
<td>{{ customer.fax }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if customer.timezone is not empty %}
|
||||
<tr>
|
||||
<th>{{ 'label.timezone'|trans }}</th>
|
||||
<td>{{ customer_now|date_full }} ({{ customer.timezone }})</td>
|
||||
<th>{{ 'timezone'|trans }}</th>
|
||||
<td>{{ customer_now|date_time }} ({{ customer.timezone }})</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if customer.currency is not empty %}
|
||||
<tr>
|
||||
<th>{{ 'label.currency'|trans }}</th>
|
||||
<th>{{ 'currency'|trans }}</th>
|
||||
<td>{{ customer.currency }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if is_granted('details', customer) %}
|
||||
{% if customer.number is not empty %}
|
||||
<tr>
|
||||
<th>{{ 'label.number'|trans }}</th>
|
||||
<th>{{ 'number'|trans }}</th>
|
||||
<td>{{ customer.number }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if customer.vatId is not empty %}
|
||||
<tr>
|
||||
<th>{{ 'label.vat_id'|trans }}</th>
|
||||
<th>{{ 'vat_id'|trans }}</th>
|
||||
<td>{{ customer.vatId }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
@@ -127,7 +124,11 @@
|
||||
{% endembed %}
|
||||
|
||||
{{ render(controller('App\\Controller\\CustomerController::projectsAction', {'customer': customer.id, 'page': 1})) }}
|
||||
|
||||
|
||||
{% if can_edit %}
|
||||
{{ include('embeds/rates-table.html.twig', {'id': 'customer_rates_box', 'entity': customer, 'create_url': path('admin_customer_rate_add', {'id': customer.id}), 'delete_route': 'delete_customer_rate', 'currency': customer.currency, 'edit_route': 'admin_customer_rate_edit'}) }}
|
||||
{% endif %}
|
||||
|
||||
{% if stats is not null %}
|
||||
{{ include('embeds/budgets.html.twig', {'entity': customer, 'stats': stats, 'currency': customer.currency}) }}
|
||||
{% endif %}
|
||||
@@ -136,10 +137,6 @@
|
||||
{{ render(controller(controller, {'customer': customer, 'page': 1})) }}
|
||||
{% endfor %}
|
||||
|
||||
{% if can_edit %}
|
||||
{{ include('embeds/rates-table.html.twig', {'id': 'customer_rates_box', 'entity': customer, 'create_url': path('admin_customer_rate_add', {'id': customer.id}), 'delete_route': 'delete_customer_rate', 'currency': customer.currency}) }}
|
||||
{% endif %}
|
||||
|
||||
{% if teams is not null %}
|
||||
{% set options = {'teams': teams, 'team': team} %}
|
||||
{% if is_granted('permissions', customer) %}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
|
||||
{% import "customer/actions.html.twig" as actions %}
|
||||
|
||||
{% block page_title %}{{ 'customers'|trans }}{% endblock %}
|
||||
{% block page_actions %}{{ actions.customer(customer, 'edit') }}{% endblock %}
|
||||
{% extends kimai_context.modalRequest ? 'form.html.twig' : 'base.html.twig' %}
|
||||
|
||||
{% block main %}
|
||||
{% set formEditTemplate = app.request.xmlHttpRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
|
||||
{% set formEditTemplate = kimai_context.modalRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
|
||||
{% set formOptions = {
|
||||
'title': (customer.id is null ? 'create'|trans : 'edit'|trans({}, 'actions')),
|
||||
'form': form,
|
||||
@@ -14,10 +10,10 @@
|
||||
{% embed formEditTemplate with formOptions %}
|
||||
{% block form_body %}
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<div class="col-md-9">
|
||||
{{ form_row(form.name) }}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-3">
|
||||
{{ form_row(form.color) }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,6 +80,13 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if form.teams is defined %}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{{ form_row(form.teams) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{{ form_row(form.visible) }}
|
||||
@@ -93,11 +96,22 @@
|
||||
</div>
|
||||
</div>
|
||||
{% if form.metaFields is defined and form.metaFields is not empty %}
|
||||
{% for meta in form.metaFields|sort((a, b) => a.vars.data.order <=> b.vars.data.order) %}
|
||||
{{ form_row(meta) }}
|
||||
{% endfor %}
|
||||
{{ form_row(form.metaFields) }}
|
||||
{% endif %}
|
||||
{{ form_widget(form) }}
|
||||
{% embed '@theme/embeds/card.html.twig' with {collapsed: true} %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% block box_title %}{{ 'invoices'|trans }}{% endblock %}
|
||||
{% block box_body_class %}{% endblock %}
|
||||
{% block box_body %}
|
||||
{% if form.invoiceTemplate is defined %}
|
||||
{{ form_row(form.invoiceTemplate) }}
|
||||
{% endif %}
|
||||
{% if form.invoiceText is defined %}
|
||||
{{ form_row(form.invoiceText) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
{{ form_rest(form) }}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {'customer': customer, 'projects': projects, 'page': page} %}
|
||||
{% embed '@theme/embeds/card.html.twig' with {'customer': customer, 'projects': projects, 'page': page} %}
|
||||
{% import "project/actions.html.twig" as actions %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% block box_title %}{{ 'projects'|trans }}{% endblock %}
|
||||
{% block box_attributes %}
|
||||
id="project_list_box" data-href="{{ path('customer_projects', {'id': customer.id}) }}" data-reload="kimai.projectUpdate kimai.projectDelete"
|
||||
id="project_list_box" data-reload="kimai.projectUpdate kimai.projectDelete"
|
||||
{% endblock %}
|
||||
{% block box_tools %}
|
||||
{% if is_granted('view_reporting') and is_granted('budget_any', 'project') %}
|
||||
<a class="btn btn-default btn-sm btn-pager" href="{{ path('report_project_view', {'customer': customer.id}) }}" data-toggle="tooltip" data-placement="top" title="{{ 'report_project_view'|trans({}, 'reporting') }}"><i class="{{ 'reporting'|icon }}"></i></a>
|
||||
{% endif %}
|
||||
{% if customer.visible and is_granted('create_project') %}
|
||||
<a class="modal-ajax-form open-edit btn btn-default btn-sm btn-pager" data-href="{{ path('admin_project_create_with_customer', {'customer': customer.id}) }}" data-toggle="tooltip" data-placement="top" title="{{ 'create'|trans }}"><i class="{{ 'create'|icon }}"></i></a>
|
||||
{% endif %}
|
||||
{% if projects|length > 0 %}
|
||||
{{ pagination(projects, { css_container_class: 'pagination pagination-sm inline', routeName: 'customer_projects', routeParams: {'id': customer.id} }) }}
|
||||
{% endif %}
|
||||
{%- if is_granted('report:project') and is_granted('budget_any', 'project') -%}
|
||||
{{ widgets.card_tool_button('reporting', {'title': 'report_project_view', 'translation_domain': 'reporting', 'url': path('report_project_view', {'customer': customer.id})}) }}
|
||||
{%- endif -%}
|
||||
{%- if customer.visible and is_granted('create_project') -%}
|
||||
{{ widgets.card_tool_button('create', {'class': 'modal-ajax-form open-edit', 'title': 'create', 'url': path('admin_project_create_with_customer', {'customer': customer.id})}) }}
|
||||
{%- endif -%}
|
||||
{% endblock %}
|
||||
{% block box_body_class %}no-padding{% endblock %}
|
||||
{% block box_tools_attributes %}data-page="{{ page }}"{% endblock %}
|
||||
{% block box_footer %}
|
||||
{%- if projects|length > 0 -%}
|
||||
<div class="d-flex">
|
||||
{{ pagination(projects, { css_container_class: 'pagination ms-auto m-0', routeName: 'customer_projects', routeParams: {'id': customer.id} }) }}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{% endblock %}
|
||||
{% block box_body_class %}{%- if projects|length > 0 -%}p-0{%- endif -%}{% endblock %}
|
||||
{% block box_body %}
|
||||
{% if projects|length == 0 %}
|
||||
<div class="comment">{{ 'error.no_entries_found'|trans }}</div>
|
||||
@@ -25,11 +28,11 @@
|
||||
<table class="table table-hover dataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'label.name'|trans }}</th>
|
||||
<th class="hidden-xs">{{ 'label.comment'|trans }}</th>
|
||||
<th class="w-min text-right">{{ 'label.project_end'|trans }}</th>
|
||||
<th class="w-min text-center">{{ 'label.visible'|trans }}</th>
|
||||
<th class="w-min text-center">{{ 'label.team'|trans }}</th>
|
||||
<th>{{ 'name'|trans }}</th>
|
||||
<th class="d-none d-md-table-cell">{{ 'comment'|trans }}</th>
|
||||
<th class="d-none d-sm-table-cell w-min text-end">{{ 'project_end'|trans }}</th>
|
||||
<th class="d-none d-sm-table-cell w-min text-center">{{ 'visible'|trans }}</th>
|
||||
<th class="d-none d-sm-table-cell w-min text-center">{{ 'team'|trans }}</th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -37,16 +40,16 @@
|
||||
{% for project in projects %}
|
||||
<tr {{ widgets.project_row_attr(project, now) }}>
|
||||
<td>{{ widgets.label_project(project) }}</td>
|
||||
<td class="hidden-xs">{{ project.comment|comment1line(not app.user.smallLayout) }}</td>
|
||||
<td class="w-min text-right">
|
||||
<td class="d-none d-md-table-cell">{{ project.comment|comment1line(false) }}</td>
|
||||
<td class="d-none d-sm-table-cell w-min text-end">
|
||||
{% if project.end is not null %}
|
||||
{{ project.end|date_short }}
|
||||
{% else %}
|
||||
–
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="w-min text-center">{{ widgets.label_visible(project.visible) }}</td>
|
||||
<td class="w-min text-center">{{ widgets.badge_team_access(project.teams) }}</td>
|
||||
<td class="d-none d-sm-table-cell w-min text-center">{{ widgets.label_visible(project.visible) }}</td>
|
||||
<td class="d-none d-sm-table-cell w-min text-center">{{ widgets.badge_team_access(project.teams) }}</td>
|
||||
<td class="actions">{{ actions.project(project, 'customer_details', true) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@@ -56,7 +59,7 @@
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
<script type="text/javascript">
|
||||
{% set eventName = app.request.xmlHttpRequest ? 'kimai.reloadPage' : 'kimai.initialized' %}
|
||||
{% set eventName = kimai_context.javascriptRequest ? 'kimai.reloadPage' : 'kimai.initialized' %}
|
||||
document.addEventListener('{{ eventName }}', function() {
|
||||
KimaiPaginatedBoxWidget.create('#project_list_box');
|
||||
});
|
||||
|
||||
@@ -1,107 +1,59 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% extends 'datatable.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% import "macros/datatables.html.twig" as tables %}
|
||||
{% import "macros/search.html.twig" as search %}
|
||||
{% 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'},
|
||||
'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 mf_' ~ field.name, 'orderBy': false}
|
||||
}) %}
|
||||
{% endfor %}
|
||||
{% if is_granted('budget_money', 'customer') %}
|
||||
{% set columns = columns|merge({
|
||||
'budget': {'class': 'hidden-xs hidden-sm hidden text-right w-min', 'title': 'label.budget'|trans},
|
||||
}) %}
|
||||
{% endif %}
|
||||
{% if is_granted('budget_time', 'customer') %}
|
||||
{% set columns = columns|merge({
|
||||
'timeBudget': {'class': 'hidden-xs hidden-sm hidden text-right w-min', 'title': 'label.timeBudget'|trans},
|
||||
}) %}
|
||||
{% endif %}
|
||||
{% set columns = columns|merge({
|
||||
'team': {'class': 'text-center w-min', 'orderBy': false},
|
||||
'visible': {'class': 'text-center hidden w-min'},
|
||||
'actions': {'class': 'actions alwaysVisible'},
|
||||
}) %}
|
||||
{% block datatable_row_attr %} {{ widgets.customer_row_attr(entry, now) }}{% endblock %}
|
||||
|
||||
{% set tableName = 'customer_admin' %}
|
||||
|
||||
{% block page_title %}{{ 'customers'|trans }}{% endblock %}
|
||||
{% block page_search %}{{ search.searchModal(toolbarForm) }}{% endblock %}
|
||||
{% block page_actions %}{{ actions.customers('index', query) }}{% 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.customerDelete kimai.customerTeamUpdate'}) }}
|
||||
|
||||
{% for entry in entries %}
|
||||
<tr {{ widgets.customer_row_attr(entry, now) }}>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'name') }}">
|
||||
{{ widgets.label_name(entry.name, entry.color) }}
|
||||
</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'comment') }}">{{ entry.comment|comment1line }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'number') }}">{{ entry.number }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'company') }}">{{ entry.company }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'vat_id') }}">{{ entry.vatId }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'contact') }}">{{ entry.contact }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'address') }}">{{ entry.address }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'country') }}">{{ entry.country|country }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'currency') }}">{{ entry.currency|currency }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'phone') }}">{{ entry.phone }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'fax') }}">{{ entry.fax }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'mobile') }}">{{ entry.mobile }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'email') }}">{{ entry.email }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'homepage') }}">{{ entry.homepage }}</td>
|
||||
{% for field in metaColumns %}
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'mf_' ~ field.name) }}">
|
||||
{{ tables.datatable_meta_column(entry, field) }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'budget') }}">
|
||||
{% if entry.hasBudget() and is_granted('budget', entry) %}
|
||||
{{ entry.budget|money(entry.currency) }}
|
||||
{% else %}
|
||||
–
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'timeBudget') }}">
|
||||
{% if entry.hasTimeBudget() and is_granted('time', entry) %}
|
||||
{{ entry.timeBudget|duration }}
|
||||
{% else %}
|
||||
–
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'team') }}">{{ widgets.badge_team_access(entry.teams) }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'visible') }}">{{ widgets.label_visible(entry.visible) }}</td>
|
||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'actions') }}">{{ actions.customer(entry, 'index') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
{{ tables.data_table_footer(entries, 'admin_customer_paginated') }}
|
||||
{% block datatable_column_value %}
|
||||
{% if column == 'name' %}
|
||||
{{ widgets.label_name(entry.name, entry.color|colorize(entry.name)) }}
|
||||
{% elseif column == 'comment' %}
|
||||
{{ entry.comment|comment1line }}
|
||||
{% elseif column == 'number' %}
|
||||
{{ entry.number }}
|
||||
{% elseif column == 'company' %}
|
||||
{{ entry.company }}
|
||||
{% elseif column == 'vat_id' %}
|
||||
{{ entry.vatId }}
|
||||
{% elseif column == 'contact' %}
|
||||
{{ entry.contact }}
|
||||
{% elseif column == 'address' %}
|
||||
{{ entry.address }}
|
||||
{% elseif column == 'country' %}
|
||||
{{ entry.country|country_name }}
|
||||
{% elseif column == 'currency' %}
|
||||
{{ entry.currency|currency_name }}
|
||||
{% elseif column == 'phone' %}
|
||||
{{ entry.phone }}
|
||||
{% elseif column == 'fax' %}
|
||||
{{ entry.fax }}
|
||||
{% elseif column == 'mobile' %}
|
||||
{{ entry.mobile }}
|
||||
{% elseif column == 'email' %}
|
||||
{{ entry.email }}
|
||||
{% elseif column == 'homepage' %}
|
||||
{{ entry.homepage }}
|
||||
{% elseif column == 'budget' %}
|
||||
{% if entry.hasBudget() and is_granted('budget', entry) %}
|
||||
{{ entry.budget|money(entry.currency) }}
|
||||
{% else %}
|
||||
–
|
||||
{% endif %}
|
||||
{% elseif column == 'timeBudget' %}
|
||||
{% if entry.hasTimeBudget() and is_granted('time', entry) %}
|
||||
{{ entry.timeBudget|duration }}
|
||||
{% else %}
|
||||
–
|
||||
{% endif %}
|
||||
{% elseif column == 'billable' %}
|
||||
{{ widgets.label_boolean(entry.billable) }}
|
||||
{% elseif column == 'team' %}
|
||||
{{ widgets.badge_team_access(entry.teams) }}
|
||||
{% elseif column == 'visible' %}
|
||||
{{ widgets.label_visible(entry.visible) }}
|
||||
{% elseif column == 'actions' %}
|
||||
{{ actions.customer(entry, 'index') }}
|
||||
{% elseif column starts with 'mf_' %}
|
||||
{{ widgets.meta_field_value(entry, data) }}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
|
||||
{% import "customer/actions.html.twig" as actions %}
|
||||
|
||||
{% block page_title %}{{ 'customers'|trans }}{% endblock %}
|
||||
{% block page_actions %}{{ actions.customer(customer, 'permissions') }}{% endblock %}
|
||||
{% extends kimai_context.modalRequest ? 'form.html.twig' : 'base.html.twig' %}
|
||||
|
||||
{% block main %}
|
||||
{{ include(app.request.xmlHttpRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig', {
|
||||
{{ include(kimai_context.modalRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig', {
|
||||
'title': ('permissions'|trans({}, 'actions')) ~ ': ' ~ customer.name,
|
||||
'form': form,
|
||||
'back': path('customer_details', {'id': customer.id})
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
{% extends app.request.xmlHttpRequest ? 'form.html.twig' : 'base.html.twig' %}
|
||||
{% import "customer/actions.html.twig" as actions %}
|
||||
|
||||
{% block page_title %}{{ 'customers'|trans }}{% endblock %}
|
||||
{% block page_actions %}{{ actions.customer(customer, 'rates') }}{% endblock %}
|
||||
{% extends kimai_context.modalRequest ? 'form.html.twig' : 'base.html.twig' %}
|
||||
|
||||
{% block main %}
|
||||
{{ include(app.request.xmlHttpRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig', {
|
||||
{{ include(kimai_context.modalRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig', {
|
||||
'title': customer.name,
|
||||
'form': form,
|
||||
'back': path('admin_customer')
|
||||
|
||||
Reference in New Issue
Block a user