Fix spcing on empty table

This commit is contained in:
Chris Hill-Scott
2016-01-22 12:09:44 +00:00
parent fb3b6510c4
commit b00f9d5821

View File

@@ -25,14 +25,15 @@
{% macro list_table(items, caption='', empty_message='', field_headings=[], field_headings_visible=True, caption_visible=True) -%}
{% set parent_caller = caller %}
{% call mapping_table(caption, field_headings, field_headings_visible, caption_visible) %}
{% for item in items %}
{% call row() %}
{{ parent_caller(item) }}
{% endcall %}
{% endfor %}
{%- endcall %}
{% if not items %}
{% if items %}
{% call mapping_table(caption, field_headings, field_headings_visible, caption_visible) %}
{% for item in items %}
{% call row() %}
{{ parent_caller(item) }}
{% endcall %}
{% endfor %}
{%- endcall %}
{% else %}
<p class="table-empty-message">
{{ empty_message }}
</p>