{% extends "crud/tab_view.html" %} {% block tab_content %} {%- set is_advanced_filter = request.args.get('advanced_filter') if filter_enabled else none -%} {%- set tab_list_url = url_for(view.endpoint + '.' + list_ep, id=parent_id) -%}
{{ icon("add", style="font-size: 14px;") }} {{ construct.t("crud-add-new-item") }} {%- if search_enabled %}
{%- if filter_enabled %} {{ icon("filter", style="font-size: 16px;") }} {%- endif %}
{%- elif filter_enabled and not is_advanced_filter %} {{ icon("filter", style="font-size: 16px;") }} {%- endif %}
{%- if filter_enabled %} {%- endif %} {% for fld, type in fields %} {% endfor %} {%- if filter_enabled %} {% for fld, type in fields %} {% endfor %} {%- endif %} {% for row in data %} {% for field, type in fields %} {% endfor %} {% endfor %} {% if not data %} {% endif %}
{{ construct.t(type.name).capitalize() }} {{ construct.t("crud-action-title") }}
{% if not type.skipfilter %} {% if type.field_type == 'enum' %} {% else %} {% endif %} {% endif %}
{{ icon("search", style="font-size: 16px;") }}
{% if type.field_type == 'bool' %} {% if type.format_value(field, row) %} {{ icon("check", style="color: var(--fcu-success); font-size: 20px; font-variation-settings: 'FILL' 1") }} {% else %} {{ icon("cancel", style="color: var(--fcu-danger); font-size: 20px; font-variation-settings: 'FILL' 1") }} {% endif %} {% elif type.field_type == 'set' %} {% set val = type.format_value(field, row) %} {% if val %}
{% for item in val %} {% if item in type.sets %} {{ construct.t(type.sets[item]) }} {% endif %} {% endfor %}
{% endif %} {% elif type.field_type == 'manyrelated' %}
{% for item in type.format_value(field, row) %} {{ item }} {% endfor %}
{% else %} {{ type.format_value(field, row) }} {% endif %}
{{ icon("edit") }} {% for action in list_actions %} {{ icon(action.icon) }} {% endfor %} {# nosemgrep: django-no-csrf-token — Flask app; CSRF is handled by {{ csrf_field() }} below, not Django's {% csrf_token %}. #}
{{ csrf_field() }}
{{ construct.t("crud-no-items-found") }}
{% if pagination and pagination.pages > 1 %}
{% endif %} {% endblock %}