{% 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") }} {% if result.full_total is not none and result.full_total != result.total %} ({{ _("of") }} {{ "{:,}".format(result.full_total) }} {{ _("total") }}) {% endif %} {% 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") }} {% if view.count_mode != 'none' %} {{ result.trashed_count }} {% endif %} {% endif %} {% if (supports_kanban or supports_calendar or supports_gallery or supports_tree) 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 %} {% if tab.key in result.tab_counts %} {{ "{:,}".format(result.tab_counts.get(tab.key, 0)) }} {% endif %} {% endfor %}
{% endif %} {% if date_hierarchy_data and (date_hierarchy_data.choices or date_hierarchy_data.active_dh) %} {% endif %}
{% if trashed %}{% endif %} {% if active_tab %}{% endif %} {% if view_mode != 'table' %}{% endif %} {% if active_dh %}{% endif %} {% if sort_param_value %}{% endif %} {% for fk, fv in result.active_filters.items() %} {% endfor %} {% for ck, cv in active_custom_filters.items() %} {% endfor %} {% if view.resolved_searchable %}
{% if view.search_help_text %}
{{ view.search_help_text }}
{% endif %}
{% endif %} {% if search_term or result.active_filters or active_custom_filters or active_dh %} {{ _("Reset") }} {% endif %}
{% set active_filter_total = (result.active_filters | length) + (active_custom_filters | length) %} {% if filter_specs or custom_filter_specs %} {% endif %} {% if can_save_views %}
{% endif %} {% if view_mode == 'table' %}
{% endif %}
{% if active_role_default_view %}
Showing role default view {{ active_role_default_view.name }} (role: {{ active_role_default_view.default_for_role }}). Clear Default View
{% endif %} {% if filter_specs or custom_filter_specs %} {% endif %} {% if result.active_filters or active_custom_filters or active_dh %}
Active filters: {% for fk, fv in result.active_filters.items() %} {{ fk }}={{ fv }} {{ deck_icon("x", 11) }} {% endfor %} {% for ck, cv in active_custom_filters.items() %} {{ ck }}={{ cv }} {{ deck_icon("x", 11) }} {% endfor %} {% if active_dh %} date={{ active_dh }} {{ deck_icon("x", 11) }} {% endif %}
{% 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 %}
{% elif view_mode == 'calendar' %}
{{ deck_icon("chevron-left", 13) }} Prev {{ calendar_data.month_label }} Next {{ deck_icon("chevron-right", 13) }}
Field: {{ view.get_column_label(calendar_date_field) }}
{% for wd in ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] %}
{{ wd }}
{% endfor %} {% for week in calendar_data.weeks %} {% for cell in week %}
{{ cell.day }}
{% for obj in cell['items'][:6] %} {% set pk_str = encode_pk(extract_pk(obj, view.meta)) %} {{ (obj | attr(calendar_title_field)) if calendar_title_field else view.format_record_repr(obj, auth=deck.auth, user=current_user) }} {% endfor %}
{% endfor %} {% endfor %}
{% elif view_mode == 'gallery' %}
{% elif view_mode == 'tree' %}
{% for col in visible_cols %}{% endfor %} {% for node in tree_nodes %} {% set obj = node.obj %} {% set pk_str = encode_pk(extract_pk(obj, view.meta)) %} {% for col in visible_cols %} {% endfor %} {% else %} {% endfor %}
{{ view.get_column_label(col) }}{{ _("Actions") }}
{% if loop.first %} {% else %} {{ view.format_cell(col, obj, auth=deck.auth, user=current_user, media_url_builder=media_url_builder, rel_repr=rel_repr, rel_url_builder=rel_url_builder) }} {% endif %}
No hierarchical {{ view.plural_label | lower }} found.
{% else %} {% if sort_specs | length > 1 %}
Multi-sort (Shift+Click): {% for s_col, s_dir in sort_specs %} {{ loop.index }}. {{ view.get_column_label(s_col) }} {{ '↓' if s_dir == 'desc' else '↑' }} {% endfor %} Clear sort
{% endif %} {% if result.total_known and result.total > (result.items | length) %} {% endif %}
{% for col in visible_cols %} {% endfor %} {% set is_batch_mode = (inline_edit_mode == 'batch' and inline_editable and not trashed) %} {% for obj in result.items %} {% set row_idx = loop.index0 %} {% set pk_str = encode_pk(extract_pk(obj, view.meta)) %} {% set detail_href = url_for(bp_name ~ '.model_detail', slug=view.meta.slug, raw_pk=pk_str, _return_qs=(return_qs or None)) %} {% set edit_href = url_for(bp_name ~ '.model_edit', slug=view.meta.slug, raw_pk=pk_str, _return_qs=(return_qs or None)) if (can_edit and not trashed) else '' %} {% for col in visible_cols %} {% endfor %} {% else %} {% endfor %} {% if aggregates_display %} {% for col in visible_cols %} {% endfor %} {% endif %}
{% if col in view.resolved_sortable %} {% set rank_info = sort_rank_map.get(col) %} {% set cur_col_dir = rank_info[1] if rank_info else '' %} {% set next_dir = 'asc' if cur_col_dir == 'desc' else 'desc' %} {{ view.get_column_label(col) }} {% if rank_info %} {{ deck_icon("arrow-down" if cur_col_dir == 'desc' else "arrow-up", 11) }} {% if sort_specs | length > 1 %} {{ rank_info[0] }} {% endif %} {% else %} {{ deck_icon("arrow-up-down", 11) }} {% endif %} {% else %} {{ view.get_column_label(col) }} {% endif %} {{ _("Actions") }}
{% if is_batch_mode %} {% endif %} {% if col in inline_editable and not trashed %} {% set fmeta = view.meta.fields_by_name[col] %} {% set cur_val = obj | attr(col) %} {% if is_batch_mode %} {% if fmeta.field_type == 'boolean' and fmeta.nullable %} {% set cur_bool_str = 'true' if cur_val is true else ('false' if cur_val is false else '') %} {% elif 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 %} {% elif col in inline_fk_options %} {% elif fmeta.field_type in ['string', 'integer', 'float', 'decimal', 'date'] %} {% set raw_edit_val = cur_val.isoformat() if (fmeta.field_type == 'date' and cur_val is not none) else (cur_val if cur_val is not none else '') %} {% else %} {{ view.format_cell(col, obj, auth=deck.auth, user=current_user, media_url_builder=media_url_builder, rel_repr=rel_repr, rel_url_builder=rel_url_builder) }} {% endif %} {% elif 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 %} {% elif col in inline_fk_options %} {% elif fmeta.field_type in ['string', 'integer', 'float', 'decimal', 'date'] %} {% set raw_edit_val = cur_val.isoformat() if (fmeta.field_type == 'date' and cur_val is not none) else (cur_val if cur_val is not none else '') %} {% else %} {{ view.format_cell(col, obj, auth=deck.auth, user=current_user, media_url_builder=media_url_builder, rel_repr=rel_repr, rel_url_builder=rel_url_builder) }} {% endif %} {% elif (col in list_display_links_set and col not in view.file_fields) or (view.list_display_links is none and 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, rel_url_builder=rel_url_builder) }} {% else %} {{ view.format_cell(col, obj, auth=deck.auth, user=current_user, media_url_builder=media_url_builder, rel_repr=rel_repr, rel_url_builder=rel_url_builder) }} {% endif %}
{% if trashed and can_edit %}
{% if return_qs %}{% endif %}
{% else %} {% for act in row_actions %}
{% if return_qs %}{% endif %}
{% endfor %} {% if can_edit %} {{ deck_icon("edit", 14) }} {% endif %} {% endif %}
No {{ view.plural_label | lower }} match the current criteria.
{% if col in aggregates_display %} {% set agg_op, agg_disp = aggregates_display[col] %} {{ agg_op }}: {{ agg_disp }} {% elif loop.first %} {{ _("All Filtered Summary") if view.aggregate_scope == 'all' else _("Page Summary") }} {% endif %}
{% if inline_edit_mode == 'batch' and inline_editable and not trashed %} {% endif %} {% endif %} {% if view_mode in ['table', 'gallery'] %}
{% 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 view.page_size_options %} {% endif %} {% 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 view.page_size_options %} {% endif %} {% if result.page > 1 %} {{ deck_icon("chevron-left", 13) }} {{ _("Prev") }} {% endif %} {% for pnum in result.page_window %} {% if pnum is none %} … {% elif pnum == result.page %} {{ pnum }} {% else %} {{ pnum }} {% endif %} {% endfor %} {% if result.page < result.pages %} {{ _("Next") }} {{ deck_icon("chevron-right", 13) }} {% endif %}
{% endif %}
{% endif %} {% endblock %} {% block extra_scripts %} {% endblock %}