X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7Bcard_id%7D%7D/form?a=blobdiff_plain;f=templates%2F_macros.html;h=14395914052efd6511eddc6cc82bbe947dda62c4;hb=214aeb0f2e29712518dc776b0713bcdbb8945a2f;hp=b1f0104e134363bc9b8dcd24f6d6066d08996f00;hpb=5383b5cf1520a1cb66b4966dd4ee449a99f5e465;p=plomtask diff --git a/templates/_macros.html b/templates/_macros.html index b1f0104..1439591 100644 --- a/templates/_macros.html +++ b/templates/_macros.html @@ -18,6 +18,7 @@ {% macro simple_checkbox_table(title, items, type_name, list_name, add_string="add", historical=false) %} +{% if items|length > 0 %} {% for item in items %} @@ -25,12 +26,13 @@ {% endfor %}
-{% if historical %}{{item.title_then}}{% else %}{{item.title.newest|e}}{% endif %} +{% if historical is true %}{{item.title_then}}{% else %}{{item.title.newest|e}}{% endif %}
-{{add_string}}: +{% endif %} +{{add_string}}: {% endmacro %}