{% extends "base.html" %} {% block title %}{{ table.name }} — Table detail{% endblock %} {% block head_extra %} {% endblock %} {% block content %} {# Back link — prefer the first parent package, fall back to /catalog. #} ← Back to {% if parent_packages %}{{ parent_packages[0].name }}{% else %}catalog{% endif %} {# ── Hero card ─────────────────────────────────────────────── #} {% set _qmode = (table.query_mode or 'local')|lower %} {% set _glyph_bg = table.color or '#0073D1' %} {% set _initials = (table.name or table.id or '?').split()|map('first')|join('')|upper %}
{% if table.icon %}{{ table.icon }}{% else %}{{ _initials[:2] }}{% endif %}

{{ table.name }} {{ table.id }}

{% if table.description %}

{{ table.description }}

{% endif %}
{{ _qmode }} {# Skip the source-type pill when it's redundant with the mode pill — internal tables have source_type == query_mode == 'internal' and rendering two identical pills is visual noise. #} {% if table.source_type and table.source_type|lower != _qmode %} {{ table.source_type }} {% endif %} {# Qualified-name code chip — only useful for sources that round-trip to an upstream system (Keboola bucket.table, BigQuery dataset.table). Internal tables have no meaningful upstream qualified name. #} {% if table.bucket and table.source_type|lower != 'internal' %} · {{ table.bucket }}{% if table.source_table %}.{{ table.source_table }}{% endif %} {% endif %} {% if rows_display %} · {{ rows_display }} rows {% endif %} {% if size_display %} · {{ size_display }} {% endif %} {% if last_sync_display %} · Last sync {{ last_sync_display }} {% endif %}
{% if parent_packages %}
In package{{ '' if parent_packages|length == 1 else 's' }}: {% for p in parent_packages %} {{ p.name }}{% if not loop.last %}, {% endif %} {% endfor %}
{% endif %}
{# The original layout had four editorial sections — Sample questions, What's inside (columns), Things to know, Pairs well with — that the admin could fill in. Per user feedback they read as noise on a page whose job is "what is this table and where do I find it"; the structural answer is the hero (name + description + parent packages). Dropping the four sections keeps the page focused. The PATCH endpoint + columns query still exist for tools that read them programmatically; this only changes the user-facing render. #} {# Inline-edit / sync-trigger / docs-PATCH JS was removed alongside the four editorial sections it drove (sample_questions, columns, things_to_know, pairs_well_with). The endpoints (`POST /api/sync/trigger`, `PATCH /api/admin/registry/{id}/docs`) still exist for direct API callers + admin tooling. #} {% endblock %}