{# Browsable projection of what the selected profile becomes in SEEK: the Sample Types (with columns) provisioning will create, and the Extended Metadata the Investigation/Study/Assay records carry. Read-only — nothing here writes to SEEK. Rendered on page load and re-fetched by the profile / version dropdowns via HTMX. #} {% if preview %} {% if swap_label %} {# Rendered by the HTMX preview route: the profile changed, so the step-1 button must say what provisioning does for THIS profile. #} {{ "Set up Controlled Vocabularies" if preview.template_bound else "Set up Sample Types" }} {% endif %}
{% set cols = "width:100%; border-collapse:collapse; font-size:0.82rem;" %} {% set th = "text-align:left; padding:0.2rem 0.5rem; border-bottom:1px solid var(--border,#ddd); color:#666; font-weight:600;" %} {% set td = "padding:0.2rem 0.5rem; border-bottom:1px solid var(--border,#eee);" %}
Sample Types ({{ preview.sample_types|length }}{% if preview.template_bound %}, from the templates installed on SEEK{% endif %}) {% if preview.template_bound %}

Each entity names the ISA Template its Sample Types are built from at sync time; the ISA tag says what role a column plays in the export.

{% endif %} {% for st in preview.sample_types %}
{{ st.entity_type }} {% if st.template %}{{ st.template }} ({{ st.level }}){% endif %} ({{ st.attributes|length }} column{{ "" if st.attributes|length == 1 else "s" }}) {% if preview.template_bound %}{% endif %} {% for a in st.attributes %} {% if preview.template_bound %}{% endif %} {% endfor %}
columntypeISA tagrequired
{{ a.name }} {{ a.type }}{% if a.controlled_vocabulary %} (controlled vocabulary){% endif %}{{ a.isa_tag or "" }}{{ "yes" if a.required else "" }}
{% else %}

This profile creates no Sample Types.

{% endfor %}
Extended Metadata ({{ preview.extended_metadata|length }})

Custom fields on the Investigation, Study and Assay records — added by a SEEK admin from the .ttl below.

{% for em in preview.extended_metadata %}
{{ em.entity_type }} ({{ em.role }}, {{ em.attributes|length }} field{{ "" if em.attributes|length == 1 else "s" }}) {% if em.attributes %} {% for a in em.attributes %} {% endfor %}
fieldtyperequired
{{ a.name }} {{ a.type }}{% if a.controlled_vocabulary %} (controlled vocabulary){% endif %} {{ "yes" if a.required else "" }}
{% else %}

Only SEEK's own record fields — no Extended Metadata.

{% endif %}
{% endfor %}
{% else %}

No model preview available for this profile.

{% endif %}