Skip to content
Snippets Groups Projects
Commit 452e8e65 authored by Kevin Paxman's avatar Kevin Paxman
Browse files

Merge branch 'feature/ISTWCMS-7312-kpaxman-fix_empty_block_a11y' into '1.1.x'

ISTWCMS-7312: only output the multi-type list when it has content, to avoid an a11y issue

See merge request !276
parents b11fb215 9b61577c
No related branches found
No related tags found
1 merge request!276ISTWCMS-7312: only output the multi-type list when it has content, to avoid an a11y issue
......@@ -3,107 +3,109 @@
{% set content_list = content_list|merge([type]) %}
{% endfor %}
{% set button_modifier_classes -%}
button button--large {{ modifier_classes }}
{%- endset %}
{% if content_list %}
{% set button_modifier_classes -%}
button button--large {{ modifier_classes }}
{%- endset %}
{% embed '@components/tabs/_tabs.twig' with {
'tab_type': 'content',
'content_list': content_list,
'button_modifier_classes': button_modifier_classes,
} %}
{% if is_demo %}
{% set view_all = 'true' %}
{% endif %}
{% for type, list in lists %}
{% for info in list %}
{% embed '@components/tabs/_tabs.twig' with {
'tab_type': 'content',
'content_list': content_list,
'button_modifier_classes': button_modifier_classes,
} %}
{% if is_demo %}
{% set view_all = 'true' %}
{% endif %}
{% for type, list in lists %}
{% for info in list %}
{% if loop.parent.loop.index == 1 %}
{% block content_area_1 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type,
'lists': lists,
} %}
{% if view_all %}
<div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with {
'url': view_all[type].url,
'text': view_all[type].text,
} %}
</div>
{% endif %}
{% endblock %}
{% elseif loop.parent.loop.index == 2 %}
{% block content_area_2 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type,
'lists': lists,
'view_all': view_all,
} %}
{% if view_all %}
<div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with {
'url': view_all[type].url,
'text': view_all[type].text,
} %}
</div>
{% endif %}
{% endblock %}
{% elseif loop.parent.loop.index == 3 %}
{% block content_area_3 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type,
'lists': lists,
'view_all': view_all,
} %}
{% if view_all %}
<div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with {
'url': view_all[type].url,
'text': view_all[type].text,
} %}
</div>
{% endif %}
{% endblock %}
{% if loop.parent.loop.index == 1 %}
{% block content_area_1 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type,
'lists': lists,
} %}
{% if view_all %}
<div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with {
'url': view_all[type].url,
'text': view_all[type].text,
} %}
</div>
{% endif %}
{% endblock %}
{% elseif loop.parent.loop.index == 2 %}
{% block content_area_2 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type,
'lists': lists,
'view_all': view_all,
} %}
{% if view_all %}
<div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with {
'url': view_all[type].url,
'text': view_all[type].text,
} %}
</div>
{% endif %}
{% endblock %}
{% elseif loop.parent.loop.index == 3 %}
{% block content_area_3 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type,
'lists': lists,
'view_all': view_all,
} %}
{% if view_all %}
<div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with {
'url': view_all[type].url,
'text': view_all[type].text,
} %}
</div>
{% endif %}
{% endblock %}
{% elseif loop.parent.loop.index == 4 %}
{% block content_area_4 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type,
'lists': lists,
'view_all': view_all,
} %}
{% if view_all %}
<div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with {
'url': view_all[type].url,
'text': view_all[type].text,
} %}
</div>
{% endif %}
{% endblock %}
{% elseif loop.parent.loop.index == 4 %}
{% block content_area_4 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type,
'lists': lists,
'view_all': view_all,
} %}
{% if view_all %}
<div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with {
'url': view_all[type].url,
'text': view_all[type].text,
} %}
</div>
{% endif %}
{% endblock %}
{% elseif loop.parent.loop.index == 5 %}
{% block content_area_5 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type,
'lists': lists,
'view_all': view_all,
} %}
{% if view_all %}
<div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with {
'url': view_all[type].url,
'text': view_all[type].text,
} %}
</div>
{% endif %}
{% endblock %}
{% elseif loop.parent.loop.index == 5 %}
{% block content_area_5 %}
{% include '@components/multi-type-list/_multi-tab-list-include-content.twig' with {
'type': type,
'lists': lists,
'view_all': view_all,
} %}
{% if view_all %}
<div class="uw-multi-type-list__button">
{% include '@components/button/button.twig' with {
'url': view_all[type].url,
'text': view_all[type].text,
} %}
</div>
{% endif %}
{% endblock %}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endembed %}
{% endembed %}
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment