templates/_parts/plannings/_plannings-list.html.twig line 1

Open in your IDE?
  1. <div class="plannings-list {{ viewType }}">
  2.     {# значения viewType смотри в _plannings.html.twig #}
  3.     {% if settings.realtyViewType == 10 %}
  4.         {% set size = 'plannings_layout_card' %}
  5.     {% else %}
  6.         {% set size = 'plannings_layout_list' %}
  7.     {% endif %}
  8.     <div class="plannings-list__top-wrap">
  9.         <div class="plannings-list__sort-text-wrap text__body text__grey03">
  10.             Сортировать:
  11.             <div class="plannings-list__sort-wrap">
  12.                 <div
  13.                         data-filter-fieldset="sort"
  14.                         data-filter-fieldset-type="{{ realtyFilter.getFieldSet("sort").type }}"
  15.                         data-filter-key="{{ realtyFilter.key }}">
  16.                 </div>
  17.             </div>
  18.         </div>
  19.         <div class="plannings-list__flats-found text__body text__main01" data-filter-key="{{ realtyFilter.key }}"
  20.              data-filter-result="TOTAL">
  21.             {{ realtyPager.getTotalItemCount() }}
  22.             планировок найдено
  23.         </div>
  24.     </div>
  25.     <div class="plannings-list__list-wrapper" id="flats" data-filter-key="{{ realtyFilter.key }}"
  26.          data-filter-result="CONTENT">
  27.         <ul
  28.                 class="plannings-list__list {% if settings.realtyViewType == 10 %} grid-block {% endif %}"
  29.                 data-pagination-data="{{ realtyPager.paginatorOptions.pageParameterName }}"
  30.         >
  31.             {% for layout in realtyPager.items %}
  32.                 <li class="plannings-list__item">
  33.                     <a href="{{ path('realty:layout_modal', {'id': layout.id}) }}"
  34.                        class="plannings-list__item-link"
  35.                        data-modal
  36.                        data-modal-theme="_layout-modal"
  37.                        data-goal-yandex-click="{{ settings().clickLayoutFormGoal }}"
  38.                        data-goal-vk-click="{{ settings().clickLayoutFormGoal }}"
  39.                     >
  40.                         <span class="plannings-list__item-top-wrap">
  41.                             <span class="plannings-list__image-wrap">
  42.                                 {% if layout is has_image('imageName') %}
  43.                                     {% include '_parts/image/adaptive-image.html.twig' with {
  44.                                         object: layout,
  45.                                         field: 'imageFile',
  46.                                         size: size,
  47.                                         alt: layout.fullName,
  48.                                         class: 'plannings-list__image',
  49.                                         classPicture: 'plannings-list__picture',
  50.                                     } %}
  51.                                 {% endif %}
  52.                             </span>
  53.                             <span class="plannings-list__layout-about-wrap">
  54.                                 <span class="plannings-list__layout-name h6 text__black-text">
  55.                                     {{ layout.name }}
  56.                                 </span>
  57.                                 <span class="plannings-list__layout-info-wrap">
  58.                                     <span class="plannings-list__info plannings-list__info_area">
  59.                                         <span class="plannings-list__info-name text__small text__grey03">
  60.                                             Площадь
  61.                                         </span>
  62.                                         <span class="plannings-list__info-value text__small text__black-text">
  63.                                             {{ layout.areaTotal }}
  64.                                         </span>
  65.                                     </span>
  66.                                     <span class="plannings-list__info">
  67.                                         <span class="plannings-list__info-name text__small text__grey03">
  68.                                             Этаж
  69.                                         </span>
  70.                                         <span class="plannings-list__info-value text__small text__black-text">
  71.                                             {{ layout.floorsVerbose }}
  72.                                         </span>
  73.                                     </span>
  74.                                     <span class="plannings-list__info">
  75.                                         <span class="plannings-list__info-name text__small text__grey03">
  76.                                             Отделка
  77.                                         </span>
  78.                                         {% set renovation = layout.renovationsVerbose %}
  79.                                         {% if renovation == 'без отделки' or layout.renovationsVerbose == 'Без отделки' %}
  80.                                             {% set renovation = "Под отделку" %}
  81.                                         {% endif %}
  82.                                         <span class="plannings-list__info-value text__small text__black-text">
  83.                                             {{ renovation }}
  84.                                         </span>
  85.                                     </span>
  86.                                 </span>
  87.                             </span>
  88.                         </span>
  89.                         <span class="plannings-list__layout-price-wrap">
  90.                             <span class="plannings-list__layout-price h5 text__black-text">
  91.                                 от {{ layout.price|price }}
  92.                             </span>
  93.                             <span class="plannings-list__layout-price-info text__small text__grey03">
  94.                                 или от {{ (layout.price/layout.areaTotal)|price }} за м²
  95.                             </span>
  96.                         </span>
  97.                         <a href="{{ path('global-fav:toggle', {id: layout.id}) }}"
  98.                            title="Избранное"
  99.                            class="plannings-list__favorites"
  100.                            data-global-fav-link
  101.                            data-fav-goal="{{ settings().favGoal }}"
  102.                            data-in-fav="{{ in_global_fav(layout) }}"
  103.                            data-loading="false"
  104.                         >
  105.                             {% include '_parts/icons/heart.svg' %}
  106.                         </a>
  107.                         {% set actionLinkColorsAsVars = layout.iconBg ? get_layout_action_color_as_vars(layout.iconBg) : [] %}
  108.                         <span class="plannings-list__actions-wrap" style="{% for key, color in actionLinkColorsAsVars %}{{ key }}:{{ color }};{% endfor %}">
  109.                             {% include '_parts/sber-action-link.html.twig' with {
  110.                                 class: 'plannings-list__sber-action-link sber-action-link_index'
  111.                             } %}
  112.                             {% include '_parts/sber-action-link.html.twig' with {
  113.                                 class: 'plannings-list__sber-action-link sber-action-link_index sber-action-link_layout',
  114.                                 actionLinkSettings: layout,
  115.                                 actionName: layout.actionName
  116.                             } %}
  117.                         </span>
  118.                     </a>
  119.                 </li>
  120.             {% endfor %}
  121.         </ul>
  122.         <div class="plannings-list__next-wrap">
  123.             {{ knp_pagination_render(realtyPager, '_parts/pagination-endless.html.twig') }}
  124.         </div>
  125.     </div>
  126. </div>