src/WebBundle/Resources/views/Left/_left_menu_lite.html.twig line 1

Open in your IDE?
  1. {# lite menu выпадающий список чекбоксов #}
  2. {#<div class="lite-filt-menu {{ userLocale() }}-class">#}
  3.     {% for filter_key, filter_option in filters %}
  4.         {% if filter_option.alias == 'left_menu_use' %}
  5.             {% set filter_alias = 'left_menu_universal' | trans %}
  6.         {% else %}
  7.             {% set filter_alias = filter_option.alias | trans %}
  8.         {% endif %}
  9.         {% set isExpressSample = filter_key == 'expressSample' %}
  10.         {# для фильтра "Назначение" ставлю стандартную подпись (такую как в расширенном поиске) если выбрано ПОЛ || СТЕНЫ #}
  11.         {% if (filter_key == 'getTypeUsings') and filter_option.selected %}
  12.             {% set filter_alias =  filter_option.alias | trans %}
  13.         {% endif %}
  14.         <div
  15.             class="dropdown short-list-filter js-short-list-filter"{# data-group="{{ filter_key }}"#}
  16.             data-get-filters="{{ filter_key }}"
  17.             data-gtm-name="{{ filter_option.name }}"
  18.             {# для фильтра "Назначение" добавляю варианты подписей в зависимости от выбранных опций #}
  19.             {% if filter_key == 'getTypeUsings' %}
  20.                 data-advanced-search-alias="{{ filter_option.alias | trans }}"
  21.                 data-left-menu-alias="{{ 'left_menu_universal' | trans }}"
  22.             {% endif %}
  23.             {% if isExpressSample %}id="express-samples"{% endif %}
  24.         >
  25.             <button
  26.                 class="dropdown-toggle"
  27.                 type="button"
  28.                 id="dropdownBtn-{{ loop.index }}"
  29.                 data-toggle="dropdown"
  30.                 aria-haspopup="true"
  31.                 aria-expanded="false"
  32.             >
  33.                 <span
  34.                     id="showDropdown-{{ loop.index }}"
  35.                     class="help-tooltip check-txt{% if filter_option.selected %} checked{% endif %}"
  36.                     data-filter-alias="{{ filter_alias}}"
  37.                 >
  38.                     {{ filter_alias}}
  39.                 </span>
  40.                 <i class="caret"></i>
  41.             </button>
  42.             <div class="dropdown-menu js-list-option {% if filter_key == 'getFacturas' %}facturas{% endif %}" aria-labelledby="dropdownBtn-{{ loop.index }}">
  43.                 <div class="inner-dropdown filter-list-lite">
  44.                     {% if isExpressSample != true %}
  45.                         <div class="dropdown-list-wrapper">
  46.                     {% endif %}
  47.                         {# поставить пункт Wall&Floor на первое место в списке #}
  48.                         {% if filter_key == 'getTypeUsings' %}
  49.                             {% for option in filter_option.list %}
  50.                                 {% set id = option.oldId is defined ? option.oldId : option.id %}
  51.                                 {% if id == 4 %}
  52.                                     <div class="dropdown-list-item">
  53.                                         <label
  54.                                             data-id="0"
  55.                                             data-name-input="check-all"
  56.                                             data-filter-type="{{ filter_option.type }}"
  57.                                             class="left-checkbox js-left-checkbox all-filtres{% if not filter_option.selected %} active{% endif %} withToolTip"
  58.                                             data-name-filter="{{ option.name }}"
  59.                                         >
  60.                                             <span class="name"> {{ option.name }} </span>
  61.                                             {# Отключил подсказку по просьбе https://te.remote.team/#/discus/E255A40D-3614-DAAF-4C7C-B51BF6328951/ #}
  62.                                             {# <span
  63.                                                 class="material-icons question-mark tooltip_trigger"
  64.                                                 data-title="{{ 'filters.tips.wallAndFloor' | trans }}"
  65.                                                 data-tooltip-type="{% if is_mobile() and not is_tablet() %}help-tooltip{% else %}help-tooltip-right{% endif %}"
  66.                                             >
  67.                                                 &#xE8FD;
  68.                                             </span> #}
  69.                                             <span class="option-count">{{ option.count }}</span>
  70.                                             <i class="is-check"></i>
  71.                                             <i class="no-check"></i>
  72.                                         </label>
  73.                                     </div>
  74.                                 {% endif %}
  75.                             {% endfor %}
  76.                         {% endif %}
  77.                         {% set filters_length = 0 %}
  78.                         {% for option in filter_option.list %}
  79.                             {% set alias = option.leftMenu is defined ? option.leftMenu : option.alias %}
  80.                             {% set id = option.oldId is defined ? option.oldId : option.id %}
  81.                             {% set name = option.name %}
  82.                             {% set filters_length = loop.index %}
  83.                             {% set hasSubgroup = option.sub | length %}
  84.                             {% if option.alias != 'left_menu_universal' %}
  85.                                 <div {% if hasSubgroup %}data-get-filters="getFacturas"{% endif %} class="dropdown-list-item{{ option.important ? ' important-filter' : '' }}{% if hasSubgroup %} sub-group{% endif %}">
  86.                                     <label
  87.                                         data-id="{{id}}"
  88.                                         data-name-input="{{ filter_key }}{{id }}"
  89.                                         data-filter-type="{{filter_option.type}}"
  90.                                         class="js-left-checkbox left-checkbox {{ filter_key | lower }}{{ id }}{% if option.selected %} active{% endif %}{% if isExpressSample %} withToolTip{% endif %}{% if hasSubgroup %} sub{% endif %}"
  91.                                         data-name-filter="{{ name }}"
  92.                                         {% if hasSubgroup %}
  93.                                             data-numofsuboptions="{{ option.sub | length }}"
  94.                                         {% endif %}
  95.                                     >
  96.                                         {% if isExpressSample %}
  97.                                             <i class="quick-sample-i-mob">{% include '@Web/SVGIconsCode/quick_sample_mobile.html.twig' %}</i>
  98.                                         {% endif %}
  99.                                         {# tooltip для десктоп экспресс образца #}
  100.                                         {% if isExpressSample and filter_option.tooltip is defined and filter_option.tooltip %}
  101.                                             <div class="ui-tooltip light">
  102.                                                 <div class="ui-tooltip-content" onclick="event.stopPropagation()">
  103.                                                     {{ filter_option.tooltip.text | raw }}
  104.                                                 </div>
  105.                                                 <div class="arrow top"></div>
  106.                                             </div>
  107.                                         {% endif %}
  108.                                         {% if filter_option.alias == 'articleQuickSample'%}
  109.                                             <span class="name name_bold">
  110.                                                 {{ name }} <span class="name_time">24-48h</span>
  111.                                             </span>
  112.                                         {% else %}
  113.                                             <span class="name">
  114.                                                 {{ name }}
  115.                                                 {% if filter_option.alias == 'left_menu_price' %}
  116.                                                     {% set currency = '' | currency %}
  117.                                                     {% if currency | strPos('8381') != false %}
  118.                                                         <span class="filters-ruble-symbol">
  119.                                                             {% include '@Web/SVGIconsCode/rus-currency.html.twig' %}
  120.                                                         </span>{% else %}{{ currency | raw }}
  121.                                                     {% endif %}/{{ userMeasure() }}&sup2;
  122.                                                 {% endif %}
  123.                                             </span>
  124.                                         {% endif %}
  125.                                         {# tooltip для мобильного экспресс образца #}
  126.                                         {% if isExpressSample and filter_option.tooltip is defined and filter_option.tooltip %}
  127.                                             <span
  128.                                                 class="material-icons question-mark tooltip_trigger"
  129.                                                 data-title="{{ filter_option.tooltip.text }}"
  130.                                             >
  131.                                                 
  132.                                                 <span class="js-sub-title-content hidden">
  133.                                                     {{ filter_option.tooltip.text | raw }}
  134.                                                 </span>
  135.                                             </span>
  136.                                         {% endif %}
  137.                                         <span class="option-count">{{ option.count }}</span>
  138.                                         {% if hasSubgroup %}
  139.                                             {# стрелочка #}
  140.                                             <b class="caret"></b>
  141.                                             {# область для разворачивания подгруппы - хак #}
  142.                                             <div class="expande-sub-trigger"></div>
  143.                                         {% endif %}
  144.                                         {% if isExpressSample %}
  145.                                             <i class="quick-sample-i">
  146.                                                 {% include '@Web/SVGIconsCode/quick_sample.html.twig' %}
  147.                                                 {% include '@Web/SVGIconsCode/quick_sample_active.html.twig' %}
  148.                                             </i>
  149.                                         {% endif %}
  150.                                         <i class="is-check"></i>
  151.                                         <i class="no-check"></i>
  152.                                     </label>
  153.                                     {# элементы подгруппы #}
  154.                                     {% if hasSubgroup %}
  155.                                         <div class="sub-items">
  156.                                             {% for subgroup in option.sub %}
  157.                                                 {% set id = subgroup.oldId is defined ? subgroup.oldId : subgroup.id %}
  158.                                                 {% set name = subgroup.name %}
  159.                                                 {% set subName = 'getFacturas' %}
  160.                                                 {% set subOptionSelected = subgroup.selected | length %}
  161.                                                 <div class="sub-item dropdown-list-item{{ subgroup.important ? ' important-filter' : '' }}">
  162.                                                     <label
  163.                                                         data-id="{{id}}"
  164.                                                         data-name-input="{{ subName }}{{ id }}"
  165.                                                         class="js-left-checkbox left-checkbox sub {{ subName | lower }}{{ id }} {% if subOptionSelected %} active{% endif %}"
  166.                                                         data-name-filter="{{ name }}"
  167.                                                     >
  168.                                                         <span class="name">{{ name }}</span>
  169.                                                         <span class="option-count">{{ subgroup.count }}</span>
  170.                                                         <i class="is-check"></i>
  171.                                                         <i class="no-check"></i>
  172.                                                     </label>
  173.                                                 </div>
  174.                                             {% endfor %}
  175.                                         </div>
  176.                                     {% endif %}
  177.                                 </div>
  178.                             {% endif %}
  179.                         {% endfor %}
  180.                     {% if isExpressSample != true %}
  181.                         </div>
  182.                     {% endif %}
  183.                 </div>
  184.             </div>
  185.         </div>
  186.     {% endfor %}
  187.     {# расширенный поиск #}
  188.     <div class="title">
  189.         <button id="advanced_search" class="go-filt-page" data-url="{{ path('app_filters_advanced_search') }}">
  190.             <span>{{ 'left_advanced_search' | trans }}</span>
  191.         </button>
  192.     </div>
  193.     <span
  194.         class="clr-filt js-clear-filter hidden-xs js-help-tooltip{% if showReset %} show-btn-clear{% endif %}"
  195.            title="{{ 'clear' | trans }}"
  196.            data-url-catalog="{{ path('app_catalog') }}"
  197.     >
  198.         {{ 'left_advanced_reset' | trans }}
  199.     </span>
  200.     {#<span id="test-tag"></span>#}
  201.     {#{% include '@Web/Common/search-sphinx.html.twig' with { 'inputID': 'SearchOfSphinxInputLite', 'hiddenClass': 'hidden-xs' } %}#}
  202.     <span class="sphinx-button js-sphinx-button material-icons">&#xE8B6;</span>
  203. {#</div>#}