{# Reusable macros for list pages #} {# Text input filter #} {% macro filter_text(id, label, placeholder='Filter...', wide=false) %}
{% endmacro %} {# Multi-select dropdown filter - id: Element ID - label: Display label - options: List of options - either strings or objects with 'value' and 'label' keys - column: DataTable column index for client-side filtering (optional, omit for server-side) - min_search: Minimum number of options to show search input (default: 5) - with_search: Override to disable search entirely (default: true) #} {% macro multi_dropdown(id, label, options, column=none, min_search=5, with_search=true) %}
{% endmacro %} {# Empty row for when no items found #} {% macro empty_row(colspan, message='List is empty.') %} {{ message }} {%- endmacro %} {# Collapsible filter toggle button #} {% macro filter_toggle_button(collapse_id='filterCollapse') %} {% endmacro %} {# Checkbox for mass operations #} {% macro mass_checkbox(value) %} {%- endmacro %} {# Single mass action button #} {% macro mass_action_button(action, label, confirm='', btn_class='btn-danger') %} {% endmacro %}