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. {%- macro _gen_alt(profile, stationOutput, fakeStation, station) -%}
  26.     {%- set services = "Секс классический|Секс анальный|Секс групповой|Секс лесбийский|Услуги семейной паре|Секс-игрушки|Минет в презервативе|Минет без резинки|Минет глубокий|Минет в машине|Куннилингус|Окончание на грудь|Окончание на лицо|Окончание в рот|Стриптиз профи|Стриптиз не профи|Лесби откровенное|Лесби-шоу легкое|Массаж классический|Массаж профессиональный|Массаж расслабляющий|Массаж тайский|Массаж урологический|Массаж точечный|Массаж эротический|Массаж ветка сакуры|Страпон|Анилингус делаю|Золотой дождь выдача|Золотой дождь прием|Копро выдача|Фистинг анальный|Фистинг классический|Фистинг Вам|Фистинг мне|Госпожа|Игры|Легкая доминация|Порка|Рабыня|Фетиш|Трамплинг|Бондаж|Ролевые игры|Фото/видео съемка|Эскорт|GFE|Целуюсь" -%}
  27.     {%- set randomService1 = services|seo_morphing(profile.id)|lower -%}
  28.     {%- set randomService2 = services|seo_morphing(profile.id + 752)|lower -%}
  29.     {%- set _station = fakeStation ? station.name ~ ", " : (stationOutput ? stationOutput.name ~ ", " : '') -%}
  30.     {{- profile.name ~ ' (' ~ profile.personParameters.age ~ '), ' ~ (_station) ~ randomService1 ~ ", " ~ randomService2 ~ (profile.seo.phone is defined ? ", тел. " ~ profile.seo.phone : '') -}}
  31. {%- endmacro -%}
  32. {% set fakeStation = fakeStationList is defined and fakeStationList and station is defined and station.uriIdentity %}
  33. {% set isStationPage = isStationPage is defined ? isStationPage : false %}
  34. {%- for profile in profiles -%}
  35.     {%- set profile = profile.profile is defined ? profile.profile : profile %}
  36.     {% set isSearchPage = form is defined %}
  37.     {% set stationFromForm = null %}
  38.     {# -------------------------- Если страница поиска -------------------------- #}
  39.     {% if isSearchPage %}
  40.         {% if form.station is defined and form.station.vars.value|length > 0 %}
  41.             {% for station in form.station.vars.value %}
  42.                 {% if stationFromForm is null%}
  43.                     {% set stationFromForm = profile.stations[station] is defined ? profile.stations[station] : null %}
  44.                 {% endif %}
  45.             {% endfor %}
  46.         {% endif %}
  47.         {% set listingStation = stationFromForm %}
  48.     {% else %}
  49.         {% set listingStation = app.request.attributes.get('station') %}
  50.     {% endif %}
  51.     {% set haveStationInList = listingStation %}
  52.     {% set stationOutput = '' %}
  53.     {% set stationReallyExist = false %}
  54.     {# Проверяем что станция которую мы открыли есть в профиле анкеты #}
  55.     {% if haveStationInList and profile.stations|length > 0 %}
  56.         {% for station in profile.stations %}
  57.             {% if station.uriIdentity == listingStation.uriIdentity %}
  58.                 {% set stationReallyExist = true %}
  59.         {% endif %}
  60.         {% endfor %}
  61.     {% endif %}
  62.     {% if haveStationInList and stationReallyExist %}
  63.         {# Если это список станций - выводим эту станцию сразу #}
  64.         {% set stationOutput = listingStation %}
  65.     {% else %}
  66.         {# Если это обычный список - выводим станции из профиля #}
  67.         {% set stationOutput = profile.stations|first %}
  68.     {% endif -%}
  69.     <div class="models-item-col" data-profile-id="{{ profile.id }}">
  70.         <div class="models-item rounding">
  71.             <a class="models-item-link" data-profile data-id="{{profile.id}}" href="{{ path('profile_preview.page', {'city': profile.city.uriIdentity, 'profile': profile.uriIdentity}) }}" target="_blank">
  72.                 <div class="models-item__header d-flex align-items-center justify-content-between">
  73.                     <div class="models-item__header-title mr-2 d-flex align-items-center">
  74.                         <span>{{ profile.name|trans }}</span>
  75.                         {%- if ( profile.isApproved ) -%}
  76.                             <div class="ml-2" data-toggle="tooltip" data-theme="verify" data-tippy-content="Фото проверено">
  77.                                 <svg class="icon">
  78.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-verify-new"></use>
  79.                                 </svg>
  80.                             </div>
  81.                         {%- endif -%}
  82.                     </div>
  83.                     <div class="item-status d-flex align-items-center justify-content-center">
  84.                         {%- if profile.comments is iterable ? (profile.comments|length > 0) : profile.comments -%}
  85.                             <div class="item-status__el d-flex align-items-center active" data-toggle="tooltip" data-placement="top" data-tippy-content="Есть комментарии" data-theme="basic">
  86.                                 <svg class="icon">
  87.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-comments-thumb"></use>
  88.                                 </svg>
  89.                             </div>
  90.                         {%- else -%}
  91.                             <div class="item-status__el d-flex align-items-center">
  92.                                 <svg class="icon">
  93.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-comments-thumb"></use>
  94.                                 </svg>
  95.                             </div>
  96.                         {%- endif -%}
  97.                         {%- if profile.selfies is iterable ? (profile.selfies|length > 0) : profile.selfies -%}
  98.                             <div class="item-status__el d-flex align-items-center active" data-toggle="tooltip" data-placement="top" data-tippy-content="Есть селфи" data-theme="basic">
  99.                                 <svg class="icon">
  100.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-selfie-thumb"></use>
  101.                                 </svg>
  102.                             </div>
  103.                         {%- else -%}
  104.                             <div class="item-status__el d-flex align-items-center">
  105.                                 <svg class="icon">
  106.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-selfie-thumb"></use>
  107.                                 </svg>
  108.                             </div>
  109.                         {%- endif -%}
  110.                         {%- if profile.videos is iterable ? (profile.videos|length > 0) : profile.videos -%}
  111.                             <div class="item-status__el d-flex align-items-center active" data-toggle="tooltip" data-placement="top" data-tippy-content="Есть видео" data-theme="basic">
  112.                                 <svg class="icon">
  113.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-video-thumb"></use>
  114.                                 </svg>
  115.                             </div>
  116.                         {%- else -%}
  117.                             <div class="item-status__el d-flex align-items-center">
  118.                                 <svg class="icon">
  119.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-video-thumb"></use>
  120.                                 </svg>
  121.                             </div>
  122.                         {%- endif -%}
  123.                     </div>
  124.                 </div>
  125.                 <div class="models-item__content d-flex">
  126.                     <div class="models-item__images d-block rounding">
  127.                         {%- set photo = profile|avatar -%}
  128.                         {%- if photo -%}
  129.                             {%- set firstStation = profile.stations|first -%}
  130.                             <img {{ loop.index == 1 ? '' : 'data-' }}src="{{ responsive_asset(photo.path, 'profile_media', "200x280", "jpg") }}" class="models-item__img lazy img-fluid rounding"
  131.                                 {%- if listingStation and not fakeStation -%}
  132.                                     alt="{{ profile.name|trans }} ({{ profile.personParameters.age }}){% if firstStation and firstStation is not null %}, {{ firstStation.name|trans }}{%- endif -%}"
  133.                                 {%- else -%}
  134.                                     alt="{{- _self._gen_alt(profile, stationOutput, fakeStation, station ?? false) -}}"
  135.                                 {%- endif -%}
  136.                                 width="200" height="280">
  137.                         {%- endif -%}
  138.                         {%- if profile.isActive -%}
  139.                             {%- if profile.isVip -%}
  140.                                 <div class="status-line">
  141.                                     <svg class="status-line__icon">
  142.                                         <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#status-gold-new"></use>
  143.                                     </svg>
  144.                                 </div>
  145.                             {%- elseif profile.isStandard -%}
  146.                                 <div class="status-line">
  147.                                     <svg class="status-line__icon">
  148.                                         <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#status-silver-new"></use>
  149.                                     </svg>
  150.                                 </div>
  151.                             {%- endif -%}
  152.                         {%- endif -%}
  153.                     </div>
  154.                     <div class="models-item__info d-flex flex-fill">
  155.                         <div class="models-item__info-link">
  156.                             <dl class="item-info">
  157.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  158.                                     <dt class="item-info__key">Возраст</dt>
  159.                                     <dd class="item-info__value">{{- profile.personParameters.age ? profile.personParameters.age : '-' -}}</dd>
  160.                                 </div>
  161.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  162.                                     <dt class="item-info__key">Рост</dt>
  163.                                     <dd class="item-info__value">{{- profile.personParameters.height ? profile.personParameters.height : '-' -}}</dd>
  164.                                 </div>
  165.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  166.                                     <dt class="item-info__key">Вес</dt>
  167.                                     <dd class="item-info__value">{{- profile.personParameters.weight ? profile.personParameters.weight : '-' -}}</dd>
  168.                                 </div>
  169.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  170.                                     <dt class="item-info__key">Грудь</dt>
  171.                                     <dd class="item-info__value">{{- profile.personParameters.breastSize ? profile.personParameters.breastSize : '-' -}}</dd>
  172.                                 </div>
  173.                             </dl>
  174.                             {%- set currencyProfile -%}{{ profile.city.countryCode|country_currency }}{%- endset -%}
  175.                             {%- set minPriceHour -%}{{ _self._get_min(profile.apartmentsPricing.oneHourPrice,profile.takeOutPricing.oneHourPrice,currencyProfile) }}{%- endset -%}
  176.                             {%- set minPriceTwo -%}{{ _self._get_min(profile.apartmentsPricing.twoHoursPrice,profile.takeOutPricing.twoHoursPrice,currencyProfile) }}{%- endset -%}
  177.                             {%- set minPriceNight -%}{{ _self._get_min(profile.apartmentsPricing.nightPrice,profile.takeOutPricing.nightPrice,currencyProfile) }}{%- endset -%}
  178.                             {%- set hasOutPrice -%}{{- _self._check_out_price(profile.takeOutPricing.oneHourPrice,profile.takeOutPricing.twoHoursPrice,profile.takeOutPricing.nightPrice) -}}{%- endset -%}
  179.                             <dl class="item-info">
  180.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  181.                                     <dt class="item-info__key">Час</dt>
  182.                                     <dd class="item-info__value">{{- minPriceHour != '-' ? minPriceHour : '-' -}}</dd>
  183.                                 </div>
  184.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  185.                                     <dt class="item-info__key">2 часа</dt>
  186.                                     <dd class="item-info__value">{{- minPriceTwo != '-' ? minPriceTwo : '-' -}}</dd>
  187.                                 </div>
  188.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  189.                                     <dt class="item-info__key">Ночь</dt>
  190.                                     <dd class="item-info__value">{{- minPriceNight != '-' ? minPriceNight : '-' -}}</dd>
  191.                                 </div>
  192.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  193.                                     <dt class="item-info__key">Выезд</dt>
  194.                                     <dd class="item-info__value">{{- hasOutPrice == '1' ? 'Есть' : '-' -}}</dd>
  195.                                 </div>
  196.                             </dl>
  197.                         </div>
  198.                     </div>
  199.                 </div>
  200.             </a>
  201.             <div class="models-item__metro d-flex align-items-center">
  202.                 {%- if fakeStation -%}
  203.                     {%- include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} -%}
  204.                     {%- if isStationPage -%}
  205.                         <div class="models-item__metro-link">
  206.                             {{- station.name -}}
  207.                         </div>
  208.                     {% else %}
  209.                         <a class="models-item__metro-link" href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}" target="_blank">
  210.                             {{- station.name -}}
  211.                         </a>
  212.                     {% endif %}
  213.                 {%- elseif stationOutput != '' -%}
  214.                     {%- include 'components/metro/icon_generate.partial.twig' with {data: stationOutput.id|station_lines} -%}
  215.                     {%- if isStationPage -%}
  216.                         <div class="models-item__metro-link">
  217.                             {{- stationOutput.name -}}
  218.                         </div>
  219.                     {%- else -%}
  220.                         <a class="models-item__metro-link" href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': stationOutput.uriIdentity}) }}" target="_blank">
  221.                             {{- stationOutput.name -}}
  222.                         </a>
  223.                     {%- endif -%}
  224.                 {%- else -%}
  225.                     <div class="models-item__metro-link models-item__metro-link--empty"></div>
  226.                 {%- endif -%}
  227.             </div>
  228.             {%- if profile.isActive or not profile.isHidden -%}
  229.                 <div class="models-item__phone rounding">
  230.                     <button class="models-item__phone-button models-item__phone-button--dark btn btn-danger d-flex align-items-center justify-content-center" type="button" onclick="this.nextElementSibling.classList.remove('d-none');this.nextElementSibling.classList.add('d-flex');this.remove()">
  231.                         <svg class="models-item__phone-icon">
  232.                             <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#phone"></use>
  233.                         </svg>Показать телефон</button>
  234.                     <a href="tel:{{ profile.phoneNumber|replace({' ':'', '-':''}) }}" rel="nofollow" class="models-item__phone-button btn btn-danger align-items-center justify-content-center d-none">
  235.                         <svg class="models-item__phone-icon">
  236.                             <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#phone"></use>
  237.                         </svg>
  238.                         {{- profile.phoneNumber -}}
  239.                     </a>
  240.                 </div>
  241.             {%- endif -%}
  242.         </div>
  243.     </div>
  244.     {%- if app.request.method == 'GET' and app.request.isXmlHttpRequest() -%}
  245.         {{- porpaginas_render(profiles) -}}
  246.     {% endif %}
  247. {%- endfor -%}