{% macro table(header, columns, rows, tabletype, context = None) %} {% set c = "table" %} {% if tabletype == "sink" %} {% set c = "table table-striped table-bordered table-hover" %} {% endif %} {% if tabletype == "striped" %} {% set c = "table table-striped" %} {% endif %} {% if tabletype == "hover" %} {% set c = "table table-hover" %} {% endif %} {% set tc = "table-responsive" %} {% if tabletype == "bordered" %} {% set tc = "table-responsive table-bordered" %} {% endif %}
{{header}}
{% for col in columns %} {% endfor %} {% for row in rows %} = loop.index %} class="{{context[loop.index-1]}}" {% endif%}> {% for d in row %} {% endfor %} {% endfor %}
{{col}}
{{d}}
{% endmacro %}