{% load i18n %} {% for field in schema %}
{% with value=data|get_item_or_original:field.key %}
{% if field.help and field.type != 'boolean' and field.type != 'option' %} {{ field.help|get_language_item }} {% endif %} {% if field.type == 'string' %} {% if field.choices and field.choices|length > 0 %} {% else %} {% endif %} {% elif field.type == 'option' %}
{% elif field.type == 'boolean' %}
{% elif field.type == 'choices' %} {% for choice, translation in field.choices.items %}
{% endfor %} {% elif field.type == 'date' %}
{% elif field.type == 'integer' %}
{% if field.unit %}
{{ field.unit }}
{% endif %}
{% else %} {{ value }} {% endif %} {% if field.type == 'option' %}
{% if field.option_help %} {{ field.option_help|get_language_item }} {% endif %}
{% endif %} {% if field.required and value|default:'' == '' %}
{% trans "Assembly__additional_field__required" %}
{% endif %}
{% endwith %}
{% endfor %}