{% macro buttons_create(roles) %} {% for endpoint in roles['create'] %}
{% endfor %} {% endmacro %} {% macro buttons(roles, model, type_glyph={'read': 'search', 'update': 'pencil', 'delete': 'trash'}) %} {% for type in ('read', 'update', 'delete') %} {% if type in roles %} {% for endpoint in roles[type] %} {% endfor %} {% endif %} {% endfor %} {% endmacro %}