custom/plugins/XioniXconfig/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_inner %}
  3.     <div class="card card-tabs">
  4.         {% block page_product_detail_tabs_navigation %}
  5.             <div class="card-header product-detail-tab-navigation">
  6.                 {% block page_product_detail_tabs_navigation_container %}
  7.                     <ul class="nav nav-tabs product-detail-tab-navigation-list"
  8.                         id="product-detail-tabs"
  9.                         role="tablist">
  10.                         {% block page_product_detail_tabs_navigation_description %}
  11.                             <li class="nav-item">
  12.                                 <a class="nav-link {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %} product-detail-tab-navigation-link"
  13.                                    id="description-tab"
  14.                                    data-toggle="tab"
  15.                                    data-offcanvas-tabs="true"
  16.                                    href="#description-tab-pane"
  17.                                    role="tab"
  18.                                    aria-controls="description-tab-pane"
  19.                                    aria-selected="true">
  20.                                     <span>{{ "detail.tabsDescription"|trans|sw_sanitize }}</span>
  21.                                     <span class="product-detail-tab-navigation-icon">
  22.                                         {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  23.                                     </span>
  24.                                     {% if page.product.translated.description|length > 0 %}
  25.                                         <span class="product-detail-tab-preview">
  26.                                             {{ page.product.translated.description|raw|striptags|u.truncate(125, '…') }}
  27.                                             {# truncate always cuts down the length to 125 characters.
  28.                                                So it will only shorten the string if it exceeds 125 chars.
  29.                                                Therefor, only show the button when the length of the text is
  30.                                                greater or equal then 126 characters. #}
  31.                                             {% if page.product.translated.description|length >= 126 %}
  32.                                                 <span class="product-detail-tab-preview-more">{{ "detail.tabsPreviewMore"|trans|sw_sanitize }}</span>
  33.                                             {% endif %}
  34.                                         </span>
  35.                                     {% endif %}
  36.                                 </a>
  37.                             </li>
  38.                         {% endblock %}
  39.                         {# simplify ID access #}
  40.                         
  41.                         <li class="nav-item">
  42.                             <a class="nav-link product-detail-tab-navigation-link"
  43.                                id="x-download-tab"
  44.                                data-toggle="tab"
  45.                                data-offcanvas-tabs="true"
  46.                                href="#x-download-tab-pane"
  47.                                role="tab"
  48.                                aria-controls="x-download-tab-pane"
  49.                                aria-selected="true">
  50.                                 Datenblätter
  51.                                 <span class="product-detail-tab-navigation-icon">
  52.                                     {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  53.                                 </span>
  54.                             </a>
  55.                         </li> 
  56.                         <li class="nav-item">
  57.                             <a class="nav-link product-detail-tab-navigation-link"
  58.                                id="x-order-tab"
  59.                                data-toggle="tab"
  60.                                data-offcanvas-tabs="true"
  61.                                href="#x-order-tab-pane"
  62.                                role="tab"
  63.                                aria-controls="x-order-tab-pane"
  64.                                aria-selected="true">
  65.                                 Bestellformular
  66.                                 <span class="product-detail-tab-navigation-icon">
  67.                                     {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  68.                                 </span>
  69.                             </a>
  70.                         </li>
  71.                         {% if page.extensions.xconfig_accessories.accessories %}
  72.                         <li class="nav-item">
  73.                             <a class="nav-link product-detail-tab-navigation-link"
  74.                                id="x-accessory-tab"
  75.                                data-toggle="tab"
  76.                                data-offcanvas-tabs="true"
  77.                                href="#x-accessory-tab-pane"
  78.                                role="tab"
  79.                                aria-controls="x-accessory-tab-pane"
  80.                                aria-selected="true">
  81.                                 Zubehörartikel
  82.                                 <span class="product-detail-tab-navigation-icon">
  83.                                     {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  84.                                 </span>
  85.                             </a>
  86.                         </li>
  87.                         {% endif %}                        
  88.                         {% block page_product_detail_tabs_navigation_review %}
  89.                             {% if shopware.config.detail.showReviews %}
  90.                                 <li class="nav-item">
  91.                                     <a class="nav-link {% if (ratingSuccess == 1) or (ratingSuccess == -1) %}active{% endif %} product-detail-tab-navigation-link"
  92.                                        id="review-tab"
  93.                                        data-toggle="tab"
  94.                                        data-offcanvas-tabs="true"
  95.                                        href="#review-tab-pane"
  96.                                        role="tab"
  97.                                        aria-controls="review-tab-pane"
  98.                                        aria-selected="true">
  99.                                         {{ "detail.tabsReview"|trans|sw_sanitize }}
  100.                                         <span class="product-detail-tab-navigation-icon">
  101.                                             {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  102.                                         </span>
  103.                                     </a>
  104.                                 </li>
  105.                             {% endif %}
  106.                         {% endblock %}
  107.                         {% for shop_detail in page.extensions.xconfig.product.data.shop_details %}
  108.                             {% if shop_detail.type_id == "1" %}
  109.                                 <li class="nav-item">
  110.                                     <a class="nav-link product-detail-tab-navigation-link"
  111.                                        id="x{{ shop_detail.id}}-tab"
  112.                                        data-toggle="tab"
  113.                                        data-offcanvas-tabs="true"
  114.                                        href="#x{{ shop_detail.id}}-tab-pane"
  115.                                        role="tab"
  116.                                        aria-controls="x{{ shop_detail.id}}-tab-pane"
  117.                                        aria-selected="true">
  118.                                         {{ shop_detail.item_name|trans|sw_sanitize }}
  119.                                         <span class="product-detail-tab-navigation-icon">
  120.                                             {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  121.                                         </span>
  122.                                     </a>
  123.                                 </li>                            
  124.                             {% endif %}
  125.                         {% endfor %}
  126.                     </ul>
  127.                 {% endblock %}
  128.             </div>
  129.         {% endblock %}
  130.         {% block page_product_detail_tabs_content %}
  131.             <div class="product-detail-tabs-content card-body">
  132.                 {% block page_product_detail_tabs_content_container %}
  133.                     <div class="tab-content">
  134.                         {% block page_product_detail_tabs_content_description %}
  135.                             <div class="tab-pane fade show {% if (ratingSuccess != 1) and (ratingSuccess != -1) %}active{% endif %}"
  136.                                  id="description-tab-pane"
  137.                                  role="tabpanel"
  138.                                  aria-labelledby="description-tab">
  139.                                 {% sw_include '@Storefront/storefront/page/product-detail/description.html.twig' %}
  140.                             </div>
  141.                         {% endblock %}
  142.                         {% block page_product_detail_tabs_content_review %}
  143.                             {% if shopware.config.detail.showReviews %}
  144.                                 <div class="tab-pane fade show {% if (ratingSuccess == 1) or (ratingSuccess == -1) %}active{% endif %}"
  145.                                      id="review-tab-pane"
  146.                                      role="tabpanel"
  147.                                      aria-labelledby="review-tab">
  148.                                     {% sw_include '@Storefront/storefront/page/product-detail/review/review.html.twig' with {'reviews': page.reviews} %}
  149.                                 </div>
  150.                             {% endif %}
  151.                         {% endblock %}                        
  152.                         {% for shop_detail in page.extensions.xconfig.product.data.shop_details %}
  153.                             {% if shop_detail.type_id == "1" %}
  154.                                 <div class="tab-pane fade"
  155.                                      id="x{{ shop_detail.id}}-tab-pane"
  156.                                      role="tabpanel"
  157.                                      aria-labelledby="x{{ shop_detail.id}}-tab">
  158.                                     {% sw_include '@XioniXconfig/storefront/page/product-detail/xshopdetail_tab.html.twig' with {'shop_detail': shop_detail} %}
  159.                                 </div>                                
  160.                             {% endif %}
  161.                         {% endfor %}
  162.                         {# simplify ID access #}
  163.                             {% set media_details = page.extensions.xconfig.product.data.media_details %}
  164.                             <div class="tab-pane fade"
  165.                                  id="x-download-tab-pane"
  166.                                  role="tabpanel"
  167.                                  aria-labelledby="x-download-tab">
  168.                                 {% sw_include '@XioniXconfig/storefront/page/product-detail/xdownload_tab.html.twig' with {'media_details': media_details} %}
  169.                             </div> 
  170.                            <div class="tab-pane fade"
  171.                                  id="x-order-tab-pane"
  172.                                  role="tabpanel"
  173.                                  aria-labelledby="x-order-tab">
  174.                                 {% sw_include '@XioniXconfig/storefront/page/product-detail/xorder_tab.html.twig' %}
  175.                             </div> 
  176.                         {% if page.extensions.xconfig_accessories.accessories %}
  177.                             <div class="tab-pane fade show {% if (ratingSuccess == 1) or (ratingSuccess == -1) %}active{% endif %}"
  178.                                  id="x-accessory-tab-pane"
  179.                                  role="tabpanel"
  180.                                  aria-labelledby="x-accessory-tab">
  181.                                 {% sw_include '@XioniXconfig/storefront/page/product-detail/xaccessory_tab.html.twig' with {'accessories': page.extensions.xconfig_accessories.accessories} %}
  182.                             </div>
  183.                         {% endif %}                             
  184.                     </div>
  185.                 {% endblock %}
  186.             </div>
  187.         {% endblock %}
  188.     </div>
  189. {% endblock %}