From 7afee30c14e4d1f52a07dcb60cfadeb3db5493d4 Mon Sep 17 00:00:00 2001 From: radex Date: Fri, 13 Oct 2023 23:05:05 +0200 Subject: [PATCH] clean up vcard template --- webapp/templates/vcard.html | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/webapp/templates/vcard.html b/webapp/templates/vcard.html index cba1fe4..f7c8ff4 100644 --- a/webapp/templates/vcard.html +++ b/webapp/templates/vcard.html @@ -1,22 +1,18 @@ {% macro field(name, width=4) -%} -{% if profile[name] %} -{% with field = profile[name]|first %}
-

{{ name|readable }}

-

{{ field }}

- {% if field.name in can_delete %}delete{% endif %} - {% if name in can_modify %} - Edit - {% endif %} +

{{ name|readable }}

+ {% if profile[name] %} + {% with field = profile[name]|first %} +

{{ field }}

+ {% if field.name in can_delete %}delete{% endif %} + {% if name in can_modify %} + Edit + {% endif %} + {% endwith %} + {% endif %}
-{% endwith %} -{% else %} -
- {{ name|readable }} -
-{% endif %} {%- endmacro %} {% macro multifield(name, code=False, width=4) -%}