{% import "adminlte_full/macros/bootstrap4.html" as bootstrap %} {% macro render_card_wrapper(content=none, card_id='', color='default', bg_color='', outline=false, card_class='') %}
{% if content is none %}{{ caller() }}{% else %}{{ content }}{% endif %}
{% endmacro %} {% macro render_card_tools(maximizable=false, collapsable=false, expandable=false, closable=false, data_source=none, refreshable_options='') %}
{% if data_source %} {% endif %} {% if maximizable %} {% endif %} {% if collapsable or expandable %} {% endif %} {% if closable %} {% endif %}
{% endmacro %} {% macro render_card(title='', content=none, body=none, body_class='', card_id='', card_class='', color='default', bg_color='', outline=false, maximizable=false, collapsable=false, expandable=false, closable=false, data_source=none, refreshable_options='', overlay=false, overlay_dark=false) %} {% if expandable %} {% set card_class = card_class + ' collapsed-card' %} {% endif %} {% if body is not none %} {% set content %}
{{ body }}
{% endset %} {% elif content is none %} {% set content = caller() %} {% endif %} {% call render_card_wrapper(card_id=card_id, card_class=card_class, color=color, bg_color=bg_color, outline=outline) %}

{{ title }}

{{ render_card_tools(maximizable=maximizable, collapsable=collapsable, expandable=expandable, closable=closable, data_source=data_source, refreshable_options=refreshable_options) }}
{{ content }} {% if overlay or overlay_dark %}
{% endif %} {% endcall %} {% endmacro %} {% macro render_info_box(text, number, icon, color='', bg_color='', progress=none, progress_description='') %}
{{ text }} {{ number }} {% if progress is not none %}
{% if progress_description %} {{ progress_description }} {% endif %} {% endif %}
{% endmacro %} {% macro render_small_box(title, text, icon, url='', color='', overlay=false, overlay_dark=false) %}
{% if overlay or overlay_dark %}
{% endif %}

{{ title|safe }}

{{ text|safe }}

{% if url %} More info {% endif %}
{% endmacro %} {% macro render_table(data, headers=none, footer=false, auto_number=false, table_id='', table_class='') %} {% set table_header %} {% if headers %} {% if auto_number %}#{% endif %} {% if headers is mapping %} {{ headers.values() | join('' | safe) }} {% else %} {{ headers | join('' | safe) }} {% endif %} {% endif %} {% endset %} {{ table_header }} {% for row in data %} {% if auto_number %}{% endif %} {{ caller(row) }} {% endfor %} {% if footer %}{{ table_header }}{% endif %}
{{ loop.index }}
{% endmacro %} {% macro render_data_table(data, headers=none, footer=false, auto_number=false, table_id='', table_class='') %} {% call(row) render_table(data=data, headers=headers, footer=footer, auto_number=auto_number, table_id=table_id, table_class=table_class) %} {% if headers is mapping %} {% for col in headers %} {{ row[col] }} {% endfor %} {% else %} {% for col in row %} {{ col }} {% endfor %} {% endif %} {% endcall %} {% endmacro %}