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="recommended with-profile">
  4.     <h2 class="border-line">Другие индивидуалки поблизости</h2>
  5.     <div class="recommended-list d-flex" id="profileNearestContainer">
  6.         {% for profile in nearest_profiles %}
  7.             <div class="recommended-item" data-profile-id="{{ profile.id }}">
  8.                 <div class="recommended-profile">
  9.                     <a class="d-block recommended-link" href="{{ path('profile_preview.page', {city: profile.city.uriIdentity, profile: profile.uriIdentity}) }}" target="_blank">
  10.                         <p class="recommended-heading">
  11.                             {% if profile.approved %}
  12.                                 <svg class="icon">
  13.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-verify-new"></use>
  14.                                 </svg>
  15.                             {% endif %}
  16.                             <span class="recommended-name"><span class="name">{{ profile.name|trans }}</span>, <span class="age">{{ profile.personParameters.age ? profile.personParameters.age : '-' }}</span></span>
  17.                         </p>
  18.                         <div class="recommended-avatar">
  19.                         {% set photo = profile|avatar %}
  20.                             {% if photo %}
  21.                                 {% set alt = profile.name|trans ~ ', ' ~ (profile.seo.phone is defined ? "снять по тел. " ~ profile.seo.phone ~ ', ' : '') ~ 'анкета №' ~ profile.id %}
  22.                                 <img data-src="{{ responsive_asset(photo.path, 'profile_media', "357x500", "jpg") }}"
  23.                                     class="recommended-avatar-img lazy"
  24.                                     alt="{{ profile.name|trans }}"
  25.                                     loading="lazy"
  26.                                     width="200" height="280">
  27.                             {% endif %}
  28.                         </div>
  29.                     </a>
  30.                     {% set onlyPhoneNumber = profile.phoneNumber|replace({' ': '', '-': '', '(': '', ')': ''}) %}
  31.                     <div class="d-flex align-items-center recommended-info">
  32.                         <div class="recommended-phone phone">{{- profile.phoneNumber -}}</div>
  33.                         <div class="ml-auto recommended-price price">{{ price_helpers.getProfileMinPrice(profile, 'р') }}</div>
  34.                     </div>
  35.                     {% if profile.stations|length > 0 %}
  36.                     {%- set station = profile.stations|first -%}
  37.                     <div class="d-flex align-items-center recommended-metro">
  38.                         <div class="metro-item d-flex">
  39.                             <a class="modal-list__icons d-flex" href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}">
  40.                                 {%- include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} -%}
  41.                                 {{- station.name -}}
  42.                             </a>
  43.                         </div>
  44.                     </div>
  45.                     {% endif %}
  46.                 </div>
  47.             </div>
  48.         {% endfor %}
  49.     </div>
  50. </div>
  51. {# <script>
  52.     document.addEventListener('DOMContentLoaded', function() {
  53.         const profileIdList = [];
  54.         {% for profile in nearest_profiles %}
  55.             profileIdList.push({{ profile.id }});
  56.         {% endfor %}
  57.         window.increase_shows({profiles: profileIdList});
  58.     });
  59. </script> #}
  60. </noindex>