templates/ProfileList/profile.html.twig line 1

Open in your IDE?
  1. {% macro _get_min(price1, price2, currency) %}
  2.     {% set price1 = price1 is defined and price1 > 0 ? price1 : 999999999 %}
  3.     {% set price2 = price2 is defined and price2 > 0 ? price2 : 999999999 %}
  4.     {% if price1 == 999999999 and price2 == 999999999 %}
  5.         -
  6.     {% elseif price1 == 999999999 %}
  7.         {{price2}} {{ currency }}
  8.     {% elseif price2 == 999999999 %}
  9.         {{price1}} {{ currency }}
  10.     {% else %}
  11.         {{ min([price1,price2]) }} {{ currency }}
  12.     {% endif %}
  13. {% endmacro %}
  14. {%- macro _check_out_price(price1, price2, price3) -%}
  15.     {%- set maxPrice = 999999999 %}
  16.     {%- set price1 = price1 is defined and price1 > 0 ? price1 : maxPrice -%}
  17.     {%- set price2 = price2 is defined and price2 > 0 ? price2 : maxPrice -%}
  18.     {%- set price3 = price3 is defined and price3 > 0 ? price3 : maxPrice -%}
  19.     {%- if price1 != maxPrice or price2 != maxPrice or price3 != maxPrice -%}
  20.         1
  21.     {%- else -%}
  22.         0
  23.     {%- endif -%}
  24. {%- endmacro -%}
  25. {%- set servicesList = "Секс классический|Секс анальный|Секс групповой|Услуги семейной паре|Секс-игрушки|Минет в презервативе|Минет без резинки|Минет глубокий|Минет в машине|Куннилингус|Окончание на грудь|Окончание на лицо|Окончание в рот|Стриптиз профи|Стриптиз не профи|Массаж классический|Массаж профессиональный|Массаж расслабляющий|Массаж тайский|Массаж урологический|Массаж точечный|Массаж эротический|Массаж ветка сакуры|Страпон|Анилингус делаю|Золотой дождь выдача|Золотой дождь прием|Копро выдача|Фистинг анальный|Фистинг классический|Фистинг Вам|Фистинг мне|Госпожа|Игры|Легкая доминация|Порка|Рабыня|Фетиш|Трамплинг|Бондаж|Ролевые игры|Фото/видео съемка|Эскорт|GFE|Целуюсь" -%}
  26. {%- macro _gen_alt(profile, servicesList) -%}
  27.     {%- set isMainCity = profile.city.uriIdentity == default_city().uriIdentity -%}
  28.     {%- set service1 = servicesList|seo_morphing(profile.id + 12)|lower -%}
  29.     {%- set service2 = servicesList|seo_morphing(profile.id + 2)|lower -%}
  30.     {%- set commonAlt =  ', ' ~ service1 ~ ', ' ~ service2 ~ (profile.seo.phone is defined ? ", тел. " ~ profile.seo.phone : '') ~ ", анкета " ~ profile.id -%}
  31.     {%- if isMainCity -%}
  32.         {%- set firstStation = '' -%}
  33.         {%- if profile.stations|length > 0 -%}
  34.             {%- set firstStation = profile.stations|first -%}
  35.         {%- endif -%}
  36.         {{ 'Проститутка ' ~ profile.name|trans ~ (firstStation ? ', ' ~ firstStation.name : '' ) ~ commonAlt }}
  37.     {%- else -%}
  38.         {{ 'Проститутка ' ~ profile.name|trans ~ commonAlt }}
  39.     {%- endif -%}
  40. {%- endmacro -%}
  41. {% set top_profile = profile_top_placement() %}
  42. {% set isTopProfilesExist = top_profile is defined and null != top_profile and null != profiles %}
  43.     {%- set profile = profile.profile is defined ? profile.profile : profile -%}
  44.     {% set isSearchPage = form is defined %}
  45.     {% set isLazyLoad = loop.index < 3 %}
  46.     {% set isTopProfile = top_profile is defined and profile == top_profile %}
  47.     {%- set isSelfies = profile.selfies is iterable ? (profile.selfies|length > 0) : profile.selfies -%}
  48.     {%- set isVideos = profile.videos is iterable ? (profile.videos|length > 0) : profile.videos -%}
  49.     {%- set isComments = profile.comments is iterable ? (profile.comments|length > 0) : profile.comments -%}
  50.     {% set isFetchPriority = isFetchPriority is defined ? isFetchPriority : false %}
  51.     {# -------------------------- Если страница поиска -------------------------- #}
  52.     {% if isSearchPage %}
  53.         {% if form.station is defined and form.station.vars.value|length > 0 %}
  54.             {% for station in form.station.vars.value %}
  55.                 {% if stationFromForm is null%}
  56.                     {% set stationFromForm = profile.stations[station] is defined ? profile.stations[station] : null %}
  57.                 {% endif %}
  58.             {% endfor %}
  59.         {% endif %}
  60.         {% set listingStation = stationFromForm %}
  61.     {% else %}
  62.         {% set listingStation = app.request.attributes.get('station') %}
  63.     {% endif %}
  64.     {# у топа другие поля в объекте #}
  65.     {% set isProfileVip = false %}
  66.     {% set isProfileUltraVip = false %}
  67.     {% set isProfileTop = isTopProfilesExist and top_profile.uriIdentity == profile.uriIdentity %}
  68.     {% if not isProfileTop %}
  69.         {% set isProfileVip = profile.isVip is defined ? profile.isVip : profile.adBoardPlacement and profile.adBoardPlacement.type.isVip %}
  70.         {% set isProfileUltraVip = profile.isUltraVip is defined ? profile.isUltraVip : profile.adBoardPlacement and profile.adBoardPlacement.type.isUltraVip %}
  71.     {% endif %}
  72.     {% set labelHtml =
  73.         isProfileTop ? '<svg class="profile-list__element-label" xmlns="http://www.w3.org/2000/svg" width="35" height="57" fill="none" viewBox="0 0 35 57"><path fill="#fff" d="M0 40h35v17H0z"/><path fill="#fff" d="M23.31 10a11.3 11.3 0 0 1 8.3 3.6 12.3 12.3 0 0 1 0 16.97L17.5 45.35 3.4 30.57a12.3 12.3 0 0 1-.01-16.96 11.3 11.3 0 0 1 8.3-3.61c2.07 0 4.07.57 5.81 1.62A11.3 11.3 0 0 1 23.31 10"/><path fill="url(#a)" d="M26.62 13.7q1.58.7 2.81 1.97a9.3 9.3 0 0 1 0 12.83L27.9 30.1l-3.83-6.57 1.65-.95c.55-.3.74-1 .42-1.55a1.15 1.15 0 0 0-1.56-.41l-1.65.94-1.34-2.29a1.15 1.15 0 0 0-1.56-.42c-.55.32-.74 1.01-.42 1.56l5.82 10-.28-.01a4.4 4.4 0 0 0-2.5.72c-.42.26-.69.41-1.32.41-.62 0-.88-.16-1.3-.4H20a4.4 4.4 0 0 0-2.5-.73c-1.26 0-1.97.4-2.5.71v.01c-.43.26-.68.41-1.32.41s-.9-.15-1.32-.4a4.4 4.4 0 0 0-2.74-.73l5.82-10c.31-.54.13-1.23-.42-1.55a1.15 1.15 0 0 0-1.56.42l-1.34 2.3-1.65-.95a1.15 1.15 0 0 0-1.57.41c-.31.55-.12 1.24.42 1.55l1.66.95-3.85 6.6-1.57-1.64a9.3 9.3 0 0 1 0-12.82 8.3 8.3 0 0 1 11.94-.3 8.4 8.4 0 0 1 9.11-1.68"/><path fill="url(#b)" d="M9.57 32.69 17.5 41l7.93-8.31-.3-.01c-.64 0-.89.14-1.31.4l-.03.02c-.52.3-1.22.71-2.47.71a4.4 4.4 0 0 1-2.5-.73c-.42-.25-.69-.4-1.3-.4-.65 0-.9.14-1.32.4l-.02.01c-.52.3-1.23.72-2.5.72a4.4 4.4 0 0 1-2.49-.73c-.42-.26-.68-.4-1.31-.4z"/><path fill="url(#c)" d="M27.28 49.9h-2.5v-1.73h2.5q.54 0 .88-.18.35-.19.5-.5.17-.33.17-.74 0-.43-.17-.79-.15-.37-.5-.6a1.6 1.6 0 0 0-.88-.22h-1.7v8.22h-2.23v-9.95h3.93q1.19 0 2.03.43a3.1 3.1 0 0 1 1.77 2.9q0 .95-.46 1.67-.46.7-1.3 1.1t-2.04.4"/><path fill="url(#d)" d="M21.7 48.17v.44q0 1.14-.31 2.04-.3.9-.88 1.54-.57.63-1.36.98-.78.33-1.72.33-.96 0-1.74-.34a4 4 0 0 1-2.26-2.51 6 6 0 0 1-.31-2.04v-.44q0-1.14.31-2.04t.89-1.54 1.36-.97q.78-.35 1.73-.35t1.74.35 1.35.97.89 1.54.31 2.04m-2.24.44v-.46q0-.75-.14-1.34t-.4-.98a2 2 0 0 0-.64-.6 2 2 0 0 0-.87-.2q-.5 0-.88.2-.37.21-.64.6-.25.4-.39.98-.12.6-.13 1.34v.46q0 .75.13 1.34.15.58.4.99.26.4.64.6.38.21.89.21.48 0 .86-.2t.64-.61.39-.99q.14-.59.14-1.34"/><path fill="url(#e)" d="M9.19 43.41v9.95H6.97v-9.95zm3.03 0v1.73H4v-1.73z"/><defs><linearGradient id="a" x1="17.5" x2="17.5" y1="53.5" y2="13" gradientUnits="userSpaceOnUse"><stop stop-color="#f7901d"/><stop offset="1" stop-color="#ffa725"/></linearGradient><linearGradient id="b" x1="17.5" x2="17.5" y1="53.5" y2="13" gradientUnits="userSpaceOnUse"><stop stop-color="#f7901d"/><stop offset="1" stop-color="#ffa725"/></linearGradient><linearGradient id="c" x1="17.5" x2="17.5" y1="53.5" y2="13" gradientUnits="userSpaceOnUse"><stop stop-color="#f7901d"/><stop offset="1" stop-color="#ffa725"/></linearGradient><linearGradient id="d" x1="17.5" x2="17.5" y1="53.5" y2="13" gradientUnits="userSpaceOnUse"><stop stop-color="#f7901d"/><stop offset="1" stop-color="#ffa725"/></linearGradient><linearGradient id="e" x1="17.5" x2="17.5" y1="53.5" y2="13" gradientUnits="userSpaceOnUse"><stop stop-color="#f7901d"/><stop offset="1" stop-color="#ffa725"/></linearGradient></defs></svg>' : ''
  74.     %}
  75.     <div class="models-item-col{{ isProfileTop ? ' models-item-col-top' : '' }}"  data-profile data-id="{{ profile.id }}" data-profile-id="{{ profile.id }}">
  76.         <div class="models-item">
  77.             <div class="models-item__header d-flex align-items-center">
  78.                 <div class="models-item__header-title d-flex align-items-center mr-2">
  79.                     {% if ( profile.isApproved ) %}
  80.                         <svg class="icon mr-2">
  81.                             <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-verify"></use>
  82.                         </svg>
  83.                     {% endif %}
  84.                     <a href="{{ path('profile_preview.page', {'city': profile.city.uriIdentity, 'profile': profile.uriIdentity}) }}" target="_blank">
  85.                         {{ profile.name|trans }}
  86.                     </a>
  87.                 </div>
  88.                 {% if profile.isActive or not profile.isHidden %}
  89.                     {% set onlyPhoneNumber = profile.phoneNumber|replace({' ': '', '-': '', '(': '', ')': ''}) %}
  90.                     <button class="models-item__header-phone ml-auto" type="button" onclick="this.classList.add('d-none');this.nextElementSibling.classList.remove('d-none')">
  91.                         <svg xmlns="http://www.w3.org/2000/svg" width="16" height="17" fill="none"><g clip-path="url(#a)"><path fill="#F7901D" d="M12.39 9.16a.84.84 0 0 0-1.2 0l-1.34 1.35a6.3 6.3 0 0 1-2.52-1.35A6.3 6.3 0 0 1 6 6.65L7.33 5.3a.84.84 0 0 0 0-1.19L3.97.75a.84.84 0 0 0-1.2 0L.5 3.03c-.32.32-.5.76-.49 1.2.02 1.2.34 5.37 3.62 8.65a12.89 12.89 0 0 0 8.64 3.62h.03c.44 0 .86-.18 1.18-.5l2.28-2.28a.84.84 0 0 0 0-1.19L12.4 9.16Zm-.11 5.66c-1.05-.02-4.65-.3-7.47-3.13a11.15 11.15 0 0 1-3.13-7.47l1.7-1.69 2.17 2.18L4.46 5.8a.84.84 0 0 0-.23.77c.02.1.52 2.39 1.91 3.79 1.4 1.4 3.7 1.89 3.8 1.9a.83.83 0 0 0 .76-.22l1.1-1.09 2.17 2.18-1.7 1.69Z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 .5h16v16H0z"/></clipPath></defs></svg>
  92.                         <span class="btn-text button-click-first">Показать телефон</span>
  93.                     </button>
  94.                     <!--noindex--><a href="tel:{{ onlyPhoneNumber }}" rel="nofollow" class="models-item__header-phone ml-auto d-none">
  95.                         <svg xmlns="http://www.w3.org/2000/svg" width="16" height="17" fill="none"><g clip-path="url(#a)"><path fill="#F7901D" d="M12.39 9.16a.84.84 0 0 0-1.2 0l-1.34 1.35a6.3 6.3 0 0 1-2.52-1.35A6.3 6.3 0 0 1 6 6.65L7.33 5.3a.84.84 0 0 0 0-1.19L3.97.75a.84.84 0 0 0-1.2 0L.5 3.03c-.32.32-.5.76-.49 1.2.02 1.2.34 5.37 3.62 8.65a12.89 12.89 0 0 0 8.64 3.62h.03c.44 0 .86-.18 1.18-.5l2.28-2.28a.84.84 0 0 0 0-1.19L12.4 9.16Zm-.11 5.66c-1.05-.02-4.65-.3-7.47-3.13a11.15 11.15 0 0 1-3.13-7.47l1.7-1.69 2.17 2.18L4.46 5.8a.84.84 0 0 0-.23.77c.02.1.52 2.39 1.91 3.79 1.4 1.4 3.7 1.89 3.8 1.9a.83.83 0 0 0 .76-.22l1.1-1.09 2.17 2.18-1.7 1.69Z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 .5h16v16H0z"/></clipPath></defs></svg>
  96.                         <span class="btn-text button-click-second">{{- profile.phoneNumber -}}</span>
  97.                     </a><!--/noindex-->
  98.                 {% else %}
  99.                 {% endif %}
  100.             </div>
  101.             <div class="models-item__content d-flex">
  102.                 <a href="{{ path('profile_preview.page', {'city': profile.city.uriIdentity, 'profile': profile.uriIdentity}) }}" class="models-item__images d-block" target="_blank">
  103.                     {% set photo = profile|avatar %}
  104.                     {% if photo %}
  105.                         <img data-src="{{ responsive_asset(photo.path, 'profile_media', "200x280", "jpg") }}"
  106.                         class="lazy img-fluid"
  107.                         alt="{{- _self._gen_alt(profile, servicesList) -}}">
  108.                     {% endif %}
  109.                     {% if isTopProfile %}
  110.                         <div class="status-line">
  111.                             <div class="status-line__info d-flex align-items-center">
  112.                                 <div class="status-line__icons d-flex align-items-center justify-content-center mr-2">
  113.                                     <img src="{{ asset('assets/images/icons/icon-status-top.svg','basicConfig') }}">
  114.                                 </div>
  115.                             </div>
  116.                         </div>
  117.                     {% elseif profile.isUltraVip or profile.isVip %}
  118.                         <div class="status-line">
  119.                             {% if profile.isUltraVip %}
  120.                                 <div class="status-line__info d-flex align-items-center">
  121.                                     <div class="status-line__icons d-flex align-items-center justify-content-center mr-2">
  122.                                         <img src="{{ asset('assets/images/icons/icon-status-gold.svg','basicConfig') }}">
  123.                                     </div>
  124.                                 </div>
  125.                             {% elseif profile.isVip %}
  126.                                 <div class="status-line__info d-flex align-items-center">
  127.                                     <div class="status-line__icons d-flex align-items-center justify-content-center mr-2">
  128.                                         <img src="{{ asset('assets/images/icons/icon-status-silver.svg') }}">
  129.                                     </div>
  130.                                 </div>
  131.                             {% endif %}
  132.                         </div>
  133.                     {% endif %}
  134.                 </a>
  135.                 <div class="models-item__info flex-fill">
  136.                     {%- set station = false -%}
  137.                     {%- if 'profile_list.list_by_station' in app.request.get('_route') -%}
  138.                         {%- set station = app.request.attributes.get('station') -%}
  139.                     {%- elseif profile.stations|length > 0 -%}
  140.                         {%- set station = profile.stations|first -%}
  141.                     {%- endif -%}
  142.                     {% if profile.city.uriIdentity == default_city().uriIdentity and station %}
  143.                         <div class="item-info metro d-flex align-items-center">
  144.                             <svg class="icon mr-1">
  145.                                 <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-metro"></use>
  146.                             </svg>
  147.                             <a href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}" target="_blank" title="{{ station.name }}">
  148.                                 {# {%- include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} -%} #}
  149.                                 {{- station.name -}}
  150.                             </a>
  151.                         </div>
  152.                     {% endif %}
  153.                     <div class="item-info">
  154.                         <p class="d-flex align-items-center m-0">
  155.                             Возраст:<span class="d-inline-block ml-auto">{{ profile.personParameters.age ? profile.personParameters.age : '-' }}</span>
  156.                         </p>
  157.                         <p class="d-flex align-items-center m-0">
  158.                             Рост:<span class="d-inline-block ml-auto">{{ profile.personParameters.height ? profile.personParameters.height : '-' }}</span>
  159.                         </p>
  160.                         <p class="d-flex align-items-center m-0">
  161.                             Вес:<span class="d-inline-block ml-auto">{{ profile.personParameters.weight ? profile.personParameters.weight : '-' }}</span>
  162.                         </p>
  163.                         <p class="d-flex align-items-center m-0">
  164.                             Грудь:<span class="d-inline-block ml-auto">{{ profile.personParameters.breastSize ? profile.personParameters.breastSize : '-' }}</span>
  165.                         </p>
  166.                     </div>
  167.                     {%- set currencyProfile -%}{{ profile.city.countryCode|country_currency }}{%- endset -%}
  168.                     {%- set minPriceHour -%}{{ _self._get_min(profile.apartmentsPricing.oneHourPrice,profile.takeOutPricing.oneHourPrice,currencyProfile) }}{%- endset -%}
  169.                     {%- set minPriceTwo -%}{{ _self._get_min(profile.apartmentsPricing.twoHoursPrice,profile.takeOutPricing.twoHoursPrice,currencyProfile) }}{%- endset -%}
  170.                     {%- set minPriceNight -%}{{ _self._get_min(profile.apartmentsPricing.nightPrice,profile.takeOutPricing.nightPrice,currencyProfile) }}{%- endset -%}
  171.                     {%- set hasOutPrice -%}{{- _self._check_out_price(profile.takeOutPricing.oneHourPrice,profile.takeOutPricing.twoHoursPrice,profile.takeOutPricing.nightPrice) -}}{%- endset -%}
  172.                     <div class="item-info">
  173.                         <p class="d-flex align-items-center m-0">
  174.                             Час:<span class="d-inline-block ml-auto description">{{ minPriceHour != '-' ? minPriceHour : '-' }}</span>
  175.                         </p>
  176.                         <p class="d-flex align-items-center m-0">
  177.                             2 часа:<span class="d-inline-block ml-auto description">{{ minPriceTwo != '-' ? minPriceTwo : '-' }}</span>
  178.                         </p>
  179.                         <p class="d-flex align-items-center m-0">
  180.                             Ночь:<span class="d-inline-block ml-auto description">{{ minPriceNight != '-' ? minPriceNight : '-' }}</span>
  181.                         </p>
  182.                         <p class="d-flex align-items-center m-0">
  183.                             Выезд:<span class="d-inline-block ml-auto">{{ hasOutPrice == '1' ? 'Есть' : '-' }}</span>
  184.                         </p>
  185.                     </div>
  186.                     <div class="item-status d-flex align-items-center justify-content-center">
  187.                         {% if isComments %}
  188.                             <div class="status-item d-flex align-items-center active" data-toggle="tooltip" data-placement="top" title="Есть комментарии">
  189.                                 <svg class="icon">
  190.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-comments-thumb"></use>
  191.                                 </svg>
  192.                             </div>
  193.                         {% else %}
  194.                             <div class="status-item d-flex align-items-center">
  195.                                 <svg class="icon">
  196.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-comments-thumb"></use>
  197.                                 </svg>
  198.                             </div>
  199.                         {% endif %}
  200.                         {% if isSelfies %}
  201.                             <div class="status-item d-flex align-items-center active" data-toggle="tooltip" data-placement="top" title="Есть селфи">
  202.                                 <svg class="icon">
  203.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-selfie-thumb"></use>
  204.                                 </svg>
  205.                             </div>
  206.                         {% else %}
  207.                             <div class="status-item d-flex align-items-center">
  208.                                 <svg class="icon">
  209.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-selfie-thumb"></use>
  210.                                 </svg>
  211.                             </div>
  212.                         {% endif %}
  213.                         {% if isVideos %}
  214.                             <div class="status-item d-flex align-items-center active" data-toggle="tooltip" data-placement="top" title="Есть видео">
  215.                                 <svg class="icon">
  216.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-video-thumb"></use>
  217.                                 </svg>
  218.                             </div>
  219.                         {% else %}
  220.                             <div class="status-item d-flex align-items-center">
  221.                                 <svg class="icon">
  222.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-video-thumb"></use>
  223.                                 </svg>
  224.                             </div>
  225.                         {% endif %}
  226.                     </div>
  227.                 </div>
  228.             </div>
  229.         </div>
  230.     </div>