{% for group, attributes in groupedAttributes %}
{% block attribute_group %}
{{ group }}
{% for attribute in attributes %}
{% block attribute %}
{% set locale_attribute = attribute.isLocalizable or attribute.isLocaleSpecific ? locale : null %}
{% set channel_attribute = attribute.isScopable ? scope : null %}
{% set content = product.getValue(attribute.code, locale_attribute, channel_attribute) %}
{% set manualHeight = true %}
{% if 'pim_catalog_image' == attribute.type and content.data is defined and content.data is not null %}
{% set content = content.data.originalFilename %}
{% set manualHeight = false %}
{% elseif ('pim_catalog_simpleselect' == attribute.type or 'pim_catalog_multiselect' == attribute.type) and attribute.code in optionLabels|keys %}
{% set content = optionLabels[attribute.code] %}
{% endif %}
{% if content != null and manualHeight == true %}
{% set manualHeight = attribute.label|length > (content|trim|length / 3) %}
{% endif %}
{{ attribute.label }}
{% if 'pim_catalog_textarea' == attribute.type and attribute.isWysiwygEnabled %}
{{ content|raw }}
{% elseif 'pim_catalog_boolean' == attribute.type %}
{# @todo @merge: refactor on master - use new translation keys #}
{{ (content.data ? 'Yes' : 'No')|trans([], null, locale) }}
{% else %}
{{ content }}
{% endif %}
{% endblock %}
{% endfor %}