Files
kimai2/templates/embeds/rates-table.html.twig
Kevin Papst 2583fdf20e small bugfixes (#2655)
* improve report visibility
* fix timesheet duration, which breaks validation
* added contributing section in README
* do not allow to change project for existing activities - fixes #2576
* bump theme version to fix FOSUserBundle dependency
* use entity color instead of inherited one - fixes #2200
2021-07-10 00:37:03 +02:00

61 lines
2.7 KiB
Twig

{% embed '@AdminLTE/Widgets/box-widget.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 %}
{{ 'label.hourlyRate'|trans }}
{% endblock %}
{% block box_tools %}
<a class="modal-ajax-form open-edit btn btn-default btn-sm" data-href="{{ create_url }}" data-toggle="tooltip" data-placement="top" title="{{ 'create'|trans }}"><i class="{{ 'create'|icon }}"></i></a>
{% endblock %}
{% block box_body_class %}no-padding{% endblock %}
{% block box_body %}
{% if rates is empty %}
<div class="comment">{{ 'rates.empty'|trans }}</div>
{% else %}
<table class="table dataTable">
<thead>
<tr>
<th>
{{ 'label.user'|trans }}
</th>
<th>
{{ 'label.hourlyRate'|trans }}
</th>
<th>
{{ 'label.rate_internal'|trans }}
</th>
<th>
{{ 'label.fixedRate'|trans }}
</th>
<th class="actions"></th>
</tr>
</thead>
<tbody>
{% for rate in rates %}
<tr>
<td>
{% if rate.user is not null %}
{{ widgets.user_avatar(rate.user) }}
{% else %}
&ndash;
{% endif %}
</td>
<td>
{{ rate.rate|money(currency) }}
</td>
<td>
{{ rate.internalRate|money(currency) }}
</td>
<td>
{{ widgets.label_boolean(rate.fixed) }}
</td>
<td class="actions">
<a href="{{ path(delete_route, {'id': entity.id, 'rateId': rate.id}) }}" class="btn btn-default btn-xs 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"><i class="{{ 'delete'|icon }}"></i></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}
{% endembed %}