{% extends "flask_deck/base.html" %} {% block breadcrumbs %} / {{ view.plural_label }} {% endblock %} {% block content %}

{{ view.plural_label }}{% if trashed %} · {{ _("Trash") }}{% endif %}

{% if result.total_known %} {% if result.total_is_estimated %}~{% endif %}{{ "{:,}".format(result.total) }} {{ _("matching records") }} {% else %} {{ result.items | length }} rows (cursor stream) {% endif %} {% if result.pagination_mode == 'cursor' %} · keyset cursor{% endif %}

{% if supports_soft_delete %} {{ deck_icon("archive", 13) }} {{ _("Trash") }} {{ result.trashed_count }} {% endif %} {% if supports_kanban and not trashed %} {% endif %} {% if can_import %} {{ deck_icon("upload", 13) }} {{ _("Import") }} {% endif %} {% if can_export %}
{% endif %} {% if can_create %} {{ deck_icon("plus", 13) }} {{ _("New") }} {{ view.label }} {% endif %}
{{ render_slot('list_above_table') }} {% if view.quick_tabs and view_mode == 'table' and not trashed %}
{% for tab in view.quick_tabs %} {% if tab.normalized_tone != 'neutral' %} {{ tab.label }} {% else %} {{ tab.label }} {% endif %} {{ "{:,}".format(result.tab_counts.get(tab.key, 0)) }} {% endfor %}
{% endif %}
{% if trashed %}{% endif %} {% if active_tab %}{% endif %} {% if view_mode == 'board' %}{% endif %} {% for fk, fv in result.active_filters.items() %} {% endfor %} {% if view.resolved_searchable %} {% endif %} {% if search_term or result.active_filters %} {{ _("Reset") }} {% endif %}
{% if filter_specs %} {% endif %} {% if view_mode == 'table' %}
{% endif %}
{% if filter_specs %}
{% if trashed %}{% endif %} {% if search_term %}{% endif %} {% if active_tab %}{% endif %} {% if view_mode == 'board' %}{% endif %} {% for f in filter_specs %}
{% if f.type == 'boolean' %} {% elif f.type == 'enum' %} {% elif f.type == 'fk' %} {% elif f.type in ['datetime', 'date'] %} {% elif f.type in ['integer', 'float', 'decimal'] %}
{% elif f.type == 'json' %}
{% elif f.type == 'array' %}
{% else %} {% endif %}
{% endfor %}
{{ _("Clear") }}
{% endif %} {% if result.active_filters %}
Active filters: {% for fk, fv in result.active_filters.items() %} {{ fk }}={{ fv }} {{ deck_icon("x", 11) }} {% endfor %}
{% endif %} {% if view_mode == 'board' %}
{% for col in kanban_columns %}
{{ col.label }} {{ col.records | length }}
{% for obj in col.records %} {% set pk_str = encode_pk(extract_pk(obj, view.meta)) %} {% endfor %}
{% endfor %}
{% else %}
{% for col in visible_cols %} {% endfor %} {% for obj in result.items %} {% set pk_str = encode_pk(extract_pk(obj, view.meta)) %} {% for col in visible_cols %} {% endfor %} {% else %} {% endfor %} {% if page_aggregates %} {% for col in visible_cols %} {% endfor %} {% endif %}
{% if col in view.resolved_sortable %} {% set next_dir = 'asc' if (sort_by == col and sort_dir == 'desc') else 'desc' %} {{ view.get_column_label(col) }} {% if sort_by == col %} {{ deck_icon("arrow-down" if sort_dir == 'desc' else "arrow-up", 11) }} {% else %} {{ deck_icon("arrow-up-down", 11) }} {% endif %} {% else %} {{ view.get_column_label(col) }} {% endif %} {{ _("Actions") }}
{% if col in inline_editable and not trashed %} {% set fmeta = view.meta.fields_by_name[col] %} {% set cur_val = obj | attr(col) %} {% if fmeta.field_type == 'boolean' %} {% elif fmeta.field_type == 'enum' %} {% set cur_enum = cur_val.value if (cur_val is not none and cur_val.value is defined) else cur_val %} {% else %} {{ view.format_cell(col, obj, auth=deck.auth, user=current_user, media_url_builder=media_url_builder, rel_repr=rel_repr) }} {% endif %} {% elif (loop.first and col not in view.file_fields) or (loop.index == 2 and visible_cols[0] in view.file_fields) %} {{ view.format_cell(col, obj, auth=deck.auth, user=current_user, media_url_builder=media_url_builder, rel_repr=rel_repr) }} {% else %} {{ view.format_cell(col, obj, auth=deck.auth, user=current_user, media_url_builder=media_url_builder, rel_repr=rel_repr) }} {% endif %}
{% if trashed and can_edit %}
{% else %} {% if can_edit %} {{ deck_icon("edit", 14) }} {% endif %} {% endif %}
No {{ view.plural_label | lower }} match the current criteria.
{% if col in page_aggregates %} {% set agg_op, agg_val = page_aggregates[col] %} {{ agg_op }}: {{ "{:,.2f}".format(agg_val / 100.0) if col.endswith('_cents') else ("{:,.1f}".format(agg_val)) }} {% elif loop.first %} {{ _("Page Summary") }} {% endif %}
{% if result.pagination_mode == 'cursor' %} Cursor stream · {{ result.items | length }} rows{% if result.total_known %} · {% if result.total_is_estimated %}~{% endif %}{{ "{:,}".format(result.total) }} total{% endif %} · j/k navigate
{% if result.has_prev %} {{ _("First") }} {% endif %} {% if result.prev_cursor %} {{ deck_icon("chevron-left", 13) }} {{ _("Prev") }} {% endif %} {% if result.next_cursor %} {{ _("Next") }} {{ deck_icon("chevron-right", 13) }} {% endif %}
{% else %} Page {{ result.page }} of {{ result.pages }} · {{ "{:,}".format(result.total) }} total · j/k navigate · Space peek
{% if result.page > 1 %} {{ deck_icon("chevron-left", 13) }} {{ _("Prev") }} {% endif %} {% if result.page < result.pages %} {{ _("Next") }} {{ deck_icon("chevron-right", 13) }} {% endif %}
{% endif %}
{% endif %} {% endblock %}