vendor/shopware/storefront/Resources/views/storefront/page/product-detail/tabs.html.twig line 1

Open in your IDE?
  1. {% block page_product_detail_tabs_inner %}
  2.     <div class="card card-tabs">
  3.         {% block page_product_detail_tabs_navigation %}
  4.             <div class="card-header product-detail-tab-navigation">
  5.                 {% block page_product_detail_tabs_navigation_container %}
  6.                     <ul class="nav nav-tabs product-detail-tab-navigation-list"
  7.                         id="product-detail-tabs"
  8.                         role="tablist">
  9.                         {% block page_product_detail_tabs_navigation_description %}
  10.                             <li class="nav-item">
  11.                                 <a class="nav-link {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %} product-detail-tab-navigation-link"
  12.                                    id="description-tab"
  13.                                    data-toggle="tab"
  14.                                    data-offcanvas-tabs="true"
  15.                                    href="#description-tab-pane"
  16.                                    role="tab"
  17.                                    aria-controls="description-tab-pane"
  18.                                    aria-selected="true">
  19.                                     <span>{{ "detail.tabsDescription"|trans|sw_sanitize }}</span>
  20.                                     <span class="product-detail-tab-navigation-icon">
  21.                                         {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  22.                                     </span>
  23.                                     {% if page.product.translated.description|length > 0 %}
  24.                                         <span class="product-detail-tab-preview">
  25.                                             {{ page.product.translated.description|raw|striptags|u.truncate(125, '…') }}
  26.                                             {# truncate always cuts down the length to 125 characters.
  27.                                                So it will only shorten the string if it exceeds 125 chars.
  28.                                                Therefor, only show the button when the length of the text is
  29.                                                greater or equal then 126 characters. #}
  30.                                             {% if page.product.translated.description|length >= 126 %}
  31.                                                 <span class="product-detail-tab-preview-more">{{ "detail.tabsPreviewMore"|trans|sw_sanitize }}</span>
  32.                                             {% endif %}
  33.                                         </span>
  34.                                     {% endif %}
  35.                                 </a>
  36.                             </li>
  37.                         {% endblock %}
  38.                         {% block page_product_detail_tabs_navigation_review %}
  39.                             {% if shopware.config.detail.showReviews %}
  40.                                 <li class="nav-item">
  41.                                     <a class="nav-link {% if (ratingSuccess == 1) or (ratingSuccess == -1) %}active{% endif %} product-detail-tab-navigation-link"
  42.                                        id="review-tab"
  43.                                        data-toggle="tab"
  44.                                        data-offcanvas-tabs="true"
  45.                                        href="#review-tab-pane"
  46.                                        role="tab"
  47.                                        aria-controls="review-tab-pane"
  48.                                        aria-selected="true">
  49.                                         {{ "detail.tabsReview"|trans|sw_sanitize }}
  50.                                         <span class="product-detail-tab-navigation-icon">
  51.                                             {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  52.                                         </span>
  53.                                     </a>
  54.                                 </li>
  55.                             {% endif %}
  56.                         {% endblock %}
  57.                     </ul>
  58.                 {% endblock %}
  59.             </div>
  60.         {% endblock %}
  61.         {% block page_product_detail_tabs_content %}
  62.             <div class="product-detail-tabs-content card-body">
  63.                 {% block page_product_detail_tabs_content_container %}
  64.                     <div class="tab-content">
  65.                         {% block page_product_detail_tabs_content_description %}
  66.                             <div class="tab-pane fade show {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %}"
  67.                                  id="description-tab-pane"
  68.                                  role="tabpanel"
  69.                                  aria-labelledby="description-tab">
  70.                                 {% sw_include '@Storefront/storefront/page/product-detail/description.html.twig' %}
  71.                             </div>
  72.                         {% endblock %}
  73.                         {% block page_product_detail_tabs_content_review %}
  74.                             {% if shopware.config.detail.showReviews %}
  75.                                 <div class="tab-pane fade show {% if (ratingSuccess == 1) or (ratingSuccess == -1) %}active{% endif %}"
  76.                                      id="review-tab-pane"
  77.                                      role="tabpanel"
  78.                                      aria-labelledby="review-tab">
  79.                                     {% sw_include '@Storefront/storefront/page/product-detail/review/review.html.twig' with {'reviews': page.reviews} %}
  80.                                 </div>
  81.                             {% endif %}
  82.                         {% endblock %}
  83.                     </div>
  84.                 {% endblock %}
  85.             </div>
  86.         {% endblock %}
  87.     </div>
  88. {% endblock %}