templates/front/offer/offer_preview/includes/content/content_item.twig line 1

Open in your IDE?
  1. {% if menuKey == 3 %}
  2.     {% for offerItemKey, viewItems in attribute(offer.offerItemsCategory, menuKey)[loop.index] %}
  3.         {% if offerItemKey == 'bObligatory'%}
  4.             {% if viewItems %}
  5.                 <h3 class="mt-4"><b>{{ 'USER_ZONE.OFFER.OBLIGATORY'|trans }}</b></h3>
  6.             {% endif %}
  7.         {% endif %}
  8.         {% if offerItemKey == 'cWelcome'%}
  9.             {% if viewItems %}
  10.                 <h3 class="mt-4"><b>{{ 'USER_ZONE.OFFER.WELCOME'|trans }}</b></h3>
  11.             {% endif %}
  12.         {% endif %}
  13.         {% for itemViewType, offerItem in viewItems %}
  14.             {% if itemViewType == 0 %}
  15.                 <div class="col-lg-12">
  16.                     {% include 'front/offer/offer_preview/includes/content/view_type/type_button/type_button.twig' with {
  17.                         offerItems: offerItem,
  18.                         offerItemKey: offerItemKey
  19.                     } %}
  20.                 </div>
  21.             {% endif %}
  22.             {% if itemViewType == 1 %}
  23.                 <div class="row">
  24.                     {% include 'front/offer/offer_preview/includes/content/view_type/type_vertical_list/type_vertical_list.twig' with {
  25.                         offerItems: offerItem,
  26.                         offerItemKey: offerItemKey
  27.                     } %}
  28.                 </div>
  29.             {% endif %}
  30.             {% if itemViewType == 2 %}
  31.                 <div class="col-lg-12">
  32.                     {% include 'front/offer/offer_preview/includes/content/view_type/type_text.twig' with {
  33.                         offerItem,
  34.                         offerItemKey: offerItemKey
  35.                     } %}
  36.                 </div>
  37.             {% endif %}
  38.             {% if itemViewType == 3 %}
  39.                 <div class="row">
  40.                     {% include 'front/offer/offer_preview/includes/content/view_type/type_horizontal_list/type_horizontal_list.twig' with {
  41.                         offerItems: offerItem,
  42.                         offerItemKey: offerItemKey
  43.                     } %}
  44.                 </div>
  45.             {% endif %}
  46.         {% endfor %}
  47.     {% endfor %}
  48. {% else %}
  49.     {% for offerItemKey, viewItems in attribute(offer.offerItemsCategory, menuKey) %}
  50.         {% if offerItemKey == 'bObligatory'%}
  51.             {% if viewItems %}
  52.                 <h3 class="mt-4"><b>{{ 'USER_ZONE.OFFER.OBLIGATORY'|trans }}</b></h3>
  53.             {% endif %}
  54.         {% endif %}
  55.         {% if offerItemKey == 'cWelcome'%}
  56.             {% if viewItems %}
  57.                 <h3 class="mt-4"><b>{{ 'USER_ZONE.OFFER.WELCOME'|trans }}</b></h3>
  58.             {% endif %}
  59.         {% endif %}
  60.         {% for itemViewType, offerItem in viewItems %}
  61.             {% if itemViewType == 0 %}
  62.                 <div class="col-lg-12">
  63.                     {% include 'front/offer/offer_preview/includes/content/view_type/type_button/type_button.twig' with {
  64.                         offerItems: offerItem,
  65.                         offerItemKey: offerItemKey
  66.                     } %}
  67.                 </div>
  68.             {% endif %}
  69.             {% if itemViewType == 1 %}
  70.                 <div class="row">
  71.                     {% include 'front/offer/offer_preview/includes/content/view_type/type_vertical_list/type_vertical_list.twig' with {
  72.                         offerItems: offerItem,
  73.                         offerItemKey: offerItemKey
  74.                     } %}
  75.                 </div>
  76.             {% endif %}
  77.             {% if itemViewType == 2 %}
  78.                 <div class="col-lg-12">
  79.                     {% include 'front/offer/offer_preview/includes/content/view_type/type_text.twig' with {
  80.                         offerItem,
  81.                         offerItemKey: offerItemKey
  82.                     } %}
  83.                 </div>
  84.             {% endif %}
  85.             {% if itemViewType == 3 %}
  86.                 <div class="row">
  87.                     {% include 'front/offer/offer_preview/includes/content/view_type/type_horizontal_list/type_horizontal_list.twig' with {
  88.                         offerItems: offerItem,
  89.                         offerItemKey: offerItemKey
  90.                     } %}
  91.                 </div>
  92.             {% endif %}
  93.         {% endfor %}
  94.     {% endfor %}
  95. {% endif %}