multirow FK

This commit is contained in:
Priec
2026-08-07 22:39:59 +02:00
parent c47e236713
commit 0d78556428
10 changed files with 46 additions and 216 deletions

View File

@@ -195,26 +195,8 @@
</section>
<section class="builder-section">
<h2>Relations</h2>
{% if page.draft.links.is_empty() %}
<p class="hint">No other tables in this profile to link to.</p>
{% else %}
<p class="hint">Each active relation adds a <code>&lt;table&gt;_id</code> column.</p>
<ul class="builder-list">
{% for link in page.draft.links %}
<li>
<button type="button" class="toggle mode-{{ link.mode.label() }}" hx-post="/admin/tables/builder"
hx-include="#table-form" hx-target="#builder" hx-swap="innerHTML"
hx-vals='{"action": "cycle-link", "index": "{{ loop.index0 }}"}'>{{ link.mode.label() }}</button>
<code>{{ link.linked_table_name }}</code>
</li>
{% endfor %}
</ul>
{% endif %}
{% for link in page.draft.links %}
<input type="hidden" name="link_tables" value="{{ link.linked_table_name }}">
<input type="hidden" name="link_modes" value="{{ link.mode.label() }}">
{% for table in page.draft.relation_tables %}
<input type="hidden" name="relation_tables" value="{{ table }}">
{% endfor %}
</section>