templates/ProfilePreview/nearest_profiles.html.twig line 1

Open in your IDE?
  1. {% import '_macros/price_helpers.html.twig' as price_helpers %}
  2. <noindex>
  3. <div class="nearest-widget recommended-widget">
  4.     <h2 class="border-line">Индивидуалки поблизости</h2>
  5.     <div class="recommended-container">
  6.         <div class="recommended-list {{ classname is defined and classname ? classname : '' }}" id="profileNearestContainer">
  7.             {% for profile in nearest_profiles %}
  8.                 <div class="profiles-item-row" data-profile-id="{{ profile.id }}">>
  9.                     <div class="profiles-item">
  10.                         <div class="profiles-item__content d-flex">
  11.                             <a href="{{ path('profile_preview.page', {city: profile.city.uriIdentity, profile: profile.uriIdentity}) }}" class="profiles-item__images d-block" target="_blank">
  12.                                 {% set photo = profile|avatar %}
  13.                                 {% if photo %}
  14.                                     {% set alt = profile.name|trans ~ ', ' ~ (profile.seo.phone is defined ? "снять по тел. " ~ profile.seo.phone ~ ', ' : '') ~ 'анкета №' ~ profile.id %}
  15.                                     <img data-src="{{ responsive_asset(photo.path, 'profile_media', "200x280", "jpg") }}"
  16.                                         class="lazy img-fluid"
  17.                                         alt="{{ alt }}"
  18.                                         loading="lazy"
  19.                                         width="200" height="280">
  20.                                 {% endif %}
  21.                             </a>
  22.                             <div class="profiles-item__info flex-fill">
  23.                                 <div class="profiles-item__header">
  24.                                     <div class="profiles-item__header-title d-flex align-items-center">
  25.                                         <a href="{{ path('profile_preview.page', {city: profile.city.uriIdentity, profile: profile.uriIdentity}) }}" target="_blank">{{ profile.name|trans }}</a>
  26.                                     </div>
  27.                                     {% if profile.isActive or not profile.hidden %}
  28.                                         {% set onlyPhoneNumber = profile.phoneNumber|replace({' ': '', '-': '', '(': '', ')': ''}) %}
  29.                                         <button class="profiles-item__header-phone ml-auto" type="button" onclick="this.classList.add('d-none');this.nextElementSibling.classList.remove('d-none')">
  30.                                             <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none"><path fill="#F27900" d="m15.7 12.53-3.64-3.32a.9.9 0 0 0-1.25.04l-2.15 2.21a5.16 5.16 0 0 1-2.63-1.49 5.13 5.13 0 0 1-1.5-2.63L6.76 5.2a.9.9 0 0 0 .03-1.25L3.47.3A.9.9 0 0 0 2.22.22L.27 1.89a.9.9 0 0 0-.26.58c-.02.23-.27 5.54 3.85 9.67a13.6 13.6 0 0 0 9.67 3.85.9.9 0 0 0 .58-.26l1.67-1.95a.9.9 0 0 0-.07-1.25Z"/></svg>
  31.                                             <span>Показать телефон</span>
  32.                                         </button>
  33.                                         <!--noindex--><a href="tel:{{ onlyPhoneNumber }}" rel="nofollow" class="profiles-item__header-phone ml-auto d-none">
  34.                                             <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none"><path fill="#F27900" d="m15.7 12.53-3.64-3.32a.9.9 0 0 0-1.25.04l-2.15 2.21a5.16 5.16 0 0 1-2.63-1.49 5.13 5.13 0 0 1-1.5-2.63L6.76 5.2a.9.9 0 0 0 .03-1.25L3.47.3A.9.9 0 0 0 2.22.22L.27 1.89a.9.9 0 0 0-.26.58c-.02.23-.27 5.54 3.85 9.67a13.6 13.6 0 0 0 9.67 3.85.9.9 0 0 0 .58-.26l1.67-1.95a.9.9 0 0 0-.07-1.25Z"/></svg>
  35.                                             <span>{{- profile.phoneNumber -}}</span>
  36.                                         </a><!--/noindex-->
  37.                                     {% endif %}
  38.                                 </div>
  39.                                 {%- set station = profile.stations ? profile.stations|first : null -%}
  40.                                 {# profile.stations ? profile.stations|first :  #}
  41.                                 {%- if station -%}
  42.                                 <div class="item-info metro d-flex align-items-center">
  43.                                     <svg class="icon mr-1">
  44.                                         <use xlink:href="#icon-metro"></use>
  45.                                     </svg>
  46.                                     <a href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}" target="_blank" title="{{ station.name }}">
  47.                                         {{- station.name -}}
  48.                                     </a>
  49.                                 </div>
  50.                                 {%- endif -%}
  51.                                 <div class="item-info">
  52.                                     <p class="d-flex align-items-center mb-1">
  53.                                         Возраст:<span class="d-inline-block ml-auto">{{ profile.personParameters.age ? profile.personParameters.age : '-' }}</span>
  54.                                     </p>
  55.                                     <p class="d-flex align-items-center mb-1">
  56.                                         Рост:<span class="d-inline-block ml-auto">{{ profile.personParameters.height ? profile.personParameters.height : '-' }}</span>
  57.                                     </p>
  58.                                     <p class="d-flex align-items-center mb-1">
  59.                                         Вес:<span class="d-inline-block ml-auto">{{ profile.personParameters.weight ? profile.personParameters.weight : '-' }}</span>
  60.                                     </p>
  61.                                     <p class="d-flex align-items-center mb-1">
  62.                                         Грудь:<span class="d-inline-block ml-auto">{{ profile.personParameters.breastSize ? profile.personParameters.breastSize : '-' }}</span>
  63.                                     </p>
  64.                                 </div>
  65.                                 {%- set currencyProfile -%}{{ profile.city.countryCode|country_currency }}{%- endset -%}
  66.                                 {%- set minPriceHour -%}{{ price_helpers._get_min(profile.apartmentsPricing.oneHourPrice,profile.takeOutPricing.oneHourPrice,currencyProfile) }}{%- endset -%}
  67.                                 {%- set minPriceTwo -%}{{ price_helpers._get_min(profile.apartmentsPricing.twoHoursPrice,profile.takeOutPricing.twoHoursPrice,currencyProfile) }}{%- endset -%}
  68.                                 {%- set minPriceNight -%}{{ price_helpers._get_min(profile.apartmentsPricing.nightPrice,profile.takeOutPricing.nightPrice,currencyProfile) }}{%- endset -%}
  69.                                 {%- set hasOutPrice -%}{{- price_helpers._check_out_price(profile.takeOutPricing.oneHourPrice,profile.takeOutPricing.twoHoursPrice,profile.takeOutPricing.nightPrice) -}}{%- endset -%}
  70.                                 <div class="item-info">
  71.                                     <p class="d-flex align-items-center mb-1">
  72.                                         Час:<span class="d-inline-block ml-auto description">{{ minPriceHour != '-' ? minPriceHour : '-' }}</span>
  73.                                     </p>
  74.                                     <p class="d-flex align-items-center mb-1">
  75.                                         2 часа:<span class="d-inline-block ml-auto description">{{ minPriceTwo != '-' ? minPriceTwo : '-' }}</span>
  76.                                     </p>
  77.                                     <p class="d-flex align-items-center mb-1">
  78.                                         Ночь:<span class="d-inline-block ml-auto description">{{ minPriceNight != '-' ? minPriceNight : '-' }}</span>
  79.                                     </p>
  80.                                     <p class="d-flex align-items-center mb-1">
  81.                                         Экспресс:<span class="d-inline-block ml-auto description">{{ hasOutPrice == '1' ? 'Есть' : '-' }}</span>
  82.                                     </p>
  83.                                 </div>
  84.                             </div>
  85.                             <div class="profiles-item__status">
  86.                                 {% if profile.selfies|length > 0 %}
  87.                                     <div class="status-item d-flex align-items-center justify-content-center" data-toggle="tooltip" data-placement="top" title="Есть селфи">
  88.                                         <svg class="icon">
  89.                                             <use xlink:href="#icon-selfie-thumb"></use>
  90.                                         </svg>
  91.                                     </div>
  92.                                 {% endif %}
  93.                                 {% if profile.videos|length > 0 %}
  94.                                     <div class="status-item d-flex align-items-center justify-content-center" data-toggle="tooltip" data-placement="top" title="Есть видео">
  95.                                         <svg class="icon">
  96.                                             <use xlink:href="#icon-video-thumb"></use>
  97.                                         </svg>
  98.                                     </div>
  99.                                 {% endif %}
  100.                                 {% if profile.comments|length > 0 %}
  101.                                     <div class="status-item d-flex align-items-center justify-content-center" data-toggle="tooltip" data-placement="top" title="Есть комментарии">
  102.                                         <svg class="icon">
  103.                                             <use xlink:href="#icon-comments-thumb"></use>
  104.                                         </svg>
  105.                                     </div>
  106.                                 {% endif %}
  107.                             </div>
  108.                         </div>
  109.                     </div>
  110.                 </div>
  111.             {% endfor %}
  112.         </div>
  113.     </div>
  114. </div>
  115. <script>
  116.     document.addEventListener('DOMContentLoaded', function() {
  117.         const profileIdList = [];
  118.         {% for profile in nearest_profiles %}
  119.             profileIdList.push({{ profile.id }});
  120.         {% endfor %}
  121.         window.increase_shows({profiles: profileIdList});
  122.     });
  123. </script>
  124. </noindex>