{# @description The guide to a record type's columns, laid out as one table for each group: what each column holds, whether it is needed, how to write it and an example. #} {# @prop schema:TableSchema | description:"The type's table schema, from its configuration's get_table_schema()." #} {% load i18n %}
{% for key, title, columns in schema.groups %}

{{ title }}

{% for column in columns %} {% endfor %}
{{ title }}
{% translate "Heading" %} {% translate "What it holds" %} {% translate "How to write it" %} {% translate "Example" %}
{{ column.name }} {{ column.label }} {% if column.required %} {% translate "Required for new records" %} {% elif column.role == "key" or column.role == "match" %} {% translate "Finds the record" %} {% elif column.role == "export" %} {% translate "Export only" %} {% else %} {% translate "Optional" %} {% endif %} {% if column.description %}

{{ column.description }}

{% endif %} {% if column.shown_aliases %}

{% translate "Also recognised as" %} {% for alias in column.shown_aliases|slice:":4" %}{{ alias }}{% endfor %}

{% endif %}
{{ column.kind_label }}{% if column.unit %} · {% blocktranslate with unit=column.unit %}in {{ unit }}{% endblocktranslate %}{% endif %} {{ column.format_hint }} {% if column.kind != "latitude" and column.kind != "longitude" %} {% if column.minimum is not None and column.maximum is not None %} {% blocktranslate with a=column.minimum b=column.maximum %}From {{ a }} to {{ b }}{% endblocktranslate %} {% elif column.minimum is not None %} {% blocktranslate with a=column.minimum %}At least {{ a }}{% endblocktranslate %} {% elif column.maximum is not None %} {% blocktranslate with b=column.maximum %}At most {{ b }}{% endblocktranslate %} {% endif %} {% endif %} {% if column.decimals is not None %}{% blocktranslate count n=column.decimals %}At most {{ n }} decimal place{% plural %}At most {{ n }} decimal places{% endblocktranslate %}{% endif %} {% if column.allowed %} {% with total=column.allowed|length %}
{% if total > 40 %}{% blocktranslate %}The first 40 of {{ total }} allowed values{% endblocktranslate %}{% else %}{% blocktranslate count n=total %}{{ n }} allowed value{% plural %}{{ n }} allowed values{% endblocktranslate %}{% endif %}
    {% for value, meaning in column.allowed|slice:":40" %}
  • {{ value }}{% if meaning and meaning != value %}{{ meaning|truncatechars:140 }}{% endif %}
  • {% endfor %}
{% endwith %} {% endif %}
{% if column.example %}{{ column.example }}{% else %}—{% endif %}
{% endfor %}