{% from '_icon.html' import render_icon %}
{% for action in block.items %} {% if action.type == 'export' %} {% if action.icon %}{{ render_icon(action.icon) }}{% endif %}{{ action.label | e }} {% elif action.type == 'link' %} {{ action.label | e }} {% elif action.type == 'overlay' %} {% elif action.type == 'select' %} {% include '_action_select.html' %} {% elif action.type == 'menu' %}
{% for item in action.items %} {% if item.type == 'export' %} {% if item.icon %}{{ render_icon(item.icon) }}{% endif %}{{ item.label | e }} {% elif item.type == 'link' %} {{ item.label | e }} {% elif item.type == 'overlay' %} {% elif item.type == 'select' %} {% set action = item %} {% include '_action_select.html' %} {% elif item.type == 'button' %} {% else %} {# Nested menus are not rendered as action buttons. #} {% endif %} {% endfor %}
{% else %} {% endif %} {% endfor %}