mirror of
https://github.com/kevinpapst/kimai2.git
synced 2024-12-22 12:18:29 +00:00
3a5d7a62de
- added "today" as selector in date-range dropdown - added feature to prevent auto-select of dropdowns with only one entry - added hint that no changes were detected in batch update - added negative invoice sums are possible (e.g. for credit notes) - fix project list is expanded after submission - fix invalid date parsing causes 500 - fix: prevent auto-select of activities in export and invoice form (in case only one global activity exists) - fix team assignments for customer and project were not saved (using API now) - fix form fieldset with legend styling (e.g. team project assignment) - fix required meta-field were forced to have a value in batch update - fix tomselect meta-field was not disabled in batch update - fix unset internal rate is shown as 0 - fix one minute rounding problem in duration-only mode with "now" being default time - fix column width and label for duration-only mode - tech debt: cleanup invoice template (remove invoice layout) - tech debt: reorder for simpler comparison with invoice form - possible BC for devs: remove unused methods from form trait - bump composer packages (includes new translations for auth screens)
68 lines
3.3 KiB
Twig
68 lines
3.3 KiB
Twig
{% embed '@theme/embeds/card.html.twig' with {'id': id, 'entity': entity, 'create_url': create_url, 'delete_route': delete_route, 'currency': currency} %}
|
|
{% import "macros/widgets.html.twig" as widgets %}
|
|
{% block box_attributes %}id="{{ id }}"{% endblock %}
|
|
{% block box_title %}
|
|
{{ 'rates.title'|trans }}
|
|
{% endblock %}
|
|
{% block box_tools %}
|
|
{{ widgets.card_tool_button('create', {'class': 'modal-ajax-form open-edit', 'title': 'create', 'url': create_url}) }}
|
|
{% endblock %}
|
|
{% block box_body_class %}{% if rates is not empty %}p-0{% endif %}{% endblock %}
|
|
{% block box_body %}
|
|
{% if rates is empty %}
|
|
<div class="comment">{{ 'rates.empty'|trans }}</div>
|
|
{% else %}
|
|
<table class="table dataTable">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
{{ 'user'|trans }}
|
|
</th>
|
|
<th class="text-end">
|
|
{{ 'hourlyRate'|trans }}
|
|
</th>
|
|
<th class="d-none d-sm-table-cell text-end">
|
|
{{ 'internalRate'|trans }}
|
|
</th>
|
|
<th class="text-center">
|
|
{{ 'fixedRate'|trans }}
|
|
</th>
|
|
<th class="actions"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for rate in rates %}
|
|
<tr class="modal-ajax-form open-edit" data-href="{{ path(edit_route, {'id': entity.id, 'rate': rate.id}) }}">
|
|
<td>
|
|
{% if rate.user is not null %}
|
|
{{ widgets.user_avatar(rate.user) }}
|
|
{% else %}
|
|
–
|
|
{% endif %}
|
|
</td>
|
|
<td class="text-end">
|
|
{{ rate.rate|money(currency) }}
|
|
</td>
|
|
<td class="d-none d-sm-table-cell text-end">
|
|
{% if rate.internalRate is not null %}
|
|
{{ rate.internalRate|money(currency) }}
|
|
{% else %}
|
|
–
|
|
{% endif %}
|
|
</td>
|
|
<td class="text-center">
|
|
{{ widgets.label_boolean(rate.fixed) }}
|
|
</td>
|
|
<td class="actions">
|
|
<div class="btn-group">
|
|
<a href="{{ path(edit_route, {'id': entity.id, 'rate': rate.id}) }}" class="modal-ajax-form btn btn-icon">{{ icon('edit', true) }}</a>
|
|
<a href="{{ path(delete_route, {'id': entity.id, 'rateId': rate.id}) }}" class="btn btn-icon api-link" data-question="confirm.delete" data-event="kimai.rateUpdate kimai.rateDelete" data-method="DELETE" data-msg-error="action.delete.error" data-msg-success="action.delete.success">{{ icon('delete', true) }}</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
{% endblock %}
|
|
{% endembed %} |