organization of incoming data
This commit is contained in:
@@ -108,7 +108,7 @@
|
||||
hx-vals='{"action": "refresh"}'>
|
||||
<option value="">Choose a type</option>
|
||||
{% for column_type in column_types %}
|
||||
<option value="{{ column_type }}" {% if page.draft.columns.type_input == *column_type %}selected{% endif %}>{{ column_type }}</option>
|
||||
<option value="{{ column_type }}" {% if page.draft.columns.type_input == *column_type %}selected{% endif %}>{% if *column_type == "link" %}FKlink{% else %}{{ column_type }}{% endif %}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
@@ -152,9 +152,27 @@
|
||||
<label>Referenced table
|
||||
<select name="link_table_input">
|
||||
<option value="">Choose a table</option>
|
||||
{% for table in page.draft.relation_tables %}
|
||||
<option value="{{ table }}" {% if page.draft.columns.link_table_input == *table %}selected{% endif %}>{{ table }}</option>
|
||||
{% endfor %}
|
||||
{% if !page.draft.global_relation_tables().is_empty() %}
|
||||
<optgroup label="Global">
|
||||
{% for table in page.draft.global_relation_tables() %}
|
||||
<option value="{{ table }}" {% if page.draft.columns.link_table_input == *table %}selected{% endif %}>{{ table }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endif %}
|
||||
{% if !page.draft.user_relation_tables().is_empty() %}
|
||||
<optgroup label="User-created">
|
||||
{% for table in page.draft.user_relation_tables() %}
|
||||
<option value="{{ table }}" {% if page.draft.columns.link_table_input == *table %}selected{% endif %}>{{ table }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endif %}
|
||||
{% if !page.draft.system_relation_tables().is_empty() %}
|
||||
<optgroup label="System-created">
|
||||
{% for table in page.draft.system_relation_tables() %}
|
||||
<option value="{{ table }}" {% if page.draft.columns.link_table_input == *table %}selected{% endif %}>{{ table }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endif %}
|
||||
</select>
|
||||
{% if page.draft.relation_tables.is_empty() %}<small>No eligible tables exist in this scope.</small>{% endif %}
|
||||
</label>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
hx-vals='{"action": "refresh"}'>
|
||||
<option value="">Choose a type</option>
|
||||
{% for column_type in column_types %}
|
||||
<option value="{{ column_type }}" {% if page.columns.type_input == *column_type %}selected{% endif %}>{{ column_type }}</option>
|
||||
<option value="{{ column_type }}" {% if page.columns.type_input == *column_type %}selected{% endif %}>{% if *column_type == "link" %}FKlink{% else %}{{ column_type }}{% endif %}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
@@ -79,11 +79,29 @@
|
||||
<label>Referenced table
|
||||
<select name="link_table_input">
|
||||
<option value="">Choose a table</option>
|
||||
{% for table in page.link_target_tables() %}
|
||||
<option value="{{ table }}" {% if page.columns.link_table_input == *table %}selected{% endif %}>{{ table }}</option>
|
||||
{% endfor %}
|
||||
{% if !page.global_link_target_tables().is_empty() %}
|
||||
<optgroup label="Global">
|
||||
{% for table in page.global_link_target_tables() %}
|
||||
<option value="{{ table }}" {% if page.columns.link_table_input == *table %}selected{% endif %}>{{ table }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endif %}
|
||||
{% if !page.user_link_target_tables().is_empty() %}
|
||||
<optgroup label="User-created">
|
||||
{% for table in page.user_link_target_tables() %}
|
||||
<option value="{{ table }}" {% if page.columns.link_table_input == *table %}selected{% endif %}>{{ table }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endif %}
|
||||
{% if !page.system_link_target_tables().is_empty() %}
|
||||
<optgroup label="System-created">
|
||||
{% for table in page.system_link_target_tables() %}
|
||||
<option value="{{ table }}" {% if page.columns.link_table_input == *table %}selected{% endif %}>{{ table }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endif %}
|
||||
</select>
|
||||
{% if page.link_target_tables().is_empty() %}<small>No eligible tables exist in this scope.</small>{% endif %}
|
||||
{% if page.global_link_target_tables().is_empty() && page.user_link_target_tables().is_empty() && page.system_link_target_tables().is_empty() %}<small>No eligible tables exist in this scope.</small>{% endif %}
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user