custom/plugins/Wingsacademy/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. {% set product = page.product %}
  3. {% block page_product_detail_tabs_inner %}
  4.     {% if  product.customFields.custom_product_official_title %}
  5.         <div class="product-detail-tabs-official-title">
  6.             {{ product.customFields.custom_product_official_title }}
  7.         </div>
  8.     {% endif %}
  9.     <div class="card card-tabs wa-border-bottom-info-1 product-detail-tab-mobile-navigation">
  10.         {% block page_product_detail_tabs_navigation %}
  11.             <div class="card-header product-detail-tab-navigation">
  12.                 {% block page_product_detail_tabs_navigation_container %}
  13.                     <ul class="nav nav-tabs product-detail-tab-navigation-list"
  14.                         id="product-detail-tabs"
  15.                         style="border: none;"
  16.                         role="tablist">
  17.                         {% block page_product_detail_tabs_navigation_description %}
  18.                             <li class="nav-item">
  19.                                 <a class="nav-link {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %} product-detail-tab-navigation-link wa-fs-16 wa-lh-28 "
  20.                                    id="description-tab"
  21.                                    {{ dataBsToggleAttr }}="tab"
  22.                                    data-offcanvas-tabs="true"
  23.                                    href="#description-tab-pane"
  24.                                    role="tab"
  25.                                    aria-controls="description-tab-pane"
  26.                                    aria-selected="true">
  27.                                     <span class=" wa-fs-16 wa-fw-semibold wa-lh-30">{{ "detail.tabsDescription"|trans|sw_sanitize }}</span>
  28.                                     <span class="product-detail-tab-navigation-icon">
  29.                                         {% sw_icon 'arrow-medium-right' style {'pack':'solid' } %}
  30.                                     </span>
  31.                                     {% if page.product.translated.description|length > 0 %}
  32.                                         <span class="product-detail-tab-preview">
  33.                                             {{ page.product.translated.description|raw|striptags|sw_sanitize|u.truncate(125, '…') }}
  34.                                             {# truncate always cuts down the length to 125 characters.
  35.                                                So it will only shorten the string if it exceeds 125 chars.
  36.                                                Therefor, only show the button when the length of the text is
  37.                                                greater or equal then 126 characters. #}
  38.                                             {% if page.product.translated.description|length >= 126 %}
  39.                                                 <span class="product-detail-tab-preview-more">{{ "detail.tabsPreviewMore"|trans|sw_sanitize }}</span>
  40.                                             {% endif %}
  41.                                         </span>
  42.                                     {% endif %}
  43.                                 </a>
  44.                             </li>
  45.                         {% endblock %}
  46.                         {% block page_product_detail_tabs_navigation_custom_fileds_lernziele %}
  47.                           {% if product.customFields.custom_product_lernziele %}
  48.                             <li class="nav-item">
  49.                                 <a class="nav-link {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %} product-detail-tab-navigation-link wa-fs-16 wa-lh-28 "
  50.                                    id="lernziele-tab"
  51.                                    {{ dataBsToggleAttr }}="tab"
  52.                                    data-offcanvas-tabs="true"
  53.                                    href="#lernziele-tab-pane"
  54.                                    role="tab"
  55.                                    aria-controls="lernziele-tab-pane"
  56.                                    aria-selected="true">
  57.                                     <span class=" wa-fs-16 wa-fw-semibold wa-lh-30">{{ "component.product.custom_field.learning"|trans|sw_sanitize }}</span>
  58.                                     <span class="product-detail-tab-navigation-icon">
  59.                                         {% sw_icon 'arrow-medium-right' style {'pack':'solid' } %}
  60.                                     </span>
  61.                                 </a>
  62.                             </li>
  63.                           {% endif %}
  64.                         {% endblock %}
  65.                         {% block page_product_detail_tabs_navigation_review %}
  66.                             {% if config('core.listing.showReview') %}
  67.                                 <li class="nav-item">
  68.                                     <a class="nav-link {% if (ratingSuccess == 1) or (ratingSuccess == -1) %}active{% endif %} product-detail-tab-navigation-link wa-fs-16 wa-lh-28 "
  69.                                        id="review-tab"
  70.                                        {{ dataBsToggleAttr }}="tab"
  71.                                        data-offcanvas-tabs="true"
  72.                                        href="#review-tab-pane"
  73.                                        role="tab"
  74.                                        aria-controls="review-tab-pane"
  75.                                        aria-selected="true">
  76.                                         <span class=" wa-fs-16 wa-fw-semibold wa-lh-30">
  77.                                             {{ "detail.tabsReview"|trans|sw_sanitize }}
  78.                                         </span>
  79.                                         <span class="product-detail-tab-navigation-icon">
  80.                                             {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  81.                                         </span>
  82.                                     </a>
  83.                                 </li>
  84.                             {% endif %}
  85.                         {% endblock %}
  86.                     </ul>
  87.                 {% endblock %}
  88.             </div>
  89.         {% endblock %}
  90.         {% block page_product_detail_tabs_content %}
  91.             <div class="product-detail-tabs-content card-body">
  92.                 {% block page_product_detail_tabs_content_container %}
  93.                     <div class="tab-content">
  94.                         {% block page_product_detail_tabs_content_description %}
  95.                             <div class="tab-pane fade show {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %}"
  96.                                  id="description-tab-pane"
  97.                                  role="tabpanel"
  98.                                  aria-labelledby="description-tab">
  99.                                 {% sw_include '@Storefront/storefront/page/product-detail/description.html.twig' %}
  100.                             </div>
  101.                         {% endblock %}
  102.                         {% block page_product_detail_tabs_content_custom_fileds_lernziele %}
  103.                             {% if product.customFields.custom_product_lernziele %}
  104.                                 <div class="tab-pane fade show {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %}"
  105.                                     id="lernziele-tab-pane"
  106.                                     role="tabpanel"
  107.                                     aria-labelledby="lernziele-tab">
  108.                                     {% sw_include '@Storefront/storefront/page/product-detail/description.html.twig' with {
  109.                                         'staticContent': {
  110.                                             'description': product.customFields.custom_product_lernziele,
  111.                                             'title':  'component.product.custom_field.learning'|trans|sw_sanitize
  112.                                         }
  113.                                     } %}
  114.                                 </div>
  115.                             {% endif %}
  116.                         {% endblock %}
  117.                         {% block page_product_detail_tabs_content_review %}
  118.                             {% if config('core.listing.showReview') %}
  119.                                 <div class="tab-pane fade show {% if (ratingSuccess == 1) or (ratingSuccess == -1) %}active{% endif %}"
  120.                                      id="review-tab-pane"
  121.                                      role="tabpanel"
  122.                                      aria-labelledby="review-tab">
  123.                                     {% sw_include '@Storefront/storefront/page/product-detail/review/review.html.twig' with {'reviews': page.reviews} %}
  124.                                 </div>
  125.                             {% endif %}
  126.                         {% endblock %}
  127.                     </div>
  128.                 {% endblock %}
  129.             </div>
  130.         {% endblock %}
  131.     </div>
  132.     <div class="product-details-tab-desktop">
  133.             {% block page_product_detail_tabs_desktop_inner %}
  134.                 <div class="product-detail-tab-desktop-navigation">
  135.                     {% block page_product_detail_tabs_desktop_navigation %}
  136.                         <ul class="product-detail-tab-desktop-navigation-list">
  137.                             {% block page_product_detail_tabs_desktop_navigation_description %}
  138.                                 <li class="product-detail-tab-desktop-navigation-list-description">
  139.                                     <p class="tabs-title">{{ "detail.tabsDescription"|trans|sw_sanitize }}</p>
  140.                                     <p>
  141.                                         {% sw_include '@Storefront/storefront/page/product-detail/description.html.twig' with {
  142.                                             'props': {
  143.                                                 'withTitle': false
  144.                                             }
  145.                                         } %}
  146.                                     </p>
  147.                                 </li>
  148.                             {% endblock %}
  149.                             {% block page_product_detail_tabs_desktop_content_custom_fileds_lernziele %}
  150.                                 {% if product.customFields.custom_product_lernziele %}
  151.                                     <li class="product-detail-tab-desktop-navigation-list-learning">
  152.                                         <p class="tabs-title">{{ "component.product.custom_field.learning"|trans|sw_sanitize }}</p>
  153.                                         <p>
  154.                                             {% sw_include '@Storefront/storefront/page/product-detail/description.html.twig' with {
  155.                                                 'staticContent': {
  156.                                                     'description': product.customFields.custom_product_lernziele,
  157.                                                     'title':  'component.product.custom_field.learning'|trans|sw_sanitize
  158.                                                 },
  159.                                                 'props': {
  160.                                                     'withTitle': false
  161.                                                 }
  162.                                             } %}
  163.                                         </p>
  164.                                     </li>
  165.                                 {% endif %}
  166.                             {% endblock %}
  167.                             {% block page_product_detail_tabs_desktop_content_review %}
  168.                                 {% if config('core.listing.showReview') %}
  169.                                     <li class="product-detail-tab-desktop-navigation-list-review">
  170.                                         <p class="tabs-title"> {{ "detail.tabsReview"|trans|sw_sanitize }}</p>
  171.                                         {% sw_include '@Storefront/storefront/page/product-detail/review/review.html.twig' with {'reviews': page.reviews} %}
  172.                                     </li>
  173.                                 {% endif %}
  174.                             {% endblock %}
  175.                         </ul>
  176.                     {% endblock %}
  177.                 </div>
  178.             {% endblock %}
  179.     </div>
  180. {% endblock %}