From b00f9d582122ee4428de5da3ac30929cf792434e Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 22 Jan 2016 12:09:44 +0000 Subject: [PATCH] Fix spcing on empty table --- app/templates/components/table.html | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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 %}

{{ empty_message }}