{% load i18n %} {% if display_mode == "list" %}
{% for z in item.value %} {% if z.key %} {% if item.schema == "ipam_subnet" or item.schema == "ipam_vlan" %} {{ z.display|default:z.key }} {% else %} {{ z.display|default:z.key }} {% endif %} {% else %} {{ z.display }} {% endif %} {% if not forloop.last %}, {% endif %}{% endfor %}
{% elif display_mode == "detail" %} {% comment %} No dangling-reference guard here, unlike list mode: a missing instance links to the placeholder id 999999999999 that FieldSchema emits. Carried over as-is on purpose - see plan decision 3. {% endcomment %}
{% for z in item.value %} {{ z.display|default:z.key }} {% endfor %}
{% elif display_mode == "print" %}{# print has never linked a reference: plain text, as before #}
{% for z in item.value %}{{ z.display|default:z.key }}{% if not forloop.last %}, {% endif %}{% endfor %}
{% elif display_mode == "edit" %} {% if item.is_multi %}
{% if item.bigset %} {% endif %} {% for instance in item.value %} {% endfor %} {% if item.description %}
{{ item.description }}
{% endif %}
{% else %}
{% if item.bigset %} {% endif %} {% for instance in item.value %} {% endfor %} {% if item.description %}
{{ item.description }}
{% endif %}
{% endif %} {% else %}{% endif %}