{% macro render_table(items, labels, display, actions) %} {% if items %} {% for label in labels %} {% endfor %} {% if actions %} {% endif %} {% for item in items %} {% for display_item in display %} {% endif %} {% endfor %}
{{ label }}Actions
{{ item|getattr(display_item) }} {% endfor %} {% if actions %} {% for action in actions %} {{ action.label }} {% endfor %}
{% else %}

There are no items available.

{% endif %} {% endmacro %} {% macro render_create_button(url, label) %}
Create new {{ label }}
{% endmacro %}