custom/plugins/GrimmTheme/src/Resources/views/storefront/component/chemicals/warnings.html.twig line 1

Open in your IDE?
  1. {% block warnings %}
  2.     {% if product and product.sortedProperties %}
  3.         {% set display = false %}
  4.         {% for property in product.sortedProperties %}
  5.             {% if
  6.                 property.id == "c2cd5e01fefd49b18c0e63827a260770"
  7.                 or
  8.                 property.id == "0cf7c91af462470e946be782eb29c6e5"
  9.                 or
  10.                 property.id == "72a2fa3509a34e2abb2a50b35a6d9545" %}
  11.                 {% set display = true %}
  12.             {% endif %}
  13.         {% endfor %}
  14.         {% if display %}
  15.             <div class="extra-chemicals">
  16.                 <h5>{{ "chemicals.caption"|trans|raw }}</h5>
  17.                 {% if icons %}
  18.                 {% for property in product.sortedProperties %}
  19.                     {% if property.id == "c2cd5e01fefd49b18c0e63827a260770" %}
  20.                         {% if property.options and property.options.elements %}
  21.                             <div class="ghs-codes">
  22.                                 {% for element in property.options.elements %}
  23.                                     <div class="ghs-code">
  24.                                         {% sw_include "@Storefront/storefront/utilities/icon.html.twig" with { 'name': element.name, 'pack': 'grimmtheme', 'namespace': 'GrimmTheme', 'size': 'xxl'} %}
  25.                                     </div>
  26.                                 {% endfor %}
  27.                             </div>
  28.                         {% endif %}
  29.                     {% endif %}
  30.                 {% endfor %}
  31.                 {% endif %}
  32.                 {% if hazard %}
  33.                 {% for property in product.sortedProperties %}
  34.                     {% if property.id == "0cf7c91af462470e946be782eb29c6e5" %}
  35.                         {% if property.options and property.options.elements %}
  36.                             <div class="chemical-warnings">
  37.                                 <h5>{{ "chemicals.hazard-codes"|trans|raw }}</h5>
  38.                                 {% for element in property.options.elements %}
  39.                                     <div class="chemical-warning">
  40.                                 <span class="chemical-warning-hazard-code">
  41.                                     <span class="hazard-code-translated"><span class="hazard-code">{{ element.name }}</span> - {{ ('chemicals.codes.' ~ element.name)|trans|raw }}</span>
  42.                                 </span>
  43.                                     </div>
  44.                                 {% endfor %}
  45.                             </div>
  46.                         {% endif %}
  47.                     {% endif %}
  48.                 {% endfor %}
  49.                 {% endif %}
  50.                 {% if warnings %}
  51.                 {% for property in product.sortedProperties %}
  52.                     {% if property.id == "72a2fa3509a34e2abb2a50b35a6d9545" %}
  53.                         {% if property.options and property.options.elements %}
  54.                             <div class="p-sentences">
  55.                                 <h5>{{ "chemicals.p-sentence"|trans|raw }}</h5>
  56.                                 {% for element in property.options.elements %}
  57.                                     <div class="p-sentence">
  58.                                         {% set parts = element.name|split('+') %}
  59.                                         {% for part in parts %}
  60.                                             {{ ('chemicals.psentence.' ~ part)|trans|raw }}
  61.                                         {% endfor %}
  62.                                     </div>
  63.                                 {% endfor %}
  64.                             </div>
  65.                         {% endif %}
  66.                     {% endif %}
  67.                 {% endfor %}
  68.                 {% endif %}
  69.             </div>
  70.         {% endif %}
  71.     {% endif %}
  72. {% endblock %}