Release 2.16 (#4780)
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ path('favorites_timesheets_add', {'id': favorite.timesheet.id}) }}" class="list-group-item-actions remote-modal-reload">
|
||||
<i class="{{ 'bookmark'|icon }}"></i>
|
||||
{{ icon('bookmark') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
{% if icon is defined and icon is not empty %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">
|
||||
<i class="{{ icon|icon(false, icon) }}"></i>
|
||||
{{ icon(icon) }}
|
||||
</div>
|
||||
{{ block('form_widget_simple') }}
|
||||
</div>
|
||||
@@ -252,7 +252,7 @@
|
||||
{% if icon is not empty %}
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">
|
||||
<i class="{{ icon|icon(false, icon) }}"></i>
|
||||
{{ icon(icon) }}
|
||||
</div>
|
||||
{{ block('form_widget_simple') }}
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
{%- macro search_filter(route, options) -%}
|
||||
{% set opts = {'performSearch': 1} %}
|
||||
{% if options.begin is defined and options.end is defined %}
|
||||
{% set opts = opts|merge({'daterange': (options.begin|report_date ~ ' - ' ~ options.end|report_date)}) %}
|
||||
{% endif %}
|
||||
{% if options.customer is defined %}
|
||||
{% set opts = opts|merge({'customers[]': options.customer}) %}
|
||||
{% endif %}
|
||||
{% if options.project is defined %}
|
||||
{% set opts = opts|merge({'projects[]': options.project}) %}
|
||||
{% endif %}
|
||||
{% if options.activity is defined %}
|
||||
{% set opts = opts|merge({'activities[]': options.activity}) %}
|
||||
{% endif %}
|
||||
{% if options.user is defined %}
|
||||
{% set opts = opts|merge({'users[]': options.user}) %}
|
||||
{% endif %}
|
||||
{% if options.preview is defined %}
|
||||
{% set opts = opts|merge({'preview': options.preview}) %}
|
||||
{% endif %}
|
||||
{{- path(route, opts) -}}
|
||||
{% endmacro %}
|
||||
|
||||
{%- macro page_actions(actions) -%}
|
||||
{% set btnClasses = 'btn-primary' %}
|
||||
{% set helpClasses = '' %}
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
}
|
||||
|
||||
let linkElement = target;
|
||||
linkElement.innerHTML = '{{ icon('spinner') }}';
|
||||
linkElement.innerHTML = '<i class="{{ 'spinner'|icon }} fa-pulse"></i>';
|
||||
|
||||
const isActive = linkElement.classList.contains('permOn');
|
||||
let url = linkElement.dataset['href'].replace(/__VALUE__/, isActive ? '0' : '1').replace(/__TOKEN__/, getPermissionToken());
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'reporting/report_by_user_layout.html.twig' %}
|
||||
|
||||
{% block report_content %}
|
||||
{% embed 'reporting/report_by_user_data.html.twig' %}
|
||||
{% embed 'reporting/report_by_user_data.html.twig' with {with_links: true} %}
|
||||
{% block period_name %}
|
||||
<th class="text-center text-nowrap{% if column is weekend(user) %} weekend{% endif %}{% if column is today %} today{% endif %}">
|
||||
{{ column|date_weekday }}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
{%- set totalsDuration = {} -%}
|
||||
{%- set totalsInternalRate = {} -%}
|
||||
{%- set totalsRate = {} -%}
|
||||
{%- set with_links = with_links is defined ? with_links : false -%}
|
||||
{% if dataType == 'rate' %}
|
||||
{% set dataTypeTitle = 'stats.amountTotal' %}
|
||||
{% elseif dataType == 'internalRate' %}
|
||||
@@ -14,10 +15,16 @@
|
||||
{% endif %}
|
||||
{% set columns = 0 %}
|
||||
{% set totalCurrency = false %}
|
||||
{% set filter_options = {'begin': begin, 'end': end} %}
|
||||
{% set filter_route = 'timesheet' %}
|
||||
{% if is_granted('view_other_timesheet') %}
|
||||
{% set filter_route = 'admin_timesheet' %}
|
||||
{% set filter_options = filter_options|merge({'user': user.id}) %}
|
||||
{% endif %}
|
||||
<table class="table table-hover dataTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% block upper_left %}{{ user.displayName }}{% endblock %}</th>
|
||||
<th>{% block upper_left %}{{ user.displayName|sanitize_dde }}{% endblock %}</th>
|
||||
<th class="text-center reportDataTypeTitle">{{ dataTypeTitle|trans }}</th>
|
||||
{% for column in period.dateTimes %}
|
||||
{% block period_name %}
|
||||
@@ -42,6 +49,7 @@
|
||||
<tr class="summary">
|
||||
<td>{{ widgets.label_customer(data.customer) }}</td>
|
||||
<td class="text-center total">
|
||||
{% if with_links %}<a href="{{ widgets.search_filter(filter_route, filter_options|merge({'customer': data.customer.id})) }}">{% endif %}
|
||||
{% if dataType == 'rate' %}
|
||||
{{ data.rate|money(currency) }}
|
||||
{% elseif dataType == 'internalRate' %}
|
||||
@@ -49,6 +57,7 @@
|
||||
{% else %}
|
||||
{{ data.duration|duration(decimal) }}
|
||||
{% endif %}
|
||||
{% if with_links %}</a>{% endif %}
|
||||
</td>
|
||||
<td colspan="{{ columns }}"></td>
|
||||
</tr>
|
||||
@@ -61,13 +70,15 @@
|
||||
<strong>{{ widgets.label_project(project.project) }}</strong>
|
||||
</td>
|
||||
<td class="text-nowrap text-center total">
|
||||
{% if dataType == 'rate' %}
|
||||
{% if with_links %}<a href="{{ widgets.search_filter(filter_route, filter_options|merge({'project': project.project.id})) }}">{% endif %}
|
||||
{%- if dataType == 'rate' -%}
|
||||
{{ project.rate|money(currency) }}
|
||||
{% elseif dataType == 'internalRate' %}
|
||||
{%- elseif dataType == 'internalRate' -%}
|
||||
{{ project.internalRate|money(currency) }}
|
||||
{% else %}
|
||||
{%- else -%}
|
||||
{{ project.duration|duration(decimal) }}
|
||||
{% endif %}
|
||||
{%- endif -%}
|
||||
{% if with_links %}</a>{% endif %}
|
||||
</td>
|
||||
{% for column in project.data.data %}
|
||||
{% set dateKey = column.date|report_date %}
|
||||
@@ -93,6 +104,7 @@
|
||||
{{ widgets.label_activity(activity.activity) }}
|
||||
</td>
|
||||
<td class="text-nowrap text-center">
|
||||
{% if with_links %}<a href="{{ widgets.search_filter(filter_route, filter_options|merge({'activity': activity.activity.id})) }}">{% endif %}
|
||||
{% if dataType == 'rate' %}
|
||||
{{ activity.rate|money(currency) }}
|
||||
{% elseif dataType == 'internalRate' %}
|
||||
@@ -100,6 +112,7 @@
|
||||
{% else %}
|
||||
{{ activity.duration|duration(decimal) }}
|
||||
{% endif %}
|
||||
{% if with_links %}</a>{% endif %}
|
||||
</td>
|
||||
{% for column in activity.data.data %}
|
||||
<td class="text-nowrap text-center day-total {% block column_classes_activity %}{% endblock %}">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'reporting/report_by_user_layout.html.twig' %}
|
||||
|
||||
{% block report_content %}
|
||||
{% embed 'reporting/report_by_user_data.html.twig' %}
|
||||
{% embed 'reporting/report_by_user_data.html.twig' with {with_links: true} %}
|
||||
{% block period_name %}
|
||||
<th class="text-center text-nowrap">
|
||||
<a href="{{ path('report_user_month', {'date': column|report_date, 'sumType': dataType, 'user': user.id}) }}">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{% set dataTypeFormat = ' data-format="' ~ constant('App\\Export\\Base\\AbstractSpreadsheetRenderer::DURATION_DECIMAL') ~ '"' %}
|
||||
{% endif %}
|
||||
{% block user_column %}
|
||||
{{ userPeriod.user.displayName }}
|
||||
{{ userPeriod.user.displayName|sanitize_dde }}
|
||||
{% endblock %}
|
||||
{% block duration -%}
|
||||
{{ period.totalDuration / 3600 }}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{% set dataTypeFormat = ' data-format="' ~ constant('App\\Export\\Base\\AbstractSpreadsheetRenderer::DURATION_DECIMAL') ~ '"' %}
|
||||
{% endif %}
|
||||
{% block user_column %}
|
||||
{{ userPeriod.user.displayName }}
|
||||
{{ userPeriod.user.displayName|sanitize_dde }}
|
||||
{% endblock %}
|
||||
{% block duration -%}
|
||||
{{ period.totalDuration / 3600 }}
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-nowrap"{% block user_column_cell_attribute %}{% endblock %}>
|
||||
{{ userPeriod.user.displayName }}
|
||||
{{ userPeriod.user.displayName|sanitize_dde }}
|
||||
</td>
|
||||
{% if showAccountNumber %}
|
||||
<td>{{ userPeriod.user.accountNumber }}</td>
|
||||
|
||||
@@ -54,12 +54,12 @@
|
||||
<td>{{ token.name }}</td>
|
||||
<td>
|
||||
{% if token.lastUsage is not null %}
|
||||
{{ token.lastUsage|date }}
|
||||
{{ token.lastUsage|date_time }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if token.expiresAt is not null %}
|
||||
{{ token.expiresAt|date }}
|
||||
{{ token.expiresAt|date_short }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="col-auto">
|
||||
{% if not url is empty %}<a href="{{ url }}">{% endif %}
|
||||
<span class="bg-{{ options.color|default('green') }} text-white avatar">
|
||||
<i class="{{ options.icon|icon(true, options.icon) }}"></i>
|
||||
{{ icon(options.icon, true) }}
|
||||
</span>
|
||||
{% if not url is empty %}</a>{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<span class="bg-{{ options.color|default('green') }} text-white avatar">
|
||||
<i class="{{ options.icon|icon(true, options.icon) }}"></i>
|
||||
{{ icon(options.icon, true) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col">
|
||||
|
||||
Reference in New Issue
Block a user