Release 2.57 (#5929)
This commit is contained in:
@@ -167,7 +167,7 @@
|
||||
{% if comments is not null %}
|
||||
{% set options = {'form': commentForm, 'comments': comments} %}
|
||||
{% if can_edit %}
|
||||
{% set options = options|merge({'route_pin': 'customer_comment_pin', 'route_delete': 'customer_comment_delete'}) %}
|
||||
{% set options = options|merge({'route_pin': 'toggle_customer_comment_pin', 'route_api_options': {'id': customer.id}, 'route_delete': 'delete_customer_comment'}) %}
|
||||
{% endif %}
|
||||
{{ include('embeds/comments.html.twig', options) }}
|
||||
{% endif %}
|
||||
@@ -178,7 +178,7 @@
|
||||
{{ parent() }}
|
||||
<script type="text/javascript">
|
||||
document.addEventListener('kimai.initialized', function() {
|
||||
KimaiReloadPageWidget.create('kimai.customerTeamUpdate kimai.customerUpdate kimai.teamUpdate kimai.projectTeamUpdate kimai.rateUpdate');
|
||||
KimaiReloadPageWidget.create('kimai.commentUpdate kimai.customerTeamUpdate kimai.customerUpdate kimai.teamUpdate kimai.projectTeamUpdate kimai.rateUpdate');
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% embed '@theme/embeds/card.html.twig' with {'form': form, 'comments': comments, 'route_pin': route_pin|default(null), 'route_delete': route_delete|default(null), 'delete_by_user': delete_by_user|default(false)} %}
|
||||
{% embed '@theme/embeds/card.html.twig' with {'form': form, 'comments': comments, 'route_pin': route_pin|default(null), 'route_delete': route_delete|default(null), 'route_api_options': route_api_options|default(null), 'delete_by_user': delete_by_user|default(false)} %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% block box_title %}{{ 'comment'|trans }}{% endblock %}
|
||||
{% block box_attributes %}id="comments_box"{% endblock %}
|
||||
@@ -26,12 +26,31 @@
|
||||
</div>
|
||||
<div class="col-auto align-self-center">
|
||||
{% if route_pin is not null %}
|
||||
<a href="{{ path(route_pin, {'id': comment.id, 'token': csrf_token('comment.pin')}) }}" class="btn{% if not comment.pinned %} btn-ghost-secondary{% else %} btn-ghost-info{% endif%} btn-icon {% if comment.pinned %}active{% endif %} pin-comment-link">{{ icon('pin') }}</a>
|
||||
{% if route_api_options is not null %}
|
||||
<a href="#" data-href="{{ path(route_pin, {'comment': comment.id}|merge(route_api_options)) }}" class="btn btn-action pin-comment-link api-link" data-event="kimai.commentUpdate" data-method="PATCH" data-msg-error="action.update.error">
|
||||
{% else %}
|
||||
<a href="{{ path(route_pin, {'id': comment.id, 'token': csrf_token('comment.pin')}) }}" class="btn btn-action pin-comment-link">
|
||||
{% endif %}
|
||||
|
||||
{% if comment.pinned %}
|
||||
<i class="text-primary {{ 'pin'|icon }}"></i>
|
||||
{% else %}
|
||||
{{ icon('pin') }}
|
||||
{% endif %}
|
||||
|
||||
</a>
|
||||
{% elseif comment.pinned %}
|
||||
{{ icon('pin') }}
|
||||
{% endif %}
|
||||
|
||||
{% if route_delete is not null and ((not delete_by_user) or (delete_by_user and comment.createdBy.id == app.user.id)) %}
|
||||
<a href="{{ path(route_delete, {'id': comment.id, 'token': csrf_token('comment.delete')}) }}" class="confirmation-link btn btn-ghost-secondary btn-icon delete-comment-link" data-question="confirm.delete">{{ icon('delete') }}</a>
|
||||
{% if route_api_options is not null %}
|
||||
<a href="#" data-href="{{ path(route_delete, {'comment': comment.id}|merge(route_api_options)) }}" class="btn btn-action pin-comment-link api-link" data-event="kimai.commentUpdate" data-method="DELETE" data-question="confirm.delete" data-msg-error="action.delete.error">
|
||||
{% else %}
|
||||
<a href="{{ path(route_delete, {'id': comment.id, 'token': csrf_token('comment.delete')}) }}" class="confirmation-link btn btn-action delete-comment-link" data-question="confirm.delete">
|
||||
{% endif %}
|
||||
{{ icon('delete') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
<div class="dropdown-menu">
|
||||
{% for id, cfg in group %}
|
||||
{% set btnTitle = (cfg.title)|trans %}
|
||||
{% if loop.first %}
|
||||
{% if id == type %}
|
||||
{% set btnTitle = 'default'|trans %}
|
||||
{% endif %}
|
||||
<a href="#" class="dropdown-item startExportBtn" data-type="{{ id }}">
|
||||
|
||||
@@ -74,14 +74,20 @@ mpdf-->
|
||||
<td class="text-right">
|
||||
{% set classLeft = 'text-left' %}
|
||||
{% set classRight = 'text-right text-nowrap padding-left' %}
|
||||
<table style="width: 240px">
|
||||
<table style="width: 270px">
|
||||
<tr>
|
||||
<td class="{{ classLeft }}">{{ 'date'|trans }}</td>
|
||||
<td class="{{ classRight }}">{{ invoice['invoice.date'] }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="{{ classLeft }}">{{ 'invoice.service_date'|trans }}</td>
|
||||
<td class="{{ classRight }}">{{ invoice['query.end_month'] }} {{ invoice['query.end_year'] }}</td>
|
||||
<td class="{{ classRight }}">
|
||||
{% if invoice['invoice.first_month'] != invoice['invoice.last_month'] or invoice['invoice.first_year'] != invoice['invoice.last_year'] %}
|
||||
{{ invoice['invoice.first_month'] }} {{ invoice['invoice.first_year'] }}
|
||||
–
|
||||
{% endif %}
|
||||
{{ invoice['invoice.last_month'] }} {{ invoice['invoice.last_year'] }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="{{ classLeft }}">{{ 'invoice.number'|trans }}</td>
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
<tr>
|
||||
<th class="ps-0">{{ 'date'|trans }}</th>
|
||||
<td contenteditable="true">
|
||||
{% if invoice['query.begin_month_number'] != invoice['query.end_month_number'] or invoice['query.begin_year'] != invoice['query.end_year'] %}
|
||||
{{ invoice['query.begin'] }} - {{ invoice['query.end'] }}
|
||||
{% if invoice['invoice.first_month'] != invoice['invoice.last_month'] or invoice['invoice.first_year'] != invoice['invoice.last_year'] %}
|
||||
{{ invoice['invoice.first'] }} - {{ invoice['invoice.last'] }}
|
||||
{% else %}
|
||||
{{ invoice['query.end_month'] }} {{ invoice['query.end_year'] }}
|
||||
{{ invoice['invoice.last_month'] }} {{ invoice['invoice.last_year'] }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
{% if comments is not null %}
|
||||
{% set options = {'form': commentForm, 'comments': comments} %}
|
||||
{% if can_edit %}
|
||||
{% set options = options|merge({'route_pin': 'project_comment_pin', 'route_delete': 'project_comment_delete'}) %}
|
||||
{% set options = options|merge({'route_pin': 'toggle_project_comment_pin', 'route_api_options': {'id': project.id}, 'route_delete': 'delete_project_comment'}) %}
|
||||
{% endif %}
|
||||
{{ include('embeds/comments.html.twig', options) }}
|
||||
{% endif %}
|
||||
@@ -176,7 +176,7 @@
|
||||
{{ parent() }}
|
||||
<script type="text/javascript">
|
||||
document.addEventListener('kimai.initialized', function() {
|
||||
KimaiReloadPageWidget.create('kimai.customerTeamUpdate kimai.projectTeamUpdate kimai.activityTeamUpdate kimai.projectUpdate kimai.teamUpdate kimai.customerUpdate kimai.rateUpdate');
|
||||
KimaiReloadPageWidget.create('kimai.commentUpdate kimai.customerTeamUpdate kimai.projectTeamUpdate kimai.activityTeamUpdate kimai.projectUpdate kimai.teamUpdate kimai.customerUpdate kimai.rateUpdate');
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="font-weight-medium">
|
||||
<a href="{{ url }}" class="link-dark stretched-link text-reset">
|
||||
<a href="{{ url }}" class="stretched-link text-reset">
|
||||
{{ title|trans }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user