{% sw_extends "@Storefront/storefront/page/product-detail/tabs.html.twig" %}
{% block page_product_detail_tabs_inner %}
{% set tabDescription = page.product.translated.customFields.atl_katana_theme_tab_description %}
{% set tabContent = page.product.translated.customFields.atl_katana_theme_tab_content %}
{% set hasDataSheet = page.product.translated.customFields.atl_katana_theme_data_sheet_one or
page.product.translated.customFields.atl_katana_theme_data_sheet_two or
page.product.translated.customFields.atl_katana_theme_data_sheet_three or
page.product.translated.customFields.atl_katana_theme_data_sheet_four
%}
{{ parent() }}
{% endblock %}
{% block page_product_detail_tabs_navigation_description %}
<li class="nav-item">
<a class="nav-link {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %} product-detail-tab-navigation-link"
id="description-tab"
{{ dataBsToggleAttr }}="tab"
data-offcanvas-tabs="true"
href="#description-tab-pane"
role="tab"
aria-controls="description-tab-pane"
aria-selected="true">
<span>
{% if theme_config('atl-product-detail-show-tab-icons') == 'true' %}
{% sw_icon 'align-left' style {
'namespace': 'AtlKatanaTheme',
'pack': theme_config('atl-icon-set'),
'class': ' mr-1',
'color': 'text-color',
'size': 'xs'
} %}
{% endif %}
{{ "detail.tabsDescription"|trans|sw_sanitize }}
</span>
<span class="product-detail-tab-navigation-icon">
{% sw_icon 'arrow-head-right' style {
'namespace': 'AtlKatanaTheme',
'pack': theme_config('atl-icon-set'),
'class': ' pl-1',
'color': 'text-color',
'size': 'xs'
} %}
</span>
{% if page.product.translated.description|length > 0 %}
<span class="product-detail-tab-preview">
{{ page.product.translated.description|raw|striptags|sw_sanitize|u.truncate(125, '…') }}
{# truncate always cuts down the length to 125 characters.
So it will only shorten the string if it exceeds 125 chars.
Therefor, only show the button when the length of the text is
greater or equal then 126 characters. #}
{% if page.product.translated.description|length >= 126 %}
<span class="product-detail-tab-preview-more">{{ "detail.tabsPreviewMore"|trans|sw_sanitize }}</span>
{% endif %}
</span>
{% endif %}
</a>
</li>
{% endblock %}
{% block page_product_detail_tabs_navigation_review %}
{% if config('core.listing.showReview') %}
<li class="nav-item">
<a class="nav-link {% if (ratingSuccess == 1) or (ratingSuccess == -1) %}active{% endif %} product-detail-tab-navigation-link"
id="review-tab"
{{ dataBsToggleAttr }}="tab"
data-offcanvas-tabs="true"
href="#review-tab-pane"
role="tab"
aria-controls="review-tab-pane"
aria-selected="true">
<span>
{% if theme_config('atl-product-detail-show-tab-icons') == 'true' %}
{% sw_icon 'star' style {
'namespace': 'AtlKatanaTheme',
'pack': theme_config('atl-icon-set'),
'class': ' mr-1',
'color': 'text-color',
'size': 'xs'
} %}
{% endif %}
{{ "detail.tabsReview"|trans|sw_sanitize }}
</span>
<span class="product-detail-tab-navigation-icon">
{% sw_icon 'arrow-head-right' style {
'namespace': 'AtlKatanaTheme',
'pack': theme_config('atl-icon-set'),
'class': ' pl-1',
'color': 'text-color',
'size': 'xs'
} %}
</span>
</a>
</li>
{% endif %}
{% block page_product_detail_tabs_navigation_tab %}
{% if tabDescription and tabContent %}
<li class="nav-item">
<a class="nav-link product-detail-tab-navigation-link"
id="tab-tab"
{{ dataBsToggleAttr }}="tab"
data-offcanvas-tabs="true"
href="#tab-tab-pane"
role="tab"
aria-controls="tab-tab-pane"
aria-selected="true">
<span>
{% if theme_config('atl-product-detail-show-tab-icons') == 'true' %}
{% sw_include '@Storefront/storefront/utilities/icon.html.twig' with {
'name': theme_config('atl-product-detail-tab-icon'),
'namespace': 'AtlKatanaTheme',
'pack': theme_config('atl-icon-set'),
'class': ' mr-1',
'color': 'text-color',
'size': 'xs'
} %}
{% endif %}
{{ tabDescription|trans|sw_sanitize }}
</span>
<span class="product-detail-tab-navigation-icon">
{% sw_icon 'arrow-head-right' style {
'namespace': 'AtlKatanaTheme',
'pack': theme_config('atl-icon-set'),
'class': ' pl-1',
'color': 'text-color',
'size': 'xs'
} %}
</span>
</a>
</li>
{% endif %}
{% endblock %}
{% block page_product_detail_tabs_navigation_data_sheet %}
{% if hasDataSheet %}
<li class="nav-item">
<a class="nav-link product-detail-tab-navigation-link"
id="data-sheet-tab"
{{ dataBsToggleAttr }}="tab"
data-offcanvas-tabs="true"
href="#data-sheet-tab-pane"
role="tab"
aria-controls="data-sheet-tab-pane"
aria-selected="true">
<span>
{% if theme_config('atl-product-detail-show-tab-icons') == 'true' %}
{% sw_icon 'file' style {
'namespace': 'AtlKatanaTheme',
'pack': theme_config('atl-icon-set'),
'class': ' mr-1',
'color': 'text-color',
'size': 'xs'
} %}
{% endif %}
{{ "atl-katana-theme.detail.tabsDataSheet"|trans|sw_sanitize }}
</span>
<span class="product-detail-tab-navigation-icon">
{% sw_icon 'arrow-head-right' style {
'namespace': 'AtlKatanaTheme',
'pack': theme_config('atl-icon-set'),
'class': ' pl-1',
'color': 'text-color',
'size': 'xs'
} %}
</span>
</a>
</li>
{% endif %}
{% endblock %}
{% block page_product_detail_tabs_navigation_payment_shipping %}
{% if theme_config('atl-product-detail-show-payment-shipping-tab') == 'true' %}
<li class="nav-item">
<a class="nav-link product-detail-tab-navigation-link"
id="payment-shipping-tab"
{{ dataBsToggleAttr }}="tab"
data-offcanvas-tabs="true"
href="#payment-shipping-tab-pane"
role="tab"
aria-controls="payment-shipping-tab-pane"
aria-selected="true">
<span>
{% if theme_config('atl-product-detail-show-tab-icons') == 'true' %}
{% sw_icon 'box' style {
'namespace': 'AtlKatanaTheme',
'pack': theme_config('atl-icon-set'),
'class': ' mr-1',
'color': 'text-color',
'size': 'xs'
} %}
{% endif %}
{{ "atl-katana-theme.detail.tabsPaymentAndShipping"|trans|sw_sanitize }}
</span>
<span class="product-detail-tab-navigation-icon">
{% sw_icon 'arrow-head-right' style {
'namespace': 'AtlKatanaTheme',
'pack': theme_config('atl-icon-set'),
'class': ' pl-1',
'color': 'text-color',
'size': 'xs'
} %}
</span>
</a>
</li>
{% endif %}
{% endblock %}
{% endblock %}
{% block page_product_detail_tabs_content_review %}
{{ parent() }}
{% block page_product_detail_tabs_content_tab %}
{% if tabDescription and tabContent %}
<div class="tab-pane fade show"
id="tab-tab-pane"
role="tabpanel"
aria-labelledby="tab-tab">
{% sw_include '@Storefront/storefront/skin/global/component/product/tab/tab.html.twig' with { 'content': tabContent } %}
</div>
{% endif %}
{% endblock %}
{% block page_product_detail_tabs_content_data_sheet %}
{% if hasDataSheet %}
<div class="tab-pane fade show"
id="data-sheet-tab-pane"
role="tabpanel"
aria-labelledby="data-sheet-tab">
{% sw_include '@Storefront/storefront/skin/global/component/product/tab/data-sheets.html.twig' with { 'product': page.product } %}
</div>
{% endif %}
{% endblock %}
{% block page_product_detail_tabs_content_payment_shipping %}
{% if theme_config('atl-product-detail-show-payment-shipping-tab') == 'true' %}
<div class="tab-pane fade show"
id="payment-shipping-tab-pane"
role="tabpanel"
aria-labelledby="payment-shipping-tab">
{% sw_include '@Storefront/storefront/skin/global/component/product/tab/payment-shipping.html.twig' %}
</div>
{% endif %}
{% endblock %}
{% endblock %}