{% macro sortable_items(items, draggable, toggle_enabled, invisible_handle=false) -%} {# Caller is called with an item and must render the action buttons. #} {% for item in items %}
  • {% if draggable or invisible_handle %}
    {% endif %} {% if toggle_enabled %}
    {% endif %}
    {{ item.title }}
    {% if caller %} {{ caller(item) }} {% endif %}
  • {% endfor %} {%- endmacro %} {% macro sortable_list(items, classes="", draggable=true, title=none, id=none, invisible_handle=false) -%} {# Caller is called with an item and must render the action buttons. #} {% set _caller = caller %}
    {% if title %}
    {{ title }}
    {% endif %}
    {%- endmacro %} {% macro sortable_lists(enabled_title, enabled_items, disabled_title, disabled_items, classes="", draggable=true, id=none, invisible_handle=false) -%} {# Caller is called with an item and must render the action buttons. #} {% set _caller = caller %}
    {{ enabled_title }}
    {{ disabled_title }}
    {%- endmacro %}