{% for blockType in blockTypes %}
{% for field in blockType.getFieldLayout().getFields() %}
{% set width = supertableField.columns[field.id].width ?? '' %}
{% set translatable = field.getIsTranslatable() %}
{% if translatable %}
{% switch field.translationMethod %}
{% case 'site' %}
{% set translationDescription = 'This field is translated for each site.'|t('app') %}
{% case 'siteGroup' %}
{% set translationDescription = 'This field is translated for each site group.'|t('app') %}
{% case 'language' %}
{% set translationDescription = 'This field is translated for each language.'|t('app') %}
{% endswitch %}
{% endif %}
{{ field.name | t('site') }} {% if field.instructions %}{{ field.instructions | t('site') | md | raw }}{% endif %} {% if translatable %}{% endif %}
{% endfor %}
{% endfor %}
{% if not staticField %}
{% endif %}
{% set totalNewBlocks = 0 %}
{% for block in blocks %}
{% set blockId = block.id %}
{% if not blockId %}
{% set totalNewBlocks = totalNewBlocks + 1 %}
{% set blockId = 'new' ~ totalNewBlocks %}
{% endif %}
{% include "super-table/table/fields" with {
namespace: name ~ '[' ~ blockId ~ '][fields]',
element: block,
fields: block.getType().getFieldLayout().getFields(),
settings: supertableField,
} %}
{% if not staticField %}
{% else %}
{# Prevents case where inner Table fields will collapse everything #}
{% endif %}
{% endfor %}
{% if not staticField %}
{{ supertableField.selectionLabel | default("Add a row") | t('site') }}