hidden columns from clients

This commit is contained in:
Filipriec
2026-08-30 13:00:55 +02:00
parent cdb41c365a
commit 86efa82293
15 changed files with 263 additions and 6 deletions

View File

@@ -82,7 +82,7 @@
<section class="panel">
<h2>{{ nav.tr("td-columns-now") }} <span class="count">{{ detail.columns.len() }}</span></h2>
<table class="builder-table">
<thead><tr><th>{{ nav.tr("td-col-column") }}</th><th>{{ nav.tr("td-col-type") }}</th><th>{{ nav.tr("td-col-notes") }}</th></tr></thead>
<thead><tr><th>{{ nav.tr("td-col-column") }}</th><th>{{ nav.tr("td-col-type") }}</th><th>{{ nav.tr("td-col-notes") }}</th><th>{{ nav.tr("td-form-visibility") }}</th></tr></thead>
<tbody>
{% for column in detail.columns %}
<tr>
@@ -91,6 +91,21 @@
<td>
{%- for flag in column.flags(nav.locale) %}<span class="tag">{{ flag }}</span>{% endfor -%}
</td>
<td>
{% if page.table_is_writable() %}
<form hx-post="/admin/tables/presentation/visibility"
hx-target="#table-panel" hx-swap="innerHTML">
<input type="hidden" name="profile" value="{{ page.selection.profile }}">
<input type="hidden" name="table" value="{{ page.selection.table }}">
<input type="hidden" name="expected_row_version" value="{{ detail.row_version }}">
<input type="hidden" name="column_id" value="{{ column.column_id }}">
<input type="hidden" name="hidden_from_forms" value="{% if column.hidden_from_forms %}false{% else %}true{% endif %}">
<button class="secondary" type="submit">
{% if column.hidden_from_forms %}{{ nav.tr("td-show-in-forms") }}{% else %}{{ nav.tr("td-hide-from-forms") }}{% endif %}
</button>
</form>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>