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. {%- 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. {% set top_profile = profile_top_placement() %}
  35. {% set isTopProfilesExist = top_profile is defined and null != top_profile and null != profiles %}
  36.     {%- set profile = profile.profile is defined ? profile.profile : profile %}
  37.     {% set isSearchPage = form is defined %}
  38.     {% set stationFromForm = null %}
  39.     {# -------------------------- Если страница поиска -------------------------- #}
  40.     {% if isSearchPage %}
  41.         {% if form.station is defined and form.station.vars.value|length > 0 %}
  42.             {% for station in form.station.vars.value %}
  43.                 {% if stationFromForm is null%}
  44.                     {% set stationFromForm = profile.stations[station] is defined ? profile.stations[station] : null %}
  45.                 {% endif %}
  46.             {% endfor %}
  47.         {% endif %}
  48.         {% set listingStation = stationFromForm %}
  49.     {% else %}
  50.         {% set listingStation = app.request.attributes.get('station') %}
  51.     {% endif %}
  52.     {% set haveStationInList = listingStation %}
  53.     {% set stationOutput = '' %}
  54.     {% set stationReallyExist = false %}
  55.     {# Проверяем что станция которую мы открыли есть в профиле анкеты #}
  56.     {% if haveStationInList and profile.stations|length > 0 %}
  57.         {% for station in profile.stations %}
  58.             {% if station.uriIdentity == listingStation.uriIdentity %}
  59.                 {% set stationReallyExist = true %}
  60.         {% endif %}
  61.         {% endfor %}
  62.     {% endif %}
  63.     {% if haveStationInList and stationReallyExist %}
  64.         {# Если это список станций - выводим эту станцию сразу #}
  65.         {% set stationOutput = listingStation %}
  66.     {% else %}
  67.         {# Если это обычный список - выводим станции из профиля #}
  68.         {% set stationOutput = profile.stations|first %}
  69.     {% endif -%}
  70.     {# у топа другие поля в объекте #}
  71.     {% set isProfileStandart = false %}
  72.     {% set isProfileVip = false %}
  73.     {% set isProfileUltraVip = false %}
  74.     {% set isProfileTop = isTopProfilesExist and top_profile.uriIdentity == profile.uriIdentity %}
  75.     {% if not isProfileTop %}
  76.         {% set isProfileStandart = profile.isStandard is defined ? profile.isStandard : profile.adBoardPlacement and profile.adBoardPlacement.type.isStandard %}
  77.         {% set isProfileVip = profile.isVip is defined ? profile.isVip : profile.adBoardPlacement and profile.adBoardPlacement.type.isVip %}
  78.         {% set isProfileUltraVip = profile.isUltraVip is defined ? profile.isUltraVip : profile.adBoardPlacement and profile.adBoardPlacement.type.isUltraVip %}
  79.     {% endif %}
  80.     <div class="models-item-col{{ isProfileTop ? ' models-item-col-top' : '' }}" data-profile-id="{{ profile.id }}">
  81.         <div class="models-item rounding">
  82.             <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">
  83.                 <div class="models-item__header d-flex align-items-center justify-content-between">
  84.                     <div class="models-item__header-title mr-2 d-flex align-items-center">
  85.                         <span>{{ profile.name|trans }}</span>
  86.                         {%- if ( profile.isApproved ) -%}
  87.                             <div class="ml-2" data-toggle="tooltip" data-theme="verify" data-tippy-content="Фото проверено">
  88.                                 <svg class="icon">
  89.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-verify-new"></use>
  90.                                 </svg>
  91.                             </div>
  92.                         {%- endif -%}
  93.                     </div>
  94.                     <div class="item-status d-flex align-items-center justify-content-center">
  95.                         {%- if profile.comments is iterable ? (profile.comments|length > 0) : profile.comments -%}
  96.                             <div class="item-status__el d-flex align-items-center active" data-toggle="tooltip" data-placement="top" data-tippy-content="Есть комментарии" data-theme="basic">
  97.                                 <svg class="icon">
  98.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-comments-thumb"></use>
  99.                                 </svg>
  100.                             </div>
  101.                         {%- else -%}
  102.                             <div class="item-status__el d-flex align-items-center">
  103.                                 <svg class="icon">
  104.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-comments-thumb"></use>
  105.                                 </svg>
  106.                             </div>
  107.                         {%- endif -%}
  108.                         {%- if profile.selfies is iterable ? (profile.selfies|length > 0) : profile.selfies -%}
  109.                             <div class="item-status__el d-flex align-items-center active" data-toggle="tooltip" data-placement="top" data-tippy-content="Есть селфи" data-theme="basic">
  110.                                 <svg class="icon">
  111.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-selfie-thumb"></use>
  112.                                 </svg>
  113.                             </div>
  114.                         {%- else -%}
  115.                             <div class="item-status__el d-flex align-items-center">
  116.                                 <svg class="icon">
  117.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-selfie-thumb"></use>
  118.                                 </svg>
  119.                             </div>
  120.                         {%- endif -%}
  121.                         {%- if profile.videos is iterable ? (profile.videos|length > 0) : profile.videos -%}
  122.                             <div class="item-status__el d-flex align-items-center active" data-toggle="tooltip" data-placement="top" data-tippy-content="Есть видео" data-theme="basic">
  123.                                 <svg class="icon">
  124.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-video-thumb"></use>
  125.                                 </svg>
  126.                             </div>
  127.                         {%- else -%}
  128.                             <div class="item-status__el d-flex align-items-center">
  129.                                 <svg class="icon">
  130.                                     <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#icon-video-thumb"></use>
  131.                                 </svg>
  132.                             </div>
  133.                         {%- endif -%}
  134.                     </div>
  135.                 </div>
  136.                 <div class="models-item__content d-flex">
  137.                     <div class="models-item__images d-block rounding">
  138.                         {%- set photo = profile|avatar -%}
  139.                         {%- if photo -%}
  140.                             {%- set firstStation = profile.stations|first -%}
  141.                             <img {{ loop.index == 1 ? '' : 'data-' }}src="{{ responsive_asset(photo.path, 'profile_media', "200x280", "jpg") }}" class="models-item__img lazy img-fluid rounding"
  142.                                 {%- if listingStation and not fakeStation -%}
  143.                                     alt="{{ profile.name|trans }} ({{ profile.personParameters.age }}){% if firstStation and firstStation is not null %}, {{ firstStation.name|trans }}{%- endif -%}"
  144.                                 {%- else -%}
  145.                                     alt="{{- _self._gen_alt(profile, stationOutput, fakeStation, station ?? false) -}}"
  146.                                 {%- endif -%}
  147.                                 width="200" height="280">
  148.                         {%- endif -%}
  149.                         {%- if profile.isActive -%}
  150.                             {%- if isProfileTop -%}
  151.                                 <div class="status-line">
  152.                                     <svg class="status-line__icon" width="53" height="20" viewBox="0 0 53 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  153.                                         <path d="M19.702 7.15039C19.8082 7.26453 19.8911 7.4015 19.9423 7.55469C20.0741 7.94951 19.9743 8.38479 19.6835 8.68262L15.6317 12.833L16.5897 18.71C16.6582 19.1299 16.4806 19.5518 16.1327 19.7969C15.7849 20.0418 15.3282 20.0671 14.9559 19.8613L9.99989 17.1211L5.04481 19.8613C4.67243 20.0673 4.21496 20.0419 3.86708 19.7969C3.5192 19.5518 3.34155 19.1299 3.41005 18.71L4.36903 12.833L0.316298 8.68262C0.0255191 8.38481 -0.0742435 7.94949 0.0575088 7.55469C0.108598 7.40176 0.190902 7.26441 0.296767 7.15039C9.22706 9.94978 9.23625 16.4703 9.99989 16.4707C10.7636 16.4707 10.7725 9.95006 19.702 7.15039ZM9.99989 0C10.4306 0 10.8226 0.248861 11.0058 0.638672L13.5009 5.9541L19.0575 6.80762C19.3002 6.84492 19.5171 6.96238 19.6825 7.13184C13.2663 8.62861 11.2158 10.8281 9.99989 10.8281C8.7839 10.828 6.73326 8.62858 0.316298 7.13184C0.48176 6.96206 0.699316 6.84496 0.942274 6.80762L6.49892 5.9541L8.99403 0.638672C9.17711 0.248846 9.56921 3.81382e-05 9.99989 0Z" fill="url(#paint0_linear_5931_162768)"/>
  154.                                         <path d="M48.7842 11.5996H46.3096V9.74707H48.7842C49.1214 9.74707 49.3949 9.6901 49.6045 9.57617C49.8141 9.46224 49.9668 9.30501 50.0625 9.10449C50.1628 8.89941 50.2129 8.66927 50.2129 8.41406C50.2129 8.14062 50.1628 7.8877 50.0625 7.65527C49.9668 7.42285 49.8141 7.236 49.6045 7.09473C49.3949 6.94889 49.1214 6.87598 48.7842 6.87598H47.2119V14.9766H44.8125V5.02344H48.7842C49.5817 5.02344 50.2676 5.16927 50.8418 5.46094C51.4206 5.7526 51.8649 6.15365 52.1748 6.66406C52.4847 7.16992 52.6396 7.7487 52.6396 8.40039C52.6396 9.04297 52.4847 9.60352 52.1748 10.082C51.8649 10.5605 51.4206 10.9342 50.8418 11.2031C50.2676 11.4674 49.5817 11.5996 48.7842 11.5996Z" fill="#ED0C34"/>
  155.                                         <path d="M43.5684 9.80176V10.2051C43.5684 10.9661 43.4613 11.6497 43.2471 12.2559C43.0374 12.8574 42.7389 13.3724 42.3516 13.8008C41.9642 14.2246 41.5062 14.5505 40.9775 14.7783C40.4489 15.0016 39.8656 15.1133 39.2275 15.1133C38.585 15.1133 37.9971 15.0016 37.4639 14.7783C36.9352 14.5505 36.4749 14.2246 36.083 13.8008C35.6956 13.3724 35.3949 12.8574 35.1807 12.2559C34.971 11.6497 34.8662 10.9661 34.8662 10.2051V9.80176C34.8662 9.04069 34.971 8.3571 35.1807 7.75098C35.3949 7.14486 35.6934 6.62988 36.0762 6.20605C36.4635 5.77767 36.9215 5.45182 37.4502 5.22852C37.9834 5.00065 38.5713 4.88672 39.2139 4.88672C39.8519 4.88672 40.4352 5.00065 40.9639 5.22852C41.4971 5.45182 41.9574 5.77767 42.3447 6.20605C42.7321 6.62988 43.0329 7.14486 43.2471 7.75098C43.4613 8.3571 43.5684 9.04069 43.5684 9.80176ZM41.1348 10.2051V9.78809C41.1348 9.2959 41.0915 8.86296 41.0049 8.48926C40.9229 8.111 40.7998 7.79427 40.6357 7.53906C40.4717 7.28385 40.2689 7.09245 40.0273 6.96484C39.7904 6.83268 39.5192 6.7666 39.2139 6.7666C38.8949 6.7666 38.6169 6.83268 38.3799 6.96484C38.1429 7.09245 37.9447 7.28385 37.7852 7.53906C37.6257 7.79427 37.5049 8.111 37.4229 8.48926C37.3454 8.86296 37.3066 9.2959 37.3066 9.78809V10.2051C37.3066 10.6927 37.3454 11.1257 37.4229 11.5039C37.5049 11.8776 37.6257 12.1943 37.7852 12.4541C37.9492 12.7139 38.1497 12.9098 38.3867 13.042C38.6283 13.1742 38.9085 13.2402 39.2275 13.2402C39.5329 13.2402 39.804 13.1742 40.041 13.042C40.278 12.9098 40.4762 12.7139 40.6357 12.4541C40.7998 12.1943 40.9229 11.8776 41.0049 11.5039C41.0915 11.1257 41.1348 10.6927 41.1348 10.2051Z" fill="#ED0C34"/>
  156.                                         <path d="M31.3252 5.02344V14.9766H28.9258V5.02344H31.3252ZM34.3193 5.02344V6.87598H26V5.02344H34.3193Z" fill="#ED0C34"/>
  157.                                         <defs>
  158.                                         <linearGradient id="paint0_linear_5931_162768" x1="19.9995" y1="9.99995" x2="0.000305176" y2="9.99995" gradientUnits="userSpaceOnUse">
  159.                                         <stop stop-color="#ED0C34"/>
  160.                                         <stop offset="1" stop-color="#87071E"/>
  161.                                         </linearGradient>
  162.                                         </defs>
  163.                                     </svg>
  164.                                 </div>
  165.                             {%- elseif isProfileVip -%}
  166.                                 <div class="status-line">
  167.                                     <svg class="status-line__icon">
  168.                                         <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#status-gold-new"></use>
  169.                                     </svg>
  170.                                 </div>
  171.                             {%- elseif isProfileStandart -%}
  172.                                 <div class="status-line">
  173.                                     <svg class="status-line__icon">
  174.                                         <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#status-silver-new"></use>
  175.                                     </svg>
  176.                                 </div>
  177.                             {%- endif -%}
  178.                         {%- endif -%}
  179.                     </div>
  180.                     <div class="models-item__info d-flex flex-fill">
  181.                         <div class="models-item__info-link">
  182.                             <dl class="item-info">
  183.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  184.                                     <dt class="item-info__key">Возраст</dt>
  185.                                     <dd class="item-info__value">{{- profile.personParameters.age ? profile.personParameters.age : '-' -}}</dd>
  186.                                 </div>
  187.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  188.                                     <dt class="item-info__key">Рост</dt>
  189.                                     <dd class="item-info__value">{{- profile.personParameters.height ? profile.personParameters.height : '-' -}}</dd>
  190.                                 </div>
  191.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  192.                                     <dt class="item-info__key">Вес</dt>
  193.                                     <dd class="item-info__value">{{- profile.personParameters.weight ? profile.personParameters.weight : '-' -}}</dd>
  194.                                 </div>
  195.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  196.                                     <dt class="item-info__key">Грудь</dt>
  197.                                     <dd class="item-info__value">{{- profile.personParameters.breastSize ? profile.personParameters.breastSize : '-' -}}</dd>
  198.                                 </div>
  199.                             </dl>
  200.                             {%- set currencyProfile -%}{{ profile.city.countryCode|country_currency }}{%- endset -%}
  201.                             {%- set minPriceHour -%}{{ _self._get_min(profile.apartmentsPricing.oneHourPrice,profile.takeOutPricing.oneHourPrice,currencyProfile) }}{%- endset -%}
  202.                             {%- set minPriceTwo -%}{{ _self._get_min(profile.apartmentsPricing.twoHoursPrice,profile.takeOutPricing.twoHoursPrice,currencyProfile) }}{%- endset -%}
  203.                             {%- set minPriceNight -%}{{ _self._get_min(profile.apartmentsPricing.nightPrice,profile.takeOutPricing.nightPrice,currencyProfile) }}{%- endset -%}
  204.                             {%- set hasOutPrice -%}{{- _self._check_out_price(profile.takeOutPricing.oneHourPrice,profile.takeOutPricing.twoHoursPrice,profile.takeOutPricing.nightPrice) -}}{%- endset -%}
  205.                             <dl class="item-info">
  206.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  207.                                     <dt class="item-info__key">Час</dt>
  208.                                     <dd class="item-info__value">{{- minPriceHour != '-' ? minPriceHour : '-' -}}</dd>
  209.                                 </div>
  210.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  211.                                     <dt class="item-info__key">2 часа</dt>
  212.                                     <dd class="item-info__value">{{- minPriceTwo != '-' ? minPriceTwo : '-' -}}</dd>
  213.                                 </div>
  214.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  215.                                     <dt class="item-info__key">Ночь</dt>
  216.                                     <dd class="item-info__value">{{- minPriceNight != '-' ? minPriceNight : '-' -}}</dd>
  217.                                 </div>
  218.                                 <div class="item-info__el d-flex align-items-center justify-content-between">
  219.                                     <dt class="item-info__key">Выезд</dt>
  220.                                     <dd class="item-info__value">{{- hasOutPrice == '1' ? 'Есть' : '-' -}}</dd>
  221.                                 </div>
  222.                             </dl>
  223.                         </div>
  224.                     </div>
  225.                 </div>
  226.             </a>
  227.             <div class="models-item__metro d-flex align-items-center">
  228.                 {%- if fakeStation -%}
  229.                     {%- include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} -%}
  230.                     {%- if isStationPage -%}
  231.                         <div class="models-item__metro-link">
  232.                             {{- station.name -}}
  233.                         </div>
  234.                     {% else %}
  235.                         <a class="models-item__metro-link" href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}" target="_blank">
  236.                             {{- station.name -}}
  237.                         </a>
  238.                     {% endif %}
  239.                 {%- elseif stationOutput != '' -%}
  240.                     {%- include 'components/metro/icon_generate.partial.twig' with {data: stationOutput.id|station_lines} -%}
  241.                     {%- if isStationPage -%}
  242.                         <div class="models-item__metro-link">
  243.                             {{- stationOutput.name -}}
  244.                         </div>
  245.                     {%- else -%}
  246.                         <a class="models-item__metro-link" href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': stationOutput.uriIdentity}) }}" target="_blank">
  247.                             {{- stationOutput.name -}}
  248.                         </a>
  249.                     {%- endif -%}
  250.                 {%- else -%}
  251.                     <div class="models-item__metro-link models-item__metro-link--empty"></div>
  252.                 {%- endif -%}
  253.             </div>
  254.             {%- if profile.isActive or not profile.isHidden -%}
  255.                 <div class="models-item__phone rounding">
  256.                     <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()">
  257.                         <svg class="models-item__phone-icon">
  258.                             <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#phone"></use>
  259.                         </svg>Показать телефон</button>
  260.                     <a href="tel:{{ profile.phoneNumber|replace({' ':'', '-':''}) }}" rel="nofollow" class="models-item__phone-button btn btn-danger align-items-center justify-content-center d-none">
  261.                         <svg class="models-item__phone-icon">
  262.                             <use xlink:href="{{ asset('assets_domain/images/icons/svg-library.svg', 'nodomainConfig') }}#phone"></use>
  263.                         </svg>
  264.                         {{- profile.phoneNumber -}}
  265.                     </a>
  266.                 </div>
  267.             {%- endif -%}
  268.         </div>
  269.     </div>