talbe definition web

This commit is contained in:
Priec
2026-08-06 17:47:53 +02:00
parent f13def52c1
commit 5f4b026624
14 changed files with 870 additions and 273 deletions

View File

@@ -135,7 +135,7 @@
<option value="no" {% if page.draft.columns.quantity_ledger_input != "yes" %}selected{% endif %}>no</option>
<option value="yes" {% if page.draft.columns.quantity_ledger_input == "yes" %}selected{% endif %}>yes</option>
</select>
<small>INT, BIGINT, DECIMAL or MONEY only.</small>
<small>{{ page.draft.columns.quantity_ledger_types() }} only.</small>
</label>
</div>
<button type="button" class="secondary" hx-post="/admin/tables/builder" hx-include="#table-form"
@@ -155,11 +155,17 @@
<td><code>{{ column.name }}</code></td>
<td>{{ column.data_type }}</td>
<td>
<button type="button" class="toggle" hx-post="/admin/tables/builder" hx-include="#table-form"
hx-target="#builder" hx-swap="innerHTML"
hx-vals='{"action": "toggle-index", "index": "{{ loop.index0 }}"}'>
{% if column.indexed %}[x]{% else %}[ ]{% endif %}
</button>
{# A compound column expands into schema-managed companions, so
there is no column of its own name to index. #}
{% if page.draft.columns.is_indexable(*loop.index0) %}
<button type="button" class="toggle" hx-post="/admin/tables/builder" hx-include="#table-form"
hx-target="#builder" hx-swap="innerHTML"
hx-vals='{"action": "toggle-index", "index": "{{ loop.index0 }}"}'>
{% if column.indexed %}[x]{% else %}[ ]{% endif %}
</button>
{% else %}
<span class="hint"></span>
{% endif %}
</td>
<td>
{% if column.quantity_ledger %}<span class="tag">quantity ledger</span>{% endif %}