{% extends "base.html" %} {% block title %}{{ entity.plural }} — homebase{% endblock %} {% block content %}
{% for col in entity.list_columns %} {% set field = entity.fields.get(col) %} {% if field and field.type.value in ['enum', 'boolean'] %}
{% endif %} {% endfor %}
{% if items %}
{% for col in entity.list_columns %} {% endfor %} {% for item in items %} {% for col in entity.list_columns %} {% endfor %} {% endfor %}
{{ col | replace('_', ' ') }}
{% set field = entity.fields.get(col) %} {% set val = item.get(col, '') %} {% if col == entity.display_field %} {{ val }} {% elif field and field.type.value == 'enum' %} {{ val or '—' }} {% elif field and field.type.value == 'url' and val %} {{ val | truncate(40) }} {% elif field and field.type.value == 'relation' and val %} {% set display = resolve_relation(field.target, val) %} {{ display }} {% elif field and field.type.value == 'date' %} {{ val or '—' }} {% elif field and field.type.value == 'number' %} {{ val if val is not none else '—' }} {% else %} {{ val or '—' }} {% endif %}
{% if total > items | length %}

Showing {{ items | length }} of {{ total }}

{% endif %} {% else %}

No {{ entity.plural | lower }} found. Create one.

{% endif %} {% endblock %}