{% endblock %}
{% block column_header %}
{% with {
active_attr: { class: 'border-bottom border-primary text-primary' },
label_attr: { class: 'text-decoration-none text-reset d-block w-100 h-100 py-1' },
} %}
{{ parent() }}
{% endwith %}
{% endblock %}
{% block action_bar %}
{% set display_filter_action = filtration_enabled and filters|length > 0 and filtration_form.children|length > 0 %}
{% set display_export_action = exporting_enabled and exporters|length > 0 %}
{% if title or has_active_filters or display_filter_action or display_export_action or personalization_enabled %}
{% if translation_domain is not same as false %}
{{ title|trans(title_translation_parameters, translation_domain) }}
{% else %}
{{ title }}
{% endif %}
{#{% if filtration_enabled and filtration_form and filtration_form.vars.search_fields|length > 0 %}
{% endblock %}
{# @see Kreyu\Bundle\DataTableBundle\Action\Type\Dropdown\DropdownActionType #}
{% block action_dropdown_control %}
{% set class = 'btn btn-primary d-inline-flex align-items-center gap-2' %}
{% if with_caret %}
{% set class = class ~ ' dropdown-toggle' %}
{% endif %}
{% set attr = {
'type': 'button',
'id': data_table.vars.name ~ '--' ~ context.value ~ '-action--' ~ name ~ '--button',
'aria-expanded': 'false',
'data-bs-toggle': 'dropdown',
}|merge(attr|merge({
class: (class ~ ' ' ~ attr.class|default(''))|trim
})) %}
{# We must define the confirmation modals outside the ul/li, because the ul is in "position: relative" and that does not work properly with modals. #}
{% for action in actions %}
{% if action.vars.confirmation %}
{% set href = action.vars.href %}
{% set confirm_button_attr = { href }|merge(confirm_button_attr|default({})) %}
{% set confirmation = action.vars.confirmation %}
{% if batch %}
{% set confirm_button_attr = {
'data-kreyu--data-table-bundle--batch-target': 'identifierHolder',
}|merge(confirm_button_attr) %}
{% endif %}
{% with { confirm_button_attr, confirmation } only %}{{ block('action_confirmation_modal') }}{% endwith %}
{% endif %}
{% endfor %}