diff --git a/app/templates/components/table.html b/app/templates/components/table.html index b5fe9e9d2..a37a5ef89 100644 --- a/app/templates/components/table.html +++ b/app/templates/components/table.html @@ -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 %}