{% load dlux_tags %} {% load dlux_translation %}
{% for field in auto_detail_fields %}
{{ field.label }}
{% if field.is_html %} {{ field.value|safe }} {% else %} {{ field.value }} {% endif %}
{% empty %} {% if not extra_detail_fields %}
{{ DLUX_STRINGS.no_details|default:"No details recorded." }}
{% endif %} {% endfor %} {% comment %} Rows a model computes for itself, from `get_modal_context()`. `auto_detail_fields` is built from stored fields, and it is built *after* that context is merged, so a model cannot append to it — a derived value (a price converted at today's rate, a total that is a property) has nowhere else to go. Returning `extra_detail_fields` is how a model adds one, and they render after the generated rows. {% endcomment %} {% for field in extra_detail_fields %}
{{ field.label }}
{% if field.is_html %} {{ field.value|safe }} {% else %} {{ field.value }} {% endif %}
{% endfor %}
{% if related_object %}
{{ DLUX_STRINGS.label_related_object|default:"Related Object" }}
{{ related_object_model }}
{{ related_object }}
{{ DLUX_STRINGS.label_id|default:"ID" }}: {{ related_object.pk }}
{% endif %} {% dlux_audit_trail object %} {% if request.GET.action == 'view' and not ribbon %}
{% endif %}