0
0
mirror of https://github.com/kevinpapst/kimai2.git synced 2024-12-22 12:18:29 +00:00
kevinpapst_kimai2/templates/embeds/datatable.html.twig
2023-07-04 17:01:29 +02:00

36 lines
1.2 KiB
Twig

{% import "macros/datatables.html.twig" as tables %}
{% from "macros/widgets.html.twig" import nothing_found %}
{% if not dataTable.hasResults() %}
{{ nothing_found(dataTable.getReloadEvents()) }}
{% else %}
{% block datatable_header %}
{{ tables.header(dataTable) }}
{% endblock %}
{% block datatable_before %}{% endblock %}
{% set sortedColumns = dataTable.sortedColumnNames %}
{% block datatable_outer %}
{% for entry in dataTable %}
{% block datatable_row %}
<tr{% block datatable_row_attr %}{% endblock %}>
{% for column, data in sortedColumns %}
{% block datatable_column %}
<td class="{{ tables.class(dataTable, column) }}"{% block datatable_column_attr %}{% endblock %}>
{% block datatable_column_value %}{{ column }}{% endblock %}
</td>
{% endblock %}
{% endfor %}
</tr>
{% endblock %}
{% endfor %}
{% endblock %}
{% block datatable_after %}{% endblock %}
{% block datatable_footer %}
{{ tables.footer(dataTable) }}
{% endblock %}
{% endif %}