{% from "admin/components/csrf-field.html" import csrf_field %} {% from "admin/components/icons.html" import icon %} {# Bulk-actions listbox, rendered separately from ui/table.html so components/list_content.html can put it beside the search bar instead of stacked above the table -- row checkboxes still reference the form it renders via the HTML `form=` attribute (see ui/table.html), so the form itself never has to wrap the table. Picking an action submits immediately, with no separate "Apply" step: it writes the chosen route onto the form's `action` and calls requestSubmit(), not .submit(), which would skip the onsubmit handler running the confirm decision below. The route and confirmation text ride in as data-url/data-confirm on the clicked item and are read back through $el.dataset, so neither has to survive being embedded in a JS string. Included, not a macro, so it shares list_content.html's ambient context (actions, base_path, model_admin). #} {% if actions %}
{{ csrf_field(csrf_token) }} {# The query the list is showing, carried on the form so that "select all matching" can be resolved server-side. A checkbox only ever reaches the rows on this page, so without these the filtered set would be unreachable from a 25-row window. #} {% for name, value in (filters or {}).items() %} {% endfor %} {# w-full on both the positioning wrapper and the trigger: a button can only fill a box that is itself full width, and the above is what the stacked toolbar actually stretches. #}
{% for action in actions %}
{{ _(action.label) }}
{% endfor %}
{% endif %}