templates/ProfileList/list.profiles.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 profiles_array = (profiles is iterable) ? ((profiles.array is defined) ? profiles.array : profiles) : [] %}
  42. {% if top_profile is defined and null != top_profile %}
  43.     {% set profiles_array = [top_profile]|merge(profiles_array) %}
  44. {% endif %}
  45. {% for profile in profiles_array %}
  46.     {% set isLazyLoad = loop.index < 3 %}
  47.     {% set isTopProfile = top_profile is defined and profile == top_profile %}
  48.     {%- set isSelfies = profile.selfies is iterable ? (profile.selfies|length > 0) : profile.selfies -%}
  49.     {%- set isVideos = profile.videos is iterable ? (profile.videos|length > 0) : profile.videos -%}
  50.     {%- set isComments = profile.comments is iterable ? (profile.comments|length > 0) : profile.comments -%}
  51.     <div class="models-item-col"  data-profile data-id="{{ profile.id }}" data-profile-id="{{ profile.id }}">
  52.         <div class="models-item">
  53.             <div class="models-item__header d-flex align-items-center">
  54.                 <div class="models-item__header-title d-flex align-items-center mr-2">
  55.                     {% if ( profile.isApproved ) %}
  56.                         <svg class="icon mr-2">
  57.                             <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-verify"></use>
  58.                         </svg>
  59.                     {% endif %}
  60.                     <a href="{{ path('profile_preview.page', {'city': profile.city.uriIdentity, 'profile': profile.uriIdentity}) }}" target="_blank">
  61.                         {{ profile.name|trans }}
  62.                     </a>
  63.                 </div>
  64.                 {# {% if profile.isActive or not profile.isHidden %}
  65.                     {% set onlyPhoneNumber = profile.phoneNumber|replace({' ': '', '-': '', '(': '', ')': ''}) %}
  66.                     <button class="models-item__header-phone ml-auto" type="button" onclick="this.classList.add('d-none');this.nextElementSibling.classList.remove('d-none')">
  67.                         <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>
  68.                         <span class="btn-text">Показать телефон</span>
  69.                     </button>
  70.                     <!--noindex--><a href="tel:{{ onlyPhoneNumber }}" rel="nofollow" class="models-item__header-phone ml-auto d-none">
  71.                         <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>
  72.                         <span class="btn-text">{{- profile.phoneNumber -}}</span>
  73.                     </a><!--/noindex-->
  74.                 {% else %}
  75.                 {% endif %} #}
  76.             </div>
  77.             <div class="models-item__content d-flex">
  78.                 <a href="{{ path('profile_preview.page', {'city': profile.city.uriIdentity, 'profile': profile.uriIdentity}) }}" class="models-item__images d-block" target="_blank">
  79.                     {% set photo = profile|avatar %}
  80.                     {% if photo %}
  81.                         <img data-src="{{ responsive_asset(photo.path, 'profile_media', "200x280", "jpg") }}"
  82.                         class="lazy img-fluid"
  83.                         alt="{{- _self._gen_alt(profile, servicesList) -}}">
  84.                     {% endif %}
  85.                     {% if profile.isUltraVip or profile.isVip %}
  86.                         <div class="status-line">
  87.                             {% if profile.isUltraVip %}
  88.                                 <div class="status-line__info d-flex align-items-center">
  89.                                     <div class="status-line__icons d-flex align-items-center justify-content-center mr-2">
  90.                                         <img src="{{ asset('assets/images/icons/icon-status-gold.svg','basicConfig') }}">
  91.                                     </div>
  92.                                 </div>
  93.                             {% elseif profile.isVip %}
  94.                                 <div class="status-line__info d-flex align-items-center">
  95.                                     <div class="status-line__icons d-flex align-items-center justify-content-center mr-2">
  96.                                         <img src="{{ asset('assets/images/icons/icon-status-silver.svg') }}">
  97.                                     </div>
  98.                                 </div>
  99.                             {% endif %}
  100.                         </div>
  101.                     {% endif %}
  102.                 </a>
  103.                 <div class="models-item__info flex-fill">
  104.                     {%- set station = false -%}
  105.                     {%- if 'profile_list.list_by_station' in app.request.get('_route') -%}
  106.                         {%- set station = app.request.attributes.get('station') -%}
  107.                     {%- elseif profile.stations|length > 0 -%}
  108.                         {%- set station = profile.stations|first -%}
  109.                     {%- endif -%}
  110.                     {% if profile.city.uriIdentity == default_city().uriIdentity and station %}
  111.                         <div class="item-info metro d-flex align-items-center">
  112.                             <svg class="icon mr-1">
  113.                                 <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-metro"></use>
  114.                             </svg>
  115.                             <a href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}" target="_blank" title="{{ station.name }}">
  116.                                 {%- include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} -%}
  117.                                 {{- station.name -}}
  118.                             </a>
  119.                         </div>
  120.                     {% endif %}
  121.                     <div class="item-info">
  122.                         <p class="d-flex align-items-center m-0">
  123.                             Возраст:<span class="d-inline-block ml-auto">{{ profile.personParameters.age ? profile.personParameters.age : '-' }}</span>
  124.                         </p>
  125.                         <p class="d-flex align-items-center m-0">
  126.                             Рост:<span class="d-inline-block ml-auto">{{ profile.personParameters.height ? profile.personParameters.height : '-' }}</span>
  127.                         </p>
  128.                         <p class="d-flex align-items-center m-0">
  129.                             Вес:<span class="d-inline-block ml-auto">{{ profile.personParameters.weight ? profile.personParameters.weight : '-' }}</span>
  130.                         </p>
  131.                         <p class="d-flex align-items-center m-0">
  132.                             Грудь:<span class="d-inline-block ml-auto">{{ profile.personParameters.breastSize ? profile.personParameters.breastSize : '-' }}</span>
  133.                         </p>
  134.                     </div>
  135.                     {%- set currencyProfile -%}{{ profile.city.countryCode|country_currency }}{%- endset -%}
  136.                     {%- set minPriceHour -%}{{ _self._get_min(profile.apartmentsPricing.oneHourPrice,profile.takeOutPricing.oneHourPrice,currencyProfile) }}{%- endset -%}
  137.                     {%- set minPriceTwo -%}{{ _self._get_min(profile.apartmentsPricing.twoHoursPrice,profile.takeOutPricing.twoHoursPrice,currencyProfile) }}{%- endset -%}
  138.                     {%- set minPriceNight -%}{{ _self._get_min(profile.apartmentsPricing.nightPrice,profile.takeOutPricing.nightPrice,currencyProfile) }}{%- endset -%}
  139.                     {%- set hasOutPrice -%}{{- _self._check_out_price(profile.takeOutPricing.oneHourPrice,profile.takeOutPricing.twoHoursPrice,profile.takeOutPricing.nightPrice) -}}{%- endset -%}
  140.                     <div class="item-info">
  141.                         <p class="d-flex align-items-center m-0">
  142.                             Час:<span class="d-inline-block ml-auto description">{{ minPriceHour != '-' ? minPriceHour : '-' }}</span>
  143.                         </p>
  144.                         <p class="d-flex align-items-center m-0">
  145.                             2 часа:<span class="d-inline-block ml-auto description">{{ minPriceTwo != '-' ? minPriceTwo : '-' }}</span>
  146.                         </p>
  147.                         <p class="d-flex align-items-center m-0">
  148.                             Ночь:<span class="d-inline-block ml-auto description">{{ minPriceNight != '-' ? minPriceNight : '-' }}</span>
  149.                         </p>
  150.                         <p class="d-flex align-items-center m-0">
  151.                             Выезд:<span class="d-inline-block ml-auto">{{ hasOutPrice == '1' ? 'Есть' : '-' }}</span>
  152.                         </p>
  153.                     </div>
  154.                     <div class="item-status d-flex align-items-center justify-content-center">
  155.                         {% if isComments %}
  156.                             <div class="status-item d-flex align-items-center active" data-toggle="tooltip" data-placement="top" title="Есть комментарии">
  157.                                 <svg class="icon">
  158.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-comments-thumb"></use>
  159.                                 </svg>
  160.                             </div>
  161.                         {% else %}
  162.                             <div class="status-item d-flex align-items-center">
  163.                                 <svg class="icon">
  164.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-comments-thumb"></use>
  165.                                 </svg>
  166.                             </div>
  167.                         {% endif %}
  168.                         {% if isSelfies %}
  169.                             <div class="status-item d-flex align-items-center active" data-toggle="tooltip" data-placement="top" title="Есть селфи">
  170.                                 <svg class="icon">
  171.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-selfie-thumb"></use>
  172.                                 </svg>
  173.                             </div>
  174.                         {% else %}
  175.                             <div class="status-item d-flex align-items-center">
  176.                                 <svg class="icon">
  177.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-selfie-thumb"></use>
  178.                                 </svg>
  179.                             </div>
  180.                         {% endif %}
  181.                         {% if isVideos %}
  182.                             <div class="status-item d-flex align-items-center active" data-toggle="tooltip" data-placement="top" title="Есть видео">
  183.                                 <svg class="icon">
  184.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-video-thumb"></use>
  185.                                 </svg>
  186.                             </div>
  187.                         {% else %}
  188.                             <div class="status-item d-flex align-items-center">
  189.                                 <svg class="icon">
  190.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-video-thumb"></use>
  191.                                 </svg>
  192.                             </div>
  193.                         {% endif %}
  194.                     </div>
  195.                 </div>
  196.             </div>
  197.         </div>
  198.     </div>
  199. {% endfor %}
  200. {% if show_pagination is defined %}
  201.     <div class="filtered_profiles_pagination">
  202.         {{ porpaginas_render(profiles) }}
  203.     </div>
  204. {% endif %}
  205. {%- if app.request.method == 'GET' and app.request.isXmlHttpRequest() -%}
  206.     {{- porpaginas_render(profiles) -}}
  207. {% endif %}