vendor/crehler/mojebambino-engine/src/Resources/views/storefront/page/product-detail/tabs.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
  2. {% block page_product_detail_tabs_navigation_description %}
  3.     <li class="nav-item">
  4.         <a class="nav-link {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %} product-detail-tab-navigation-link"
  5.            id="description-tab"
  6.            data-toggle="tab"
  7.            data-offcanvas-tabs="true"
  8.            href="#description-tab-pane"
  9.            role="tab"
  10.            aria-controls="description-tab-pane"
  11.            aria-selected="true">
  12.             <span>{{ "detail.tabsDescription"|trans|sw_sanitize }}</span>
  13.             <span class="product-detail-tab-navigation-icon">
  14.                 {% sw_icon 'arrow-right' style {'pack':'solid'} %}
  15.             </span>
  16.             {% if page.product.translated.description|length > 0 %}
  17.                 <span class="product-detail-tab-preview">
  18.                     {{ page.product.translated.description|raw|striptags|sw_sanitize|u.truncate(125) }}
  19.                     {# truncate always cuts down the length to 125 characters.
  20.                        So it will only shorten the string if it exceeds 125 chars.
  21.                        Therefor, only show the button when the length of the text is
  22.                        greater or equal then 126 characters. #}
  23.                     {% if page.product.translated.description|length >= 126 %}
  24.                         <span class="product-detail-tab-preview-more">{{ "detail.tabsPreviewMore"|trans|sw_sanitize }}</span>
  25.                     {% endif %}
  26.                 </span>
  27.             {% endif %}
  28.         </a>
  29.     </li>
  30.     {% set sizeTable = page.product.extensions.sizeTable.translated %}
  31.     {% if sizeTable.tableContent is not empty %}
  32.         <li class="nav-item">
  33.             <a class="nav-link product-detail-tab-navigation-link"
  34.                id="table-tab"
  35.                data-toggle="tab"
  36.                data-offcanvas-tabs="true"
  37.                href="#table-tab-pane"
  38.                role="tab"
  39.                aria-controls="table-tab-pane"
  40.                aria-selected="true">
  41.                 <span>{{ sizeTable.name }}</span>
  42.                 <span class="product-detail-tab-navigation-icon">
  43.                     {% sw_icon 'arrow-right' style {'pack':'solid'} %}
  44.                 </span>
  45.             </a>
  46.         </li>
  47.     {% endif %}
  48.     {% set productFiles = page.product.extensions.productFiles %}
  49.     {% if productFiles.files is not empty or productFiles.links is not empty %}
  50.         <li class="nav-item">
  51.             <a class="nav-link product-detail-tab-navigation-link"
  52.                id="table-tab"
  53.                data-toggle="tab"
  54.                data-offcanvas-tabs="true"
  55.                href="#files-to-download-tab"
  56.                role="tab"
  57.                aria-controls="table-tab-pane"
  58.                aria-selected="true">
  59.                 <span>
  60.                     {% if productFiles.title %}
  61.                         {{ productFiles.title }}
  62.                     {% else %}
  63.                         {{ "plugin.productFiles.defaultTitle"|trans }}
  64.                     {% endif %}
  65.                 </span>
  66.                 <span class="product-detail-tab-navigation-icon">
  67.                     {% sw_icon 'arrow-right' style {'pack':'solid'} %}
  68.                 </span>
  69.             </a>
  70.         </li>
  71.     {% endif %}
  72. {% endblock %}
  73. {% block page_product_detail_tabs_navigation_review %}
  74.     {# remove #}
  75. {% endblock %}
  76. {% block page_product_detail_tabs_content_description %}
  77.     {{ parent() }}
  78.     {% set sizeTable = page.product.extensions.sizeTable.translated %}
  79.     {% if sizeTable.tableContent is not empty %}
  80.         <div class="tab-pane fade show"
  81.              id="table-tab-pane"
  82.              role="tabpanel"
  83.              aria-labelledby="table-tab">
  84.             {% sw_include '@Storefront/storefront/page/product-detail/size-table.html.twig' %}
  85.         </div>
  86.     {% endif %}
  87.     {% set productFiles = page.product.extensions.productFiles %}
  88.     {% if productFiles.files is not empty or productFiles.links is not empty %}
  89.         <div class="tab-pane fade show"
  90.              id="files-to-download-tab"
  91.              role="tabpanel"
  92.              aria-labelledby="table-tab">
  93.             {% sw_include '@Storefront/storefront/page/product-detail/product-files.html.twig' %}
  94.         </div>
  95.     {% endif %}
  96. {% endblock %}
  97. {% block page_product_detail_tabs_content_review %}
  98.     {# remove #}
  99. {% endblock %}