{# the html form view for the search form; expected to be of a SearchForm type #}
{% set headers = _args.headers %}
{% set pagination = _args.pagination|default(null) %}
{# clear sorting #}
{% set headers = headers|map((header) => header|merge({
sort: null,
})) %}
{# render the content of the table; due to complexities with twig it needs done this way #}
{% set content = (block('items') is defined) ? block('items') : null %}
{# embed the sortable table view #}
{% embed '@ui2022/table.html.twig' with {
header: {
labels: headers,
},
} %}
{% block items %}
{{ content|raw }}
{% endblock %}
{% endembed %}
{# add pagination if it is given #}
{% if pagination %}
{% include '@ui2022/pagination.html.twig' with pagination %}
{% endif %}