Files
kimai2/templates/embeds/rates-table.html.twig
Kevin Papst 31a8f887a5 Release 2.58 (#5952)
* bump version
* fix formatting locale reset after embedded controller sub-requests (#5944)
* fix GHSA-c6w6-57jj-62vh
* fix GHSA-m492-gv72-xvxj
* fix GHSA-jr9p-4h4j-6c58
* make sure to only use JS logic to call API endpoints
* fixes GHSA-r8vr-m544-qh4h
* make sure to only use JS logic to call API endpoints
* fix GHSA-rw46-qg69-vg6h
* fix GHSA-pj8j-p4g4-4vw8 - prevent kimai from rendering images via markdown
* fix GHSA-pj8j-p4g4-4vw8 - use a safe network client to prevent SSRF via images
* fix GHSA-xv4r-4885-gwpg
* fix GHSA-pgcc-vfmc-7cw5 - move GET routes to API with POST method to prevent CSRF
* fix tooltip survives page reload
* updated wizard images
* split wizard and password reset subscriber into two classes
* relax upper php limit
* added zizmor workflow scans and apply findings
* user permissions <name>_other_profile  now respect teams
* move all linting steps to new job
* updated docker image version names
* use .env.local for storing APP_SECRET
* improve build order and use given tag as ref for checkout, not default main branch
* improved APP_SECRET handling, see entrypoint.sh
* use local code for building the image for more flexibility, added dockerignore
2026-05-25 15:39:47 +02:00

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 %}
&ndash;
{% 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 %}
&ndash;
{% 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="#" data-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">{{ icon('delete', true) }}</a>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}
{% endembed %}