templates/products/details.html.twig line 1

Open in your IDE?
  1. {% extends "base.html.twig" %}
  2. {% block title %}Détails de
  3.     {{ product.name }}
  4. {% endblock %}
  5. {% block body %}
  6.     <style>
  7.     body {
  8.         font-family: Varela,sans-serif;
  9.         color: #2b4b78;
  10.     }
  11.     .container {
  12.         padding-right:85px;
  13.         padding-left:85px;
  14.         background-color: #FFF;
  15.     }
  16.     h1 {
  17.         font-family: "Montserrat", sans-serif;
  18.         font-size:26pt;
  19.         font-weight:bold;
  20.         color:#003c8c;
  21.     }
  22.     h2 {
  23.         font-family: "Montserrat", sans-serif;
  24.         font-size:20pt;
  25.         font-weight:normal !important;
  26.         color:#003c8c;
  27.     }
  28.     h3 {
  29.         color:#003c8c;
  30.     }
  31.     .ariane {
  32.         padding-top:25px;
  33.         padding-bottom:25px;
  34.         font-family: "Montserrat", sans-serif;
  35.         -webkit-font-smoothing: antialiased;
  36.     }
  37.     .ariane A {
  38.         padding-top:25px;
  39.         padding-bottom:25px;
  40.         font-family: "Montserrat", sans-serif;
  41.         text-decoration:underline !important;
  42.         font-size: 16px !important;
  43.         color: #161d3f !important;
  44.         font-weight: 500 !important;
  45.     }
  46.     .arianeEnd {
  47.         color:#006ec8;
  48.         font-family: "Montserrat", sans-serif;
  49.         font-size: 16px !important;
  50.         font-weight: 500 !important;
  51.     }
  52.     .headerTxt, .headerTxt p {
  53.         font-size:16pt !important;
  54.         font-family: "Montserrat", sans-serif!important;
  55.         color:#003c8c !important;
  56.         font-weight: 400 !important;
  57.     }
  58.     .mainReference {
  59.         font-family: "Montserrat", sans-serif;
  60.         background-color: #003c8c;
  61.         color:#FFF;
  62.         padding:5px;
  63.         font-size:22pt;
  64.     }
  65.     .tabcontent, .tabcontent p{
  66.         font-size:12pt !important;
  67.         font-family: "Montserrat", sans-serif!important;
  68.         color:#003c8c !important;
  69.     }
  70.     .spacerTop {
  71.         margin-top:15px
  72.     }
  73.     .options {
  74.         font-family: "Montserrat", sans-serif;
  75.         font-size:13pt;
  76.         color:#003c8c;
  77.         font-weight:bold;
  78.         border-bottom: solid 1px #78c8e6;
  79.     }
  80.         .collapsible {
  81.             background-color: #FFF;
  82.             font-family: "Montserrat", sans-serif;
  83.             font-size:13pt;
  84.             color:#003c8c;
  85.             cursor: pointer;
  86.             padding: 18px;
  87.             width: 100%;
  88.             border: none;
  89.             text-align: left;
  90.             outline: none;
  91.         }
  92.         .activeCollapsible, .collapsible:hover {
  93.             font-weight: bolder;
  94.         }
  95.         .collapsible:after {
  96.             content: '\002B';
  97.             color: #003c8c;
  98.             font-weight: bold;
  99.             float: right;
  100.             margin-left: 5px;
  101.         }
  102.         .activeCollapsible:after {
  103.             content: "\2212";
  104.         }
  105.         .content {
  106.             padding: 0 18px;
  107.             max-height: 0;
  108.             overflow: hidden;
  109.             transition: max-height 0.2s ease-out;
  110.         }
  111.         .productTable {
  112.             font-family: "Montserrat", sans-serif;
  113.             font-size:10pt;
  114.             color:#505050;
  115.             background-color:#FFF;
  116.             border-spacing : 2px;
  117.             border-collapse: separate;
  118.         }
  119.         .productTable TH {
  120.             background-color:#e5e5e5;
  121.             text-align: center;
  122.             padding:3px;
  123.             font-weight:bold;
  124.         }
  125.         .productTable TD {
  126.             margin:2px;
  127.             text-align: center;
  128.             border-bottom: solid 1px #e5e5e5;
  129.             padding: 5px;
  130.         }
  131.         .productTable TR {
  132.             border-bottom: solid 1px #e5e5e5;
  133.         }
  134.         #menu-item-153 {
  135.             position: relative; /* Nécessaire pour positionner le trait en bas de l'élément */
  136.         }
  137.         #menu-item-153::after {
  138.             content: "";
  139.             display: block;
  140.             width: 100%;
  141.             height: 3px;
  142.             background-color: #006ec8;
  143.             position: absolute;
  144.             bottom: 0;
  145.             left: 0;
  146.         }
  147.         #navbar-underline {
  148.             display:none;
  149.         }
  150.         .user-box {
  151.             border: 2px solid #006ec8;
  152.             border-radius: 10px;
  153.             padding: 20px;
  154.             background-color: #f8fbff;
  155.             color: #003c8c;
  156.             font-family: "Montserrat", sans-serif;
  157.             box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  158.             margin-top: 30px;
  159.         }
  160.         .user-box h3 {
  161.             border-bottom: 1px solid #006ec8;
  162.             padding-bottom: 10px;
  163.             margin-bottom: 15px;
  164.             font-size: 18pt;
  165.             color: #003c8c;
  166.         }
  167.         .contact-section {
  168.             border: 2px solid #006ec8;
  169.             border-radius: 10px;
  170.             padding: 15px;
  171.             background-color: #f8fbff;
  172.         }
  173.         .contact-section h3 {
  174.             color: #003c8c;
  175.             font-size: 18pt;
  176.             margin-bottom: 15px;
  177.         }
  178.         ul li {
  179.             color:#0d3b79 !important;
  180.         }
  181.     </style>
  182.     <main class="container padding-header">
  183.         <section class="row">
  184.             <div class="col-md-9">
  185.             <div class="ariane col-12">
  186.                     <span>
  187.                         <a href="https://lelorrain.fr/">Accueil</a> /
  188.                         {% if product.categorie1 != null %}{{ product.categorie1|raw }} / {% endif %}
  189.                         {% if product.categorie2 != null %}{{ product.categorie2|raw }} / {% endif %}
  190.                         {% if product.categorie3 != null %}{{ product.categorie3|raw }} / {% endif %}
  191.                         {% if product.derniereCategorie != null %}<span class="arianeEnd">{{ product.derniereCategorie|raw }}</span>{% endif %}
  192.                     </span>
  193.             </div>
  194.             <div class="col-12 spacerTop">
  195.             {% set _ = productsSources|length %}
  196.             
  197.                 {% if productsSources|length > 0 %}
  198.                 <h1><span class="souligne-title">{{ product.title }}</span></h1>
  199.                 {% else %}
  200.                 <h1><span class="souligne-title">{{ product.name }}</span></h1>
  201.                 {%  endif %}
  202.             </div>
  203.             <div class="col-12 spacerTop">
  204.                 {% if productsSources|length > 0 %}
  205.                 <div class="headerTxt">{{ product.subTitle }}</div>
  206.                 {% else %}
  207.                 <div class="headerTxt">{{ product.header|raw }}</div>
  208.                 {%  endif %}
  209.                 
  210.             </div>
  211.             <div class="col-12 spacerTop">
  212.                 <span class="mainReference">REF. {{ product.mainReference }}</span>
  213.             </div>
  214.             <div class="col-12 spacerTop">
  215.                 <div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel" style="width:80%;height:auto;">
  216.                     <div class="carousel-indicators">
  217.                         {% for iteration in 1..product.images|length %}
  218.                             <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="{{ iteration - 1 }}" {{ (loop.first ) ?'class="active" aria-current="true"' : '' }} aria-label="Slide {{ iteration }}"></button>
  219.                         {% endfor %}
  220.                     </div>
  221.                     <div class="carousel-inner">
  222.                         {% for image in product.images %}
  223.                             <div class="carousel-item {{ (loop.first ) ? 'active' : '' }}">
  224.                                 <img src="{{ asset('assets/uploads/products/mini/') ~ image.name }}" class="d-block" alt="{{ product.name }}" style="width:auto;max-height:275px;">
  225.                             </div>
  226.                         {% endfor %}
  227.                     </div>
  228.                     {%  if product.images|length > 1 %}
  229.                     <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
  230.                         <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  231.                         <span class="visually-hidden">Previous</span>
  232.                     </button>
  233.                     <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
  234.                         <span class="carousel-control-next-icon" aria-hidden="true"></span>
  235.                         <span class="visually-hidden">Next</span>
  236.                     </button>
  237.                     {%  endif %}
  238.                 </div>
  239.             </div>
  240.             {% set hasDescription = product.description is not empty and product.description != product.slug %}
  241.             <div class="tab">
  242.                 {% if hasDescription %}<button class="tablinks" onclick="openTab(event, 'descriptionProduit')" id="defaultOpen">Description Produit</button>{% endif %}
  243.                 {% if product.donneesTechniques is not empty %} <button class="tablinks" onclick="openTab(event, 'donneesTechniques')" {% if not hasDescription %} id="defaultOpen" {% endif %}>Données techniques</button> {% endif %}
  244.                 {% if product.videoProduit is not empty %}  <button class="tablinks" onclick="openTab(event, 'videoProduit')">Vidéo produit</button> {% endif %}
  245.             </div>
  246.             {% if product.description is not empty and product.description != product.slug %}
  247.             <div id="descriptionProduit" class="tabcontent">
  248.                 <p>{{ product.description|raw }}</p>
  249.             </div>
  250.             {% endif %}
  251.             {% if product.donneesTechniques is not empty %}
  252.             <div id="donneesTechniques" class="tabcontent">
  253.                 {% set firstProductSource = productsSources|first %}
  254.                 {% if firstProductSource is not empty %}
  255.                     <p>{{ firstProductSource.footer|raw }}</p>
  256.                 {% else %}
  257.                     <p>{{ product.donneesTechniques|raw }}</p>    
  258.                 {% endif %}
  259.             </div>
  260.             {% endif %}
  261.             {% if product.donneesTechniques is not empty %}
  262.             <div id="videoProduit" class="tabcontent">
  263.                 <p>{{ product.videoProduit|raw }}</p>
  264.             </div>
  265.             {% endif %}
  266.             {% if productsSources|length > 0 %}
  267.             <div class="options spacerTop">
  268.                 <span>OPTIONS</span>
  269.             </div>
  270.             <button class="collapsible">Produits de la gamme</button>
  271.             <div class="content">
  272.                 <div class="col-12 mb-12">
  273.                     <table class="productTable" cellspacing="2px">
  274.                         {% set num = 0  %}
  275.                         {% set firstProduct = productsSources|first %}
  276.                         {% set nbCols = 0 %}
  277.                         {% set countName = 0 %}
  278.                         {% set countGas = 0 %}
  279.                         {% set countGraduation = 0 %}
  280.                         {% set countMaximumPressure = 0 %}
  281.                         {% set countFlowPressure = 0 %}
  282.                         {% set countSubType = 0 %}
  283.                         {% set countCapacity = 0 %}
  284.                         {% set countLength = 0 %}
  285.                         {% set countThread = 0 %}
  286.                         {% set countAccessoryTxt = 0 %}
  287.                         {% set countInPort = 0 %}
  288.                         {% set countOutPort = 0 %}
  289.                         {% set countWeight = 0 %}
  290.                         {% for linkedProduct in productsSources %}
  291.                             {% if linkedProduct.name is not empty %}
  292.                                 {% set countName = countName + 1 %}
  293.                             {% endif %}
  294.                             {% if linkedProduct.gas is not empty %}
  295.                                 {% set countGas = countGas + 1 %}{% set nbCols = nbCols+1 %}
  296.                             {% endif %}
  297.                             {% if linkedProduct.graduation is not empty %}
  298.                                 {% set countGraduation = countGraduation + 1 %}{% set nbCols = nbCols+1 %}
  299.                             {% endif %}
  300.                             {% if linkedProduct.maximumPressure is not empty %}
  301.                                 {% set countMaximumPressure = countMaximumPressure + 1 %}{% set nbCols = nbCols+1 %}
  302.                             {% endif %}
  303.                             {% if linkedProduct.flowPressure is not empty %}
  304.                                 {% set countFlowPressure = countFlowPressure + 1 %}{% set nbCols = nbCols+1 %}
  305.                             {% endif %}
  306.                             {% if linkedProduct.subType is not empty %}
  307.                                 {% set countSubType = countSubType + 1 %}{% set nbCols = nbCols+1 %}
  308.                             {% endif %}
  309.                             {% if linkedProduct.capacity is not empty %}
  310.                                 {% set countCapacity = countCapacity + 1 %}{% set nbCols = nbCols+1 %}
  311.                             {% endif %}
  312.                             {% if linkedProduct.length is not empty %}
  313.                                 {% set countLength = countLength + 1 %}{% set nbCols = nbCols+1 %}
  314.                             {% endif %}
  315.                             {% if linkedProduct.thread is not empty %}
  316.                                 {% set countThread = countThread + 1 %}{% set nbCols = nbCols+1 %}
  317.                             {% endif %}
  318.                             {% if linkedProduct.accessoryTxt is not empty %}
  319.                                 {% set countAccessoryTxt = countAccessoryTxt + 1 %}{% set nbCols = nbCols+1 %}
  320.                             {% endif %}
  321.                             {% if linkedProduct.inPort is not empty %}
  322.                                 {% set countInPort = countInPort + 1 %}{% set nbCols = nbCols+1 %}
  323.                             {% endif %}
  324.                             {% if linkedProduct.outPort is not empty %}
  325.                                 {% set countOutPort = countOutPort + 1 %}{% set nbCols = nbCols+1 %}
  326.                             {% endif %}
  327.                             {% if linkedProduct.weight is not empty %}
  328.                                 {% set countWeight = countWeight + 1 %}{% set nbCols = nbCols+1 %}
  329.                             {% endif %}
  330.                         {% endfor %}
  331.                         {%  for linkedProduct in productsSources %}
  332.                             
  333.                             {% if num == 0 %}
  334.                                 <tr style="font-weight:bold">
  335.                                     {% if countName > 0 %}<th>Ref.</th>{% endif %}
  336.                                   
  337.                                     {% if countGas > 0 %}<th>Gaz</th>{% endif %}
  338.                                     {% if countGraduation > 0 %}<th>Graduation</th>{% endif %}
  339.                                     {% if countMaximumPressure > 0 %}<th>Pression maxi en bar</th>{% endif %}
  340.                                     {% if countFlowPressure > 0 %}<th>Débit / pression </th>{% endif %}
  341.                                     {% if countSubType > 0 %}<th>Sous-type</th>{% endif %}
  342.                                     {% if countCapacity > 0 %}<th>Capacité en mm</th>{% endif %}
  343.                                     {% if countLength > 0 %}<th>L. hors tout en mm</th>{% endif %}
  344.                                     {% if countThread > 0 %}<th>Filetage</th>{% endif %}
  345.                                     {% if countAccessoryTxt > 0 %}<th>Accessoire</th>{% endif %}
  346.                                     {% if countInPort > 0 and product.boolInPort %}<th>Entrée</th>{% endif %}
  347.                                     {% if countOutPort > 0 and product.boolOutPort %}<th>Sortie</th>{% endif %}
  348.                                     {% if countWeight > 0 %}<th>Poids en kg</th>{% endif %}
  349.                                     {% if nbCols == 0 %}<th>Description</th>{% endif %}
  350.                                 </tr>
  351.                             {% endif %}
  352.                             <tr>
  353.                                 {% if countName > 0 %}<td style="text-align:left"><a href="/produits/{{ linkedProduct.mainReference }}">{{ linkedProduct.mainReference }}</a></td>{% endif %}
  354.                                 {% if countGas> 0 %}<td style="text-align:left">{{ linkedProduct.gas }}</td>{% endif %}
  355.                                 {% if countGraduation > 0 %}<td style="text-align:left">{{ linkedProduct.graduation }}</td>{% endif %}
  356.                                 {% if countMaximumPressure > 0 %}<td style="text-align:left">{{ linkedProduct.maximumPressure }}</td>{% endif %} 
  357.                                 {% if countFlowPressure > 0 %}<td style="text-align:left">{{ linkedProduct.flowPressure }}</td>{% endif %}
  358.                                 {% if countSubType > 0 %}<td style="text-align:left">{{ linkedProduct.subType }}</td>{% endif %}
  359.                                 {% if countCapacity > 0 %}<td style="text-align:left">{{ linkedProduct.capacity }}</td>{% endif %}
  360.                                 {% if countLength > 0 %}<td style="text-align:left">{{ linkedProduct.length }}</td>{% endif %}
  361.                                 {% if countThread > 0 %}<td style="text-align:left">{{ product.thread }}</td>{% endif %}
  362.                                 {% if countAccessoryTxt > 0 %}<td style="text-align:left">{{ linkedProduct.accessoryTxt }}</td>{% endif %}
  363.                                 {% if countInPort > 0 and product.boolInPort %}<td style="text-align:left">{{ linkedProduct.inPort }}</td>{% endif %}
  364.                                 {% if countOutPort > 0 and product.boolOutPort %}<td style="text-align:left">{{ linkedProduct.outPort }}</td>{% endif %}
  365.                                 {% if countWeight >0 %}<td style="text-align:left">{{ linkedProduct.weight }}</td>{% endif %}
  366.                                 
  367.                                 {% if nbCols == 0 %}<td style="text-align:left">{{ linkedProduct.description|raw }}{% endif %}
  368.                             </tr>
  369.                             {% set num = num +1  %}
  370.                         {% endfor %}
  371.                     </table>
  372.                 </div>
  373.             </div>
  374.             {% endif %}
  375.             {% set count = 0 %}
  376.             {% for accessory in product.linkedProducts %}
  377.                 {% if accessory.name is not empty %}
  378.                 {% set count = count + 1 %}
  379.                 {% endif %}
  380.             {% endfor %}
  381.             {% if count > 0 %}
  382.             <div class="options spacerTop">
  383.                 <span>OPTIONS</span>
  384.             </div>
  385.             <button class="collapsible">Produits de la gamme</button>
  386.             <div class="content">
  387.                 <div class="col-12 mb-12">
  388.                     <table class="productTable" cellspacing="2px">
  389.                         {% set num = 0  %}
  390.                         {% set firstProduct = product.linkedProducts|first %}
  391.                         {% set nbCols = 0 %}
  392.                         {% set countName = 0 %}
  393.                         {% set countGas = 0 %}
  394.                         {% set countGraduation = 0 %}
  395.                         {% set countMaximumPressure = 0 %}
  396.                         {% set countFlowPressure = 0 %}
  397.                         {% set countSubType = 0 %}
  398.                         {% set countCapacity = 0 %}
  399.                         {% set countLength = 0 %}
  400.                         {% set countThread = 0 %}
  401.                         {% set countAccessoryTxt = 0 %}
  402.                         {% set countInPort = 0 %}
  403.                         {% set countOutPort = 0 %}
  404.                         {% set countWeight = 0 %}
  405.                         {% for linkedProduct in product.linkedProducts %}
  406.                             {% if linkedProduct.name is not empty %}
  407.                                 {% set countName = countName + 1 %}
  408.                             {% endif %}
  409.                             {% if linkedProduct.gas is not empty %}
  410.                                 {% set countGas = countGas + 1 %}{% set nbCols = nbCols+1 %}
  411.                             {% endif %}
  412.                             {% if linkedProduct.graduation is not empty %}
  413.                                 {% set countGraduation = countGraduation + 1 %}{% set nbCols = nbCols+1 %}
  414.                             {% endif %}
  415.                             {% if linkedProduct.maximumPressure is not empty %}
  416.                                 {% set countMaximumPressure = countMaximumPressure + 1 %}{% set nbCols = nbCols+1 %}
  417.                             {% endif %}
  418.                             {% if linkedProduct.flowPressure is not empty %}
  419.                                 {% set countFlowPressure = countFlowPressure + 1 %}{% set nbCols = nbCols+1 %}
  420.                             {% endif %}
  421.                             {% if linkedProduct.subType is not empty %}
  422.                                 {% set countSubType = countSubType + 1 %}{% set nbCols = nbCols+1 %}
  423.                             {% endif %}
  424.                             {% if linkedProduct.capacity is not empty %}
  425.                                 {% set countCapacity = countCapacity + 1 %}{% set nbCols = nbCols+1 %}
  426.                             {% endif %}
  427.                             {% if linkedProduct.length is not empty %}
  428.                                 {% set countLength = countLength + 1 %}{% set nbCols = nbCols+1 %}
  429.                             {% endif %}
  430.                             {% if linkedProduct.thread is not empty %}
  431.                                 {% set countThread = countThread + 1 %}{% set nbCols = nbCols+1 %}
  432.                             {% endif %}
  433.                             {% if linkedProduct.accessoryTxt is not empty %}
  434.                                 {% set countAccessoryTxt = countAccessoryTxt + 1 %}{% set nbCols = nbCols+1 %}
  435.                             {% endif %}
  436.                             {% if linkedProduct.inPort is not empty %}
  437.                                 {% set countInPort = countInPort + 1 %}{% set nbCols = nbCols+1 %}
  438.                             {% endif %}
  439.                             {% if linkedProduct.outPort is not empty %}
  440.                                 {% set countOutPort = countOutPort + 1 %}{% set nbCols = nbCols+1 %}
  441.                             {% endif %}
  442.                             {% if linkedProduct.weight is not empty %}
  443.                                 {% set countWeight = countWeight + 1 %}{% set nbCols = nbCols+1 %}
  444.                             {% endif %}
  445.                         {% endfor %}
  446.                         {%  for linkedProduct in product.linkedProducts %}
  447.                             {% if num == 0 %}
  448.                                 <tr style="font-weight:bold">
  449.                                     {% if countName > 0 %}<th>Ref.</th>{% endif %}
  450.                                     {% if countGas > 0 %}<th>Gaz</th>{% endif %}
  451.                                     {% if countGraduation > 0 %}<th>Graduation</th>{% endif %}
  452.                                     {% if countMaximumPressure > 0 %}<th>Pression maxi en bar</th>{% endif %}
  453.                                     {% if countFlowPressure > 0 %}<th>Débit / pression </th>{% endif %}
  454.                                     {% if countSubType > 0 %}<th>Sous-type</th>{% endif %}
  455.                                     {% if countCapacity > 0 %}<th>Capacité en mm</th>{% endif %}
  456.                                     {% if countLength > 0 %}<th>L. hors tout en mm</th>{% endif %}
  457.                                     {% if countThread > 0 %}<th>Filetage</th>{% endif %}
  458.                                     {% if countAccessoryTxt > 0 %}<th>Accessoire</th>{% endif %}
  459.                                     {% if countInPort > 0 and product.boolInPort %}<th>Entrée</th>{% endif %}
  460.                                     {% if countOutPort > 0 and product.boolOutPort %}<th>Sortie</th>{% endif %}
  461.                                     {% if countWeight > 0 %}<th>Poids en kg</th>{% endif %}
  462.                                     {% if nbCols == 0 %}<th>Description</th>{% endif %}
  463.                                 </tr>
  464.                             {% endif %}
  465.                             <tr>
  466.                                 {% if countName > 0 %}<td style="text-align:left"><a href="/produits/{{ linkedProduct.mainReference }}">{{ linkedProduct.mainReference }}</a></td>{% endif %}
  467.                                 {% if countGas> 0 %}<td style="text-align:left">{{ linkedProduct.gas }}</td>{% endif %}
  468.                                 {% if countGraduation > 0 %}<td style="text-align:left">{{ linkedProduct.graduation }}</td>{% endif %}
  469.                                 {% if countMaximumPressure > 0 %}<td style="text-align:left">{{ linkedProduct.maximumPressure }}</td>{% endif %} 
  470.                                 {% if countFlowPressure > 0 %}<td style="text-align:left">{{ linkedProduct.flowPressure }}</td>{% endif %}
  471.                                 {% if countSubType > 0 %}<td style="text-align:left">{{ linkedProduct.subType }}</td>{% endif %}
  472.                                 {% if countCapacity > 0 %}<td style="text-align:left">{{ linkedProduct.capacity }}</td>{% endif %}
  473.                                 {% if countLength > 0 %}<td style="text-align:left">{{ linkedProduct.length }}</td>{% endif %}
  474.                                 {% if countThread > 0 %}<td style="text-align:left">{{ product.thread }}</td>{% endif %}
  475.                                 {% if countAccessoryTxt > 0 %}<td style="text-align:left">{{ linkedProduct.accessoryTxt }}</td>{% endif %}
  476.                                 {% if countInPort > 0 and product.boolInPort %}<td style="text-align:left">{{ linkedProduct.inPort }}</td>{% endif %}
  477.                                 {% if countOutPort > 0 and product.boolOutPort %}<td style="text-align:left">{{ linkedProduct.outPort }}</td>{% endif %}
  478.                                 {% if countWeight >0 %}<td style="text-align:left">{{ linkedProduct.weight }}</td>{% endif %}
  479.                                 {% if nbCols == 0 %}<td style="text-align:left">{{ linkedProduct.description|raw }}{% endif %}
  480.                             </tr>
  481.                             {% set num = num +1  %}
  482.                         {% endfor %}
  483.                     </table>
  484.                 </div>
  485.             </div>
  486.             {% endif %}
  487.         {% set previous_title = "" %}
  488.             {% set count = 0 %}
  489.             {% for accessory in product.accessories %}
  490.                 {% set count = count + 1 %}
  491.             {% endfor %}
  492.             {% if count > 0 %}
  493.             {% set filteredAccessories = product.accessories|filter(item => item.gas is not empty)|filter(item => item.subTitle is empty) %}
  494.             {% set count2 = 0 %}
  495.             {% for accessory in filteredAccessories %}
  496.                 {% set count2 = count2 + 1 %}
  497.             {% endfor %}
  498.             {% set filteredAccessories = product.accessories|filter(item => item.subTitle is not empty) %}
  499.             {% set count2 = 0 %}
  500.             {% for accessory in filteredAccessories %}
  501.                 {% set count2 = count2 + 1 %}
  502.             {% endfor %}
  503.             {% if count2 > 0 %}
  504.             <button class="collapsible">Accessoires Compatibles</button>
  505.              {% endif %}
  506.             <div class="content">
  507.                     {% set count = 0 %}
  508.                     {% for accessory in product.accessories %}
  509.                         {% if accessory.gas is not empty and (accessory.speed is empty or (accessory.speed is not empty and accessory.subTitle is empty)) %}
  510.                             {% set count = count + 1 %}
  511.                         {% elseif accessory.subTitle == "Multidards" or accessory.subTitle == "Annulaire" %}
  512.                             {% set count = count + 1 %}
  513.                         {% endif %}
  514.                     {% endfor %}
  515.                     {% set countSubTitle = 0 %}
  516.                     {% for accessory in product.accessories %}
  517.                         {% if accessory.subTitle is not empty %}
  518.                             {% set countSubTitle = count + 1 %}
  519.                         {% endif %}
  520.                     {% endfor %}
  521.                     {% if count > 0 %}
  522.                     <div class="col-12 mb-12" style="margin-top:25px;">
  523.                             {# Créer un tableau d'accessoires avec un découpage par GAZ - ils doivent avoir un gaz renseigné et pas de sous titre #}
  524.                             {% set filteredAccessories = product.accessories|filter(item => item.gas is not empty)|filter(item => item.subTitle is empty) %}
  525.                            
  526.                             {%  set num = 0  %}
  527.                             {%  set sub = "first"  %}
  528.                             {%  set nbCol = 4  %}
  529.                             {%  set firstProduct = filteredAccessories|first %}
  530.                             {% if product.graduation  %}
  531.                                 {% if firstProduct.graduation is not empty %}
  532.                                     {%  set nbCol = nbCol +1  %} {% endif %}
  533.                             {% endif %}
  534.                             {% if product.boolInPort  %}
  535.                                 {% if firstProduct.inPort is not empty %}
  536.                                     {%  set nbCol = nbCol +1  %} {% endif %}
  537.                             {% endif %}
  538.                             {% if product.boolOutPort  %}
  539.                                 {% if firstProduct.outPort is not empty %}
  540.                                     {%  set nbCol = nbCol +1  %} {% endif %}
  541.                             {% endif %}
  542.                             {% for accessoire in filteredAccessories %}
  543.                                         {% if (sub != accessoire.gas) %}
  544.                                         {% if sub != "first" %}
  545.                                         </table>
  546.                                         </td>
  547.                                         </tr>
  548.                                         </table>
  549.                                         {% endif %}
  550.                                         {% if previous_title != accessoire.title %}
  551.                                         <h2>
  552.                                             {{ accessoire.title }}
  553.                                         </h2>
  554.                                         {% endif %}
  555.                                         {%  set previous_title = accessoire.title %}
  556.                                         <table class="productTable" cellspacing="2px">
  557.                                             <tr class="responsiveImage">
  558.                                                 <td style="text-align:left">
  559.                                                     {% if accessoire.images is not null %}
  560.                                                         {% set firstImage = accessoire.images|first %}
  561.                                                         {% if firstImage %}
  562.                                                             <img src="{{ asset('assets/uploads/products/mini/') ~ firstImage.name }}" class="d-block w-100" alt="{{ firstImage.name }}" style="transform: scale(0.5);">
  563.                                                         {% endif %}
  564.                                                     {% endif %}
  565.                                                 </td>
  566.                                             </tr>
  567.                                             <tr>
  568.                                                 <td style="text-align:left" class="notResponsiveImage">
  569.                                                     {% if accessoire.images is not null %}
  570.                                                         {% set firstImage = accessoire.images|first %}
  571.                                                         {% if firstImage %}
  572.                                                             <img src="{{ asset('assets/uploads/products/mini/') ~ firstImage.name }}" class="d-block w-100" alt="{{ firstImage.name }}" style="transform: scale(0.5);">
  573.                                                         {% endif %}
  574.                                                     {% endif %}
  575.                                                 </td>
  576.                                                 <td style="text-align:left">
  577.                                                     {% set count = 0 %}
  578.                                                     {% set countName = 0 %}
  579.                                                     {% set countCaliber = 0 %}
  580.                                                     {% set countThickness = 0 %}
  581.                                                     {% set countSpeed = 0 %}
  582.                                                     {% set countFlowPressure = 0 %}
  583.                                                     {% set countMaximumPressure = 0 %}
  584.                                                     {% set countThread = 0 %}
  585.                                                     {% set countGraduation = 0 %}
  586.                                                     {% set countInPort = 0 %}
  587.                                                     {% set countOutPort = 0 %}
  588.                                                     {% set countAccessoryType = 0 %}
  589.                                                     {% set countDrillingThickness = 0 %}
  590.                                                     {% set countPressureInBar = 0 %}
  591.                                                     {% set countDriftThickness = 0 %}
  592.                                                     {% set countGougingThickness = 0 %}
  593.                                                     {% set countWeight = 0 %}
  594.                                                     {% set filteredAccessoriesFor = product.accessories|filter(item => item.gas == accessoire.gas)|filter(item => item.subTitle is empty) %}
  595.                                                     {% for accessory in filteredAccessoriesFor %}
  596.                                                         {% if accessory.gas is not empty and accessory.gas == accessoire.gas and accessory.subTitle == accessoire.subTitle %}
  597.                                                         {% if accessory.gas is not empty and (accessory.speed is empty or (accessory.speed is not empty and accessory.subTitle is empty)) %}
  598.                                                             {% set count = count + 1 %}
  599.                                                         {% endif %}
  600.                                                         {% if accessory.name is not empty %}
  601.                                                             {% set countName = countName + 1 %}
  602.                                                         {% endif %}
  603.                                                         {% if accessory.caliber is not empty %}
  604.                                                             {% set countCaliber = countCaliber + 1 %}
  605.                                                         {% endif %}
  606.                                                         {% if accessory.thickness is not empty %}
  607.                                                             {% set countThickness = countThickness + 1 %}
  608.                                                         {% endif %}
  609.                                                         {% if accessory.speed is not empty %}
  610.                                                             {% set countSpeed = countSpeed + 1 %}
  611.                                                         {% endif %}
  612.                                                         {% if accessory.flowPressure is not empty %}
  613.                                                             {% set countFlowPressure = countFlowPressure + 1 %}
  614.                                                         {% endif %}
  615.                                                         {% if accessory.maximumPressure is not empty %}
  616.                                                             {% set countMaximumPressure = countMaximumPressure + 1 %}
  617.                                                         {% endif %}
  618.                                                         {% if accessory.Thread is not empty %}
  619.                                                             {% set countThread = countThread + 1 %}
  620.                                                         {% endif %}
  621.                                                         {% if accessory.graduation is not empty %}
  622.                                                             {% set countGraduation = countGraduation + 1 %}
  623.                                                         {% endif %}
  624.                                                         {% if accessory.inPort is not empty %}
  625.                                                             {% set countInPort = countInPort + 1 %}
  626.                                                         {% endif %}
  627.                                                         {% if accessory.outPort is not empty %}
  628.                                                             {% set countOutPort = countOutPort + 1 %}
  629.                                                         {% endif %}
  630.                                                         {% if accessory.accessoryType is not empty %}
  631.                                                             {% set countAccessoryType = countAccessoryType + 1 %}
  632.                                                         {% endif %}
  633.                                                         {% if accessory.DrillingThickness is not empty %}
  634.                                                             {% set countDrillingThickness = countDrillingThickness + 1 %}
  635.                                                         {% endif %}
  636.                                                         {% if accessory.pressureInBar is not empty %}
  637.                                                             {% set countPressureInBar = countPressureInBar + 1 %}
  638.                                                         {% endif %}
  639.                                                         {% if accessory.driftThickness is not empty %}
  640.                                                             {% set countDriftThickness = countDriftThickness + 1 %}
  641.                                                         {% endif %}
  642.                                                         {% if accessory.gougingThickness is not empty %}
  643.                                                             {% set countGougingThickness = countGougingThickness + 1 %}
  644.                                                         {% endif %}
  645.                                                         {% if accessory.weight is not empty %}
  646.                                                             {% set countWeight = countWeight + 1 %}
  647.                                                         {% endif %}
  648.                                                         {% endif %}
  649.                                                     {% endfor %}
  650.                                                     <table class="productTable" cellspacing="2px">
  651.                                                         <tr style="font-weight:bold;padding-top: 25px;">
  652.                                                             <td colspan="{{ nbCol }}">
  653.                                                                {{accessoire.gas }}
  654.                                                             </td>
  655.                                                         </tr>
  656.                                                         <tr style="font-weight:bold">
  657.                                                             {% if countName > 0 %}<th>Ref. 2</th>{% endif %}
  658.                                                             {% if countCaliber > 0 %}<th>Calibre</th>{% endif %}
  659.                                                             {% if countThickness > 0 %}<th>Epaisseur de coupe en mm</th>{% endif %}
  660.                                                             {% if countSpeed > 0 %}<th>Débit l/h</th>{% endif %}
  661.                                                             {% if countFlowPressure > 0 %}<th>Débit / pression </th>{% endif %}
  662.                                                             {% if countMaximumPressure > 0 %}<th>Pression maxi en bar</th>{% endif %}
  663.                                                             {% if countThread > 0 %}<th>Filetage</th>{% endif %}
  664.                                                             {% if countGraduation > 0 %}<th>Graduation</th>{% endif %}
  665.                                                             {% if countInPort > 0 %}<th>Entrée</th>{% endif %}
  666.                                                             {% if countOutPort > 0 %}<th>Sortie</th>{% endif %}
  667.                                                             {% if countAccessoryType > 0 %}<th>Type</th>{% endif %}
  668.                                                             {% if countDrillingThickness > 0 %}<th>Epaisseur de perçage</th>{% endif %}
  669.                                                             {% if countPressureInBar > 0 %}<th>Pression de service en bar</th>{% endif %}
  670.                                                             {% if countDriftThickness > 0 %}<th>Epaisseur de dérivetage en mm</th>{% endif %}
  671.                                                             {% if countGougingThickness > 0 %}<th>Epaisseur de gougeage en mm</th>{% endif %}
  672.                                                             {% if countWeight > 0 %}<th>Poids en kg</th>{% endif %}
  673.                                                         </tr>
  674.                                         {% set sub = accessoire.gas  %}
  675.                                        
  676.                                     {% endif %}
  677.                                     <tr>
  678.                                         {% if countName > 0 %} <td style="text-align:left"><a href="/produits/{{ accessoire.name }}">{{ accessoire.name }}</a></td> {% endif %}
  679.                                         {% if countCaliber > 0 %}<td style="text-align:left">{{ accessoire.caliber }}</td> {% endif %}
  680.                                         {% if countThickness > 0 %}<td style="text-align:left">{{ accessoire.thickness }}</td> {% endif %}
  681.                                         {% if countSpeed > 0 %}<td style="text-align:left">{{ accessoire.speed }}</td>{% endif %}
  682.                                         {% if countFlowPressure > 0 %}<td style="text-align:left">{{ accessoire.flowPressure }}</td>{% endif %}
  683.                                         {% if countMaximumPressure > 0 %}<td style="text-align:left">{{ accessoire.maximumPressure }}</td>{% endif %}
  684.                                         {% if countThread > 0 %}<td style="text-align:left">{{ accessoire.thread }}</td>{% endif %}
  685.                                         {% if countGraduation > 0 %}<td style="text-align:left">{{ accessoire.graduation }}</td> {% endif %}
  686.                                         {% if countInPort  > 0 %}<td style="text-align:left">{{ accessoire.inPort }}</td> {% endif %}
  687.                                         {% if countOutPort > 0 %}<td style="text-align:left">{{ accessoire.outPort }}</td> {% endif %}
  688.                                         {% if countAccessoryType > 0 %}<td style="text-align:left">{{ accessoire.accessoryType }}</td>{% endif %}
  689.                                         {% if countDrillingThickness > 0 %}<td style="text-align:left">{{ accessoire.drillingThickness }}</td>{% endif %}
  690.                                         {% if countPressureInBar > 0 %}<td style="text-align:left">{{ accessoire.pressureInBar }}</td>{% endif %}
  691.                                         {% if countDriftThickness > 0 %}<td style="text-align:left">{{ accessoire.driftThickness }}</td>{% endif %}
  692.                                         {% if countGougingThickness > 0 %}<td style="text-align:left">{{ accessoire.gougingThickness }}</td>{% endif %}
  693.                                         {% if countWeight > 0 %}<td style="text-align:left">{{ accessoire.weight }}</td>{% endif %}
  694.                                     </tr>
  695.                                 
  696.                                 {% set num = num +1  %}
  697.                                 {% endfor %}
  698.                                             </table>
  699.                                             </td>
  700.                                             </tr>
  701.                                         </table>
  702.                             
  703.                             {% if countSubTitle > 0 %}
  704.                             {# Créer un tableau trié en fonction de `subTitle` #}
  705.                             {% set filteredAccessories = product.accessories|filter(item => item.gas is not empty)|filter(item => item.subTitle is not empty)| sort((a, b) => a.subtitle <=> b.subtitle)  %}
  706.                            
  707.                             {%  set num = 0  %}
  708.                             {%  set sub = "first"  %}
  709.                             {%  set nbCol = 4  %}
  710.                             {%  set firstProduct = filteredAccessories|first %}
  711.                             {% if product.graduation  %}
  712.                                 {% if firstProduct.graduation is not empty %}
  713.                                     {%  set nbCol = nbCol +1  %} {% endif %}
  714.                             {% endif %}
  715.                             {% if product.inPort  %}
  716.                                 {% if firstProduct.inPort is not empty %}
  717.                                     {%  set nbCol = nbCol +1  %} {% endif %}
  718.                             {% endif %}
  719.                             {% if product.outPort  %}
  720.                                 {% if firstProduct.outPort is not empty %}
  721.                                     {%  set nbCol = nbCol +1  %} {% endif %}
  722.                             {% endif %}
  723.                             {% for accessoire in filteredAccessories %}
  724.                                         {% if (sub != accessoire.subTitle) %}
  725.                                         {% if sub != "first" %}
  726.                                         </table>
  727.                                         </td>
  728.                                         </tr>
  729.                                         </table>
  730.                                         {% endif %}
  731.                                         {% if previous_title != accessoire.title %}
  732.                                         <h2>
  733.                                             {{ accessoire.title }}
  734.                                         </h2>
  735.                                         
  736.                                         {% endif %}
  737.                                         {%  set previous_title = accessoire.title %}
  738.                                         <table class="productTable" cellspacing="2px">
  739.                                             <tr class="responsiveImage">
  740.                                                 <td style="text-align:left">
  741.                                                     {% if accessoire.images is not null %}
  742.                                                         {% set firstImage = accessoire.images|first %}
  743.                                                         {% if firstImage %}
  744.                                                             <img src="{{ asset('assets/uploads/products/mini/') ~ firstImage.name }}" class="d-block w-100" alt="{{ firstImage.name }}" style="transform: scale(0.5);">
  745.                                                         {% endif %}
  746.                                                     {% endif %}
  747.                                                 </td>
  748.                                             </tr>
  749.                                             <tr>
  750.                                                 <td style="text-align:left" class="notResponsiveImage">
  751.                                                     {% if accessoire.images is not null %}
  752.                                                         {% set firstImage = accessoire.images|first %}
  753.                                                         {% if firstImage %}
  754.                                                             <img src="{{ asset('assets/uploads/products/mini/') ~ firstImage.name }}" class="d-block w-100" alt="{{ firstImage.name }}" style="transform: scale(0.5);">
  755.                                                         {% endif %}
  756.                                                     {% endif %}
  757.                                                 </td>
  758.                                                 <td style="text-align:left">
  759.                                                     {% set count = 0 %}
  760.                                                     {% set countGas = 0 %}
  761.                                                     {% set countName = 0 %}
  762.                                                     {% set countCaliber = 0 %}
  763.                                                     {% set countThickness = 0 %}
  764.                                                     {% set countSpeed = 0 %}
  765.                                                     {% set countFlowPressure = 0 %}
  766.                                                     {% set countMaximumPressure = 0 %}
  767.                                                     {% set countThread = 0 %}
  768.                                                     {% set countGraduation = 0 %}
  769.                                                     {% set countInPort = 0 %}
  770.                                                     {% set countOutPort = 0 %}
  771.                                                     {% set countAccessoryType = 0 %}
  772.                                                     {% set countDrillingThickness = 0 %}
  773.                                                     {% set countPressureInBar = 0 %}
  774.                                                     {% set countDriftThickness = 0 %}
  775.                                                     {% set countGougingThickness = 0 %}
  776.                                                     {% set countWeight = 0 %}
  777.                                                     {% set filteredAccessoriesFor = product.accessories|filter(item => item.gas == accessoire.gas)| sort((a, b) => a.subtitle <=> b.subtitle)  %}
  778.                                                     {% if countSubTitle > 0 %}
  779.                                                         {% set filteredAccessoriesFor = product.accessories|filter(item => item.subTitle == accessoire.subTitle)| sort((a, b) => a.subtitle <=> b.subtitle)  %}
  780.                                                     {% endif %}
  781.                                                     {% for accessory in filteredAccessoriesFor %}
  782.                                                         {% if accessory.gas is not empty and (accessory.speed is empty or (accessory.speed is not empty and accessory.subTitle is empty)) %}
  783.                                                             {% set count = count + 1 %}
  784.                                                         {% endif %}
  785.                                                         {% if accessory.name is not empty %}
  786.                                                             {% set countName = countName + 1 %}
  787.                                                         {% endif %}
  788.                                                         {% if accessory.caliber is not empty %}
  789.                                                             {% set countCaliber = countCaliber + 1 %}
  790.                                                         {% endif %}
  791.                                                         {% if accessory.thickness is not empty %}
  792.                                                             {% set countThickness = countThickness + 1 %}
  793.                                                         {% endif %}
  794.                                                         {% if accessory.speed is not empty %}
  795.                                                             {% set countSpeed = countSpeed + 1 %}
  796.                                                         {% endif %}
  797.                                                         {% if accessory.flowPressure is not empty %}
  798.                                                             {% set countFlowPressure = countFlowPressure + 1 %}
  799.                                                         {% endif %}
  800.                                                         {% if accessory.maximumPressure is not empty %}
  801.                                                             {% set countMaximumPressure = countMaximumPressure + 1 %}
  802.                                                         {% endif %}
  803.                                                         {% if accessory.Thread is not empty %}
  804.                                                             {% set countThread = countThread + 1 %}
  805.                                                         {% endif %}
  806.                                                         {% if accessory.graduation is not empty %}
  807.                                                             {% set countGraduation = countGraduation + 1 %}
  808.                                                         {% endif %}
  809.                                                         {% if accessory.inPort is not empty %}
  810.                                                             {% set countInPort = countInPort + 1 %}
  811.                                                         {% endif %}
  812.                                                         {% if accessory.outPort is not empty %}
  813.                                                             {% set countOutPort = countOutPort + 1 %}
  814.                                                         {% endif %}
  815.                                                         {% if accessory.accessoryType is not empty %}
  816.                                                             {% set countAccessoryType = countAccessoryType + 1 %}
  817.                                                         {% endif %}
  818.                                                         {% if accessory.DrillingThickness is not empty %}
  819.                                                             {% set countDrillingThickness = countDrillingThickness + 1 %}
  820.                                                         {% endif %}
  821.                                                         {% if accessory.pressureInBar is not empty %}
  822.                                                             {% set countPressureInBar = countPressureInBar + 1 %}
  823.                                                         {% endif %}
  824.                                                         {% if accessory.driftThickness is not empty %}
  825.                                                             {% set countDriftThickness = countDriftThickness + 1 %}
  826.                                                         {% endif %}
  827.                                                         {% if accessory.gougingThickness is not empty %}
  828.                                                             {% set countGougingThickness = countGougingThickness + 1 %}
  829.                                                         {% endif %}
  830.                                                         {% if accessory.weight is not empty %}
  831.                                                             {% set countWeight = countWeight + 1 %}
  832.                                                         {% endif %}
  833.                                                     {% endfor %}
  834.                                                     <table class="productTable" cellspacing="2px">
  835.                                                         <tr style="font-weight:bold;padding-top: 25px;">
  836.                                                             <td colspan="{{ nbCol }}">                                                    
  837.                                                                     <p>{{ accessoire.subTitle
  838.                                                                         |replace({
  839.                                                                             '[1]': '',
  840.                                                                             '[2]': '',
  841.                                                                             '[3]': '',
  842.                                                                             '[4]': ''
  843.                                                                         })
  844.                                                                     }}</p> 
  845.                                                                     {% if accessoire.header is not empty %}{{ accessoire.header|raw }}{% endif %}
  846.                                                             </td>
  847.                                                         </tr>
  848.                                                         <tr style="font-weight:bold">
  849.                                                             <th>Ref.</th>
  850.                                                             <th>Gaz</th>
  851.                                                             {% if countCaliber > 0 %}<th>Calibre</th>{% endif %}
  852.                                                           
  853.                                                             {% if countThickness > 0 %}<th>Epaisseur de coupe en mm</th>{% endif %}
  854.                                                             
  855.                                                              {% if countSpeed > 0 %}
  856.                                                                 {% if accessoire.subtitle == "Multidards" %}
  857.                                                                     <th>Débit g/h</th>
  858.                                                                 {% else %}
  859.                                                                     <th>Débit l/h</th>
  860.                                                                 {% endif %}
  861.                                                             {% endif %}
  862.                                                             {% if countFlowPressure > 0 %}<th>Débit / pression </th>{% endif %}
  863.                                                             {% if countMaximumPressure > 0 %}<th>Pression maxi en bar</th>{% endif %}
  864.                                                             {% if countThread > 0 %}<th>Filetage</th>{% endif %}
  865.                                                             {% if countGraduation > 0 %}<th>Graduation</th>{% endif %}
  866.                                                             {% if countInPort > 0 %}<th>Entrée</th>{% endif %}
  867.                                                             {% if countOutPort > 0 %}<th>Sortie</th>{% endif %}
  868.                                                             {% if countAccessoryType > 0 %}<th>Type</th>{% endif %}
  869.                                                             {% if countDrillingThickness > 0 %}
  870.                                                                 {% if accessoire.subtitle == "Annulaire" %}
  871.                                                                     <th>Diamètre perçage</th>
  872.                                                                 {% else %}
  873.                                                                     <th>Epaisseur de perçage</th>
  874.                                                                 {% endif %}
  875.                                                             {% endif %}
  876.                                                     
  877.                                                             {% if countPressureInBar > 0 %}<th>Pression de service en bar</th>{% endif %}
  878.                                                             {% if countDriftThickness > 0 %}<th>Epaisseur de dérivetage en mm</th>{% endif %}
  879.                                                             {% if countGougingThickness > 0 %}<th>Epaisseur de gougeage en mm</th>{% endif %}
  880.                                                             {% if countWeight > 0 %}<th>Poids en kg</th>{% endif %}
  881.                                                         </tr>
  882.                                         {% set sub = accessoire.subTitle  %}
  883.                                     {% endif %}
  884.                                     <tr>
  885.                                         {% if countName > 0 %} <td style="text-align:left"><a href="/produits/{{ accessoire.name }}">{{ accessoire.name }}</a></td> {% endif %}
  886.                                         <td style="text-align:left">{{ accessoire.gas }}</td>
  887.                                         {% if countCaliber > 0 %}<td style="text-align:left">{{ accessoire.caliber }}</td> {% endif %}
  888.                                         {% if countThickness > 0 %}<td style="text-align:left">{{ accessoire.thickness }}</td> {% endif %}
  889.                                         {% if countSpeed > 0 %}<td style="text-align:left">{{ accessoire.speed }}</td>{% endif %}
  890.                                         {% if countFlowPressure > 0 %}<td style="text-align:left">{{ accessoire.flowPressure }}</td>{% endif %}
  891.                                         {% if countMaximumPressure > 0 %}<td style="text-align:left">{{ accessoire.maximumPressure }}</td>{% endif %}
  892.                                         {% if countThread > 0 %}<td style="text-align:left">{{ accessoire.thread }}</td>{% endif %}
  893.                                         {% if countGraduation > 0 %}<td style="text-align:left">{{ accessoire.graduation }}</td> {% endif %}
  894.                                         {% if countInPort  > 0 %}<td style="text-align:left">{{ accessoire.inPort }}</td> {% endif %}
  895.                                         {% if countOutPort > 0 %}<td style="text-align:left">{{ accessoire.outPort }}</td> {% endif %}
  896.                                         {% if countAccessoryType > 0 %}<td style="text-align:left">{{ accessoire.accessoryType }}</td>{% endif %}
  897.                                         {% if countDrillingThickness > 0 %}<td style="text-align:left">{{ accessoire.drillingThickness }}</td>{% endif %}
  898.                                         {% if countPressureInBar > 0 %}<td style="text-align:left">{{ accessoire.pressureInBar }}</td>{% endif %}
  899.                                         {% if countDriftThickness > 0 %}<td style="text-align:left">{{ accessoire.driftThickness }}</td>{% endif %}
  900.                                         {% if countGougingThickness > 0 %}<td style="text-align:left">{{ accessoire.gougingThickness }}</td>{% endif %}
  901.                                         {% if countWeight > 0 %}<td style="text-align:left">{{ accessoire.weight }}</td>{% endif %}
  902.                                     </tr>
  903.                                 
  904.                                 {% set num = num +1  %}
  905.                             {% endfor %}
  906.                                             </table>
  907.                                             </td>
  908.                                             </tr>
  909.                                         </table>
  910.                             {% endif %}
  911.                     </div>
  912.                     {% endif %}
  913.                     {% set count = 0 %}
  914.                     {% set countDriftThickness = 0 %}
  915.                     {% set countGougingThickness = 0 %}
  916.                     {% for accessory in product.accessories %}
  917.                         {% if accessory.speed is not empty %}
  918.                             {% set count = count + 1 %}
  919.                         {% endif %}
  920.                         {% if accessory.driftThickness is not empty %}
  921.                             {% set countDriftThickness = countDriftThickness + 1 %}
  922.                         {% endif %}
  923.                         {% if accessory.gougingThickness is not empty %}
  924.                             {% set countGougingThickness = countGougingThickness + 1 %}
  925.                         {% endif %}
  926.                     {% endfor %}
  927.                     {% if count > 0 %}
  928.                     <div class="col-12 mb-12" style="margin-top:25px;">
  929.                         {% set filteredAccessories = product.accessories |filter(item => item.subtitle != "Annulaire") | filter(item => item.subtitle != "Multidards") | sort((a, b) => a.subtitle <=> b.subtitle) %}
  930.                         {% set firstAccessory = filteredAccessories|first %}
  931.                           
  932.                         {%  set num = 0  %}
  933.                         {%  set sub = "first"  %}
  934.                         {%  set nbCol = 3  %}
  935.                         {%  set firstProduct = filteredAccessories|first %}
  936.                         {% if product.graduation  %}
  937.                             {% if firstProduct.graduation is not empty %}
  938.                                 {%  set nbCol = nbCol +1  %} {% endif %}
  939.                         {% endif %}
  940.                         {% if product.inPort  %}
  941.                             {% if firstProduct.inPort is not empty %}
  942.                                 {%  set nbCol = nbCol +1  %} {% endif %}
  943.                         {% endif %}
  944.                         {% if product.outPort  %}
  945.                             {% if firstProduct.outPort is not empty %}
  946.                                 {%  set nbCol = nbCol +1  %} {% endif %}
  947.                         {% endif %}
  948.                         {% for accessoire in filteredAccessories %}
  949.                         {% if accessoire.subtitle != "" %}
  950.                         {% if sub != accessoire.subtitle %}
  951.                         {% set firstProduct = accessoire %}
  952.                         {% if sub != "first" %}
  953.                             </table>
  954.                             </td>
  955.                             </tr>
  956.                             </table>
  957.                         {% endif %}
  958.                         {% set count = 0 %}
  959.                         {% set countGas = 0 %}
  960.                         {% set countName = 0 %}
  961.                         {% set countCaliber = 0 %}
  962.                         {% set countThickness = 0 %}
  963.                         {% set countSpeed = 0 %}
  964.                         {% set countFlowPressure = 0 %}
  965.                         {% set countMaximumPressure = 0 %}
  966.                         {% set countThread = 0 %}
  967.                         {% set countGraduation = 0 %}
  968.                         {% set countInPort = 0 %}
  969.                         {% set countOutPort = 0 %}
  970.                         {% set countAccessoryType = 0 %}
  971.                         {% set countDrillingThickness = 0 %}
  972.                         {% set countPressureInBar = 0 %}
  973.                         {% set countDriftThickness = 0 %}
  974.                         {% set countGougingThickness = 0 %}
  975.                         {% set countSubSubType = 0 %}
  976.                         {% set filteredAccessoriesFor = product.accessories|filter(item => item.subtitle == accessoire.subtitle) %}
  977.                         {% for accessory in filteredAccessoriesFor %}
  978.                             {% if accessory.gas is not empty and (accessory.speed is empty or (accessory.speed is not empty and accessory.subTitle is empty)) %}
  979.                                 {% set count = count + 1 %}
  980.                             {% endif %}
  981.                             {% if accessory.gas is not empty %}
  982.                                 {% set countGas = countGas + 1 %}
  983.                             {% endif %}
  984.                             {% if accessory.name is not empty %}
  985.                                 {% set countName = countName + 1 %}
  986.                             {% endif %}
  987.                             {% if accessory.caliber is not empty %}
  988.                                 {% set countCaliber = countCaliber + 1 %}
  989.                             {% endif %}
  990.                             {% if accessory.thickness is not empty %}
  991.                                 {% set countThickness = countThickness + 1 %}
  992.                             {% endif %}
  993.                             {% if accessory.speed is not empty %}
  994.                                 {% set countSpeed = countSpeed + 1 %}
  995.                             {% endif %}
  996.                             {% if accessory.flowPressure is not empty and accessory.flowPressure != "-" %}
  997.                                 {% set countFlowPressure = countFlowPressure + 1 %}
  998.                             {% endif %}
  999.                             {% if accessory.maximumPressure is not empty %}
  1000.                                 {% set countMaximumPressure = countMaximumPressure + 1 %}
  1001.                             {% endif %}
  1002.                             {% if accessory.Thread is not empty %}
  1003.                                 {% set countThread = countThread + 1 %}
  1004.                             {% endif %}
  1005.                             {% if accessory.graduation is not empty %}
  1006.                                 {% set countGraduation = countGraduation + 1 %}
  1007.                             {% endif %}
  1008.                             {% if accessory.inPort is not empty %}
  1009.                                 {% set countInPort = countInPort + 1 %}
  1010.                             {% endif %}
  1011.                             {% if accessory.outPort is not empty %}
  1012.                                 {% set countOutPort = countOutPort + 1 %}
  1013.                             {% endif %}
  1014.                             {% if accessory.accessoryType is not empty %}
  1015.                                 {% set countAccessoryType = countAccessoryType + 1 %}
  1016.                             {% endif %}
  1017.                             {% if accessory.DrillingThickness is not empty %}
  1018.                                 {% set countDrillingThickness = countDrillingThickness + 1 %}
  1019.                             {% endif %}
  1020.                             {% if accessory.pressureInBar is not empty %}
  1021.                                 {% set countPressureInBar = countPressureInBar + 1 %}
  1022.                             {% endif %}
  1023.                             {% if accessory.driftThickness is not empty %}
  1024.                                 {% set countDriftThickness = countDriftThickness + 1 %}
  1025.                             {% endif %}
  1026.                             {% if accessory.gougingThickness is not empty %}
  1027.                                 {% set countGougingThickness = countGougingThickness + 1 %}
  1028.                             {% endif %}
  1029.                             {% if accessory.subSubType is not empty %}
  1030.                                 {% set countSubSubType = countSubSubType + 1 %}
  1031.                             {% endif %}
  1032.                         {% endfor %}
  1033.                         {% if previous_title != accessoire.title %}
  1034.                         <h2>
  1035.                             {{ accessoire.title }}
  1036.                         </h2>
  1037.                         {% endif %}
  1038.                         {%  set previous_title = accessoire.title %}
  1039.                         <table class="productTable" cellspacing="2px">
  1040.                             <tr class="responsiveImage">
  1041.                                 <td>
  1042.                                     {% if accessoire.images is not null %}
  1043.                                         {% set firstImage = accessoire.images|first %}
  1044.                                         {% if firstImage %}
  1045.                                             <img src="{{ asset('assets/uploads/products/mini/') ~ firstImage.name }}" class="d-block w-100" alt="{{ firstImage.name }}" style="transform: scale(0.5);">
  1046.                                         {% endif %}
  1047.                                     {% endif %}
  1048.                                 </td>
  1049.                             </tr>
  1050.                             <tr>
  1051.                                 <td class="notResponsiveImage">
  1052.                                     {% if accessoire.images is not null %}
  1053.                                         {% set firstImage = accessoire.images|first %}
  1054.                                         {% if firstImage %}
  1055.                                             <img src="{{ asset('assets/uploads/products/mini/') ~ firstImage.name }}" class="d-block w-100" alt="{{ firstImage.name }}" style="transform: scale(0.5);">
  1056.                                         {% endif %}
  1057.                                     {% endif %}
  1058.                                 </td>
  1059.                                 <td>
  1060.                                     <table class="productTable" cellspacing="2px">
  1061.                                         <tr style="font-weight:bold;padding-top: 25px;">
  1062.                                             <td colspan="{{ nbCol }}">
  1063.                                                 <p>{{accessoire.subtitle }} </p>
  1064.                                             </td>
  1065.                                         </tr>
  1066.                                         <tr style="font-weight:bold">
  1067.                                             {% if countGas > 0 %}<th>Gaz</th>{% endif %}
  1068.                                             {% if countName > 0 %}<th>Ref. 4</th>{% endif %}
  1069.                                             {% if countCaliber > 0 %}<th>Calibre</th>{% endif %}
  1070.                                             {% if countThickness > 0 %}<th>Epaisseur de coupe en mm</th>{% endif %}
  1071.                                             {% if countSpeed > 0 %}
  1072.                                                 {% if accessoire.subtitle == "Annulaire OX/Propane" %}
  1073.                                                     <th>Diamètre perçage</th>
  1074.                                                 {% else %}
  1075.                                                     <th>Débit l/h</th>
  1076.                                                 {% endif %}
  1077.                                             {% endif %}
  1078.                                             {% if countFlowPressure > 0 %}<th>Débit / pression </th>{% endif %}
  1079.                                             {% if countMaximumPressure > 0 %}<th>Pression maxi en bar</th>{% endif %}
  1080.                                             {% if countThread > 0 %}<th>Filetage</th>{% endif %}
  1081.                                             {% if countGraduation > 0 %}<th>Graduation</th>{% endif %}
  1082.                                             {% if countInPort > 0 %}<th>Entrée</th>{% endif %}
  1083.                                             {% if countOutPort > 0 %}<th>Sortie</th>{% endif %}
  1084.                                             {% if countAccessoryType > 0 %}<th>Type</th>{% endif %}
  1085.                                             {% if countDrillingThickness > 0 %}<th>Epaisseur de perçage</th>{% endif %}
  1086.                                             {% if countPressureInBar > 0 %}<th>Pression de service en bar</th>{% endif %}
  1087.                                             {% if countDriftThickness > 0 %}<th>Epaisseur de dérivetage en mm</th>{% endif %}
  1088.                                             {% if countGougingThickness > 0 %}<th>Epaisseur de gougeage en mm</th>{% endif %}
  1089.                                             {% if countSubSubType > 0 %}
  1090.                                                 {% for accessory in product.accessories %}
  1091.                                                     {% if accessory.speed is not empty %}
  1092.                                                         {% if accessory.subSubType is not empty %}<th>Sous-Type</th>{% endif %}
  1093.                                                     {% endif %}
  1094.                                                 {% endfor %}
  1095.                                             {% endif %}
  1096.                                         </tr>
  1097.                                         {%  set sub = accessoire.subtitle  %}
  1098.                                         {% endif %}
  1099.                                         <tr>
  1100.                                             {% if countGas > 0 %}<td style="text-align:left">{{ accessoire.gas }}</td>{% endif %}
  1101.                                             {% if countName > 0  %}<td style="text-align:left"><a href="/produits/{{ accessoire.name }}">{{ accessoire.name }}</a></td>{% endif %}
  1102.                                             {% if countCaliber > 0  %}<td style="text-align:left">{{ accessoire.caliber }}</td> {% endif %}
  1103.                                             {% if countThickness > 0  %}<td style="text-align:left">{{ accessoire.thickness }}</td> {% endif %}
  1104.                                             {% if countSpeed > 0  %}<td style="text-align:left">{{ accessoire.speed }}</td>{% endif %}
  1105.                                             {% if countFlowPressure > 0  %}<td style="text-align:left">{{ accessoire.flowPressure }}</td>{% endif %}
  1106.                                             {% if countMaximumPressure > 0  %}<td style="text-align:left">{{ accessoire.maximumPressure }}</td>{% endif %}
  1107.                                             {% if countThread > 0  %}<td style="text-align:left">{{ accessoire.thread }}</td>{% endif %}
  1108.                                             {% if countGraduation > 0  %}<td style="text-align:left">{{ accessoire.graduation }}</td>{% endif %}
  1109.                                             {% if countInPort > 0  %}<td style="text-align:left">{{ accessoire.inPort }}</td>{% endif %}
  1110.                                             {% if countOutPort > 0  %}<td style="text-align:left">{{ accessoire.outPort }}</td>{% endif %}
  1111.                                             {% if countAccessoryType > 0  %}<td style="text-align:left">{{ accessoire.accessoryType }}</td>{% endif %}
  1112.                                             {% if countDrillingThickness > 0  %}<td style="text-align:left">{{ accessoire.drillingThickness }}</td>{% endif %}
  1113.                                             {% if countPressureInBar > 0  %}<td style="text-align:left">{{ accessoire.pressureInBar }}</td>{% endif %}
  1114.                                             {% if countDriftThickness > 0 %}<td style="text-align:left">{{ accessoire.driftThickness }}</td>{% endif %}
  1115.                                             {% if countGougingThickness > 0 %}<td style="text-align:left">{{ accessoire.gougingThickness }}</td>{% endif %}
  1116.                                             {% if accessoire.subSubType is not empty %}<td style="text-align:left">{{ accessoire.subSubType }}</td>{% endif %}
  1117.                                         </tr>
  1118.                                         {% endif %}
  1119.                                         {% set num = num +1  %}
  1120.                                         {% endfor %}
  1121.                                     </table>
  1122.                                 </td>
  1123.                             </tr>
  1124.                         </table>
  1125.                     </div>
  1126.                 {% endif %}
  1127.             </div>
  1128.             {% endif %}
  1129.             <hr>
  1130.             <div class="12">
  1131.                 <p>{{ product.footer|raw }}</p>
  1132.             </div>
  1133.             </div>
  1134.             {% if app.user %}
  1135.             <div class="col-md-3">
  1136.                     <div class="user-box p-3 mb-4 border rounded shadow-sm bg-light">
  1137.                         <h5 class="mb-2">Utilisateur </h5>
  1138.                         <p><strong>Nom :</strong> {{ app.user.lastname }}</p>
  1139.                         <p><strong>Prénom :</strong> {{ app.user.firstname }}</p>
  1140.                         <a class="btn btn-outline-secondary btn-sm" href="{{ path('app_logout') }}">Me déconnecter</a>
  1141.                         {% if tarifs is not empty %}
  1142.                             <hr>
  1143.                             <h6>Tarifs produits :</h6>
  1144.                             <ul class="list-unstyled">
  1145.                                 {% for tarif in tarifs %}
  1146.                                     <li>
  1147.                                         {{ tarif.designation }} :
  1148.                                         {% if user.entreprise %}
  1149.                                             {% set prixRemise = user.entreprise.calculerTarifRemise(tarif) %}
  1150.                                             {% if prixRemise != tarif.prixVente %}
  1151.                                                 <span class="text-success">{{ prixRemise }} € après remise</span>
  1152.                                             {% endif %}
  1153.                                         {% endif %}
  1154.                                         {% if user.agence %}
  1155.                                             {% set prixRemise = user.agence.calculerTarifRemise(tarif) %}
  1156.                                             {% if prixRemise != tarif.prixVente %}
  1157.                                                 <span class="text-success">{{ prixRemise }} € après remise</span>
  1158.                                             {% endif %}
  1159.                                         {% endif %}
  1160.                                     </li>
  1161.                                 {% endfor %}
  1162.                             </ul>
  1163.                         {% endif %}
  1164.                     </div>
  1165.                 {% else %}
  1166.            
  1167.                     <div class="user-box p-3 border rounded shadow-sm bg-light">
  1168.                         <h5>Utilisateur non connecté</h5>
  1169.                         <p><a href="{{ path('app_login') }}" class="btn btn-outline-primary btn-sm">Se connecter</a></p>
  1170.                         <p>« Affichez vos prix remisé en accédant à votre espace client, pas encore d’espace
  1171.                             client? Faites en la demande en cliquant <a href="{{ path('app_register') }}">ICI</a> »</p>
  1172.                     </div>
  1173.                   
  1174.             </div>
  1175.             {% endif %}
  1176.         </section>
  1177.     </main>
  1178. {% endblock %}