web fixes
This commit is contained in:
@@ -205,15 +205,35 @@
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
{# Neither applies to a definition row: it leaves no column to index, and
|
||||
nothing to keep a quantity ledger on. #}
|
||||
{# None of the three applies to a definition row: it leaves no column to
|
||||
index, nothing to keep a quantity ledger on, and no value to require. #}
|
||||
{% if !page.draft.columns.pending_is_compound() %}
|
||||
{#
|
||||
A link is left out rather than defaulted to "no": the server builds an
|
||||
index for every foreign key as it creates the table, and refuses a
|
||||
definition that asks for one on top — so there is no choice to offer.
|
||||
#}
|
||||
{% if page.draft.columns.show_indexing() %}
|
||||
<label>Indexing
|
||||
<select name="column_indexing_input">
|
||||
<option value="no" {% if page.draft.columns.indexing_input != "yes" %}selected{% endif %}>no</option>
|
||||
<option value="yes" {% if page.draft.columns.indexing_input == "yes" %}selected{% endif %}>yes</option>
|
||||
</select>
|
||||
</label>
|
||||
{% else if page.draft.columns.pending_is_auto_indexed() %}
|
||||
<div class="field-note">
|
||||
<span class="field-label">Indexing</span>
|
||||
<p class="hint">Indexed automatically — a link is a foreign key, and the server indexes every one of them.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<label>Required
|
||||
<select name="column_required_input">
|
||||
<option value="no" {% if page.draft.columns.required_input != "yes" %}selected{% endif %}>no</option>
|
||||
<option value="yes" {% if page.draft.columns.required_input == "yes" %}selected{% endif %}>yes</option>
|
||||
</select>
|
||||
<small>A row must carry a value for it.</small>
|
||||
</label>
|
||||
{% if page.draft.columns.show_quantity_ledger() %}
|
||||
<label>Quantity ledger
|
||||
<select name="column_quantity_ledger_input">
|
||||
<option value="no" {% if page.draft.columns.quantity_ledger_input != "yes" %}selected{% endif %}>no</option>
|
||||
@@ -222,8 +242,13 @@
|
||||
<small>{{ page.draft.columns.quantity_ledger_types() }} only.</small>
|
||||
</label>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if page.draft.global %}
|
||||
<p class="hint">A shared table keeps no books of its own, so ACCOUNTING, ACCOUNTING_TRANSFER and quantity-ledger columns are not offered here — each of them posts to one profile's ledger.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if page.draft.columns.pending_is_compound() %}
|
||||
<div class="compound-note">
|
||||
<p><code>{{ page.draft.columns.pending_compound_name() }}</code> is a definition row, not a column of its own. Adding it gives the table:</p>
|
||||
@@ -296,7 +321,9 @@
|
||||
</button>
|
||||
{% endif %}
|
||||
{% else if row.indexed %}
|
||||
<span class="tag">indexed</span>
|
||||
{# Not a choice anyone made: a link and the account foreign key
|
||||
are indexed by the server as it creates the table. #}
|
||||
<span class="tag">indexed automatically</span>
|
||||
{% else %}
|
||||
<span class="hint">—</span>
|
||||
{% endif %}
|
||||
@@ -321,6 +348,7 @@
|
||||
<input type="hidden" name="column_types" value="{{ column.data_type }}">
|
||||
<input type="hidden" name="column_indexed" value="{% if column.indexed %}yes{% else %}no{% endif %}">
|
||||
<input type="hidden" name="column_quantity_ledger" value="{% if column.quantity_ledger %}yes{% else %}no{% endif %}">
|
||||
<input type="hidden" name="column_required" value="{% if column.required %}yes{% else %}no{% endif %}">
|
||||
<input type="hidden" name="column_rounding" value="{{ column.money_mode.label() }}">
|
||||
<input type="hidden" name="column_currencies" value="{{ column.currency }}">
|
||||
{% endfor %}
|
||||
|
||||
@@ -118,12 +118,32 @@
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
{#
|
||||
A link is left out rather than defaulted to "no": the server builds an
|
||||
index for every foreign key as it adds the column, and refuses a request
|
||||
that asks for one on top.
|
||||
#}
|
||||
{% if page.columns.show_indexing() %}
|
||||
<label>Indexing
|
||||
<select name="column_indexing_input">
|
||||
<option value="no" {% if page.columns.indexing_input != "yes" %}selected{% endif %}>no</option>
|
||||
<option value="yes" {% if page.columns.indexing_input == "yes" %}selected{% endif %}>yes</option>
|
||||
</select>
|
||||
</label>
|
||||
{% else if page.columns.pending_is_auto_indexed() %}
|
||||
<div class="field-note">
|
||||
<span class="field-label">Indexing</span>
|
||||
<p class="hint">Indexed automatically — a link is a foreign key, and the server indexes every one of them.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<label>Required
|
||||
<select name="column_required_input">
|
||||
<option value="no" {% if page.columns.required_input != "yes" %}selected{% endif %}>no</option>
|
||||
<option value="yes" {% if page.columns.required_input == "yes" %}selected{% endif %}>yes</option>
|
||||
</select>
|
||||
<small>A row must carry a value for it.</small>
|
||||
</label>
|
||||
{% if page.columns.show_quantity_ledger() %}
|
||||
<label>Quantity ledger
|
||||
<select name="column_quantity_ledger_input">
|
||||
<option value="no" {% if page.columns.quantity_ledger_input != "yes" %}selected{% endif %}>no</option>
|
||||
@@ -131,6 +151,9 @@
|
||||
</select>
|
||||
<small>{{ page.columns.quantity_ledger_types() }} only.</small>
|
||||
</label>
|
||||
{% else %}
|
||||
<p class="hint">A shared table keeps no books of its own, so it cannot hold a quantity-ledger column.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<button type="button" class="secondary"
|
||||
@@ -158,13 +181,16 @@
|
||||
hx-vals='{"action": "toggle-index", "index": "{{ loop.index0 }}"}'>
|
||||
{% if column.indexed %}[x]{% else %}[ ]{% endif %}
|
||||
</button>
|
||||
{% else if column.is_indexed() %}
|
||||
<span class="tag">indexed automatically</span>
|
||||
{% else %}
|
||||
<span class="hint">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if column.required %}<span class="tag">required</span>{% endif %}
|
||||
{% if column.quantity_ledger %}<span class="tag">quantity ledger</span>{% endif %}
|
||||
{% if !column.option_label().is_empty() %}<span class="tag">{{ column.option_label() }}</span>{% endif %}
|
||||
{% if !column.currency.is_empty() %}<span class="tag">{{ column.currency }}, {{ column.money_mode.label() }}</span>{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="danger"
|
||||
@@ -184,6 +210,7 @@
|
||||
<input type="hidden" name="column_types" value="{{ column.data_type }}">
|
||||
<input type="hidden" name="column_indexed" value="{% if column.indexed %}yes{% else %}no{% endif %}">
|
||||
<input type="hidden" name="column_quantity_ledger" value="{% if column.quantity_ledger %}yes{% else %}no{% endif %}">
|
||||
<input type="hidden" name="column_required" value="{% if column.required %}yes{% else %}no{% endif %}">
|
||||
<input type="hidden" name="column_rounding" value="{{ column.money_mode.label() }}">
|
||||
<input type="hidden" name="column_currencies" value="{{ column.currency }}">
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user