templates/ProfilePreview/components/profile-location.partial.twig line 1

Open in your IDE?
  1. <div class="profile-values-block profile-values-block--{{ type }} d-flex{{ template == 'saloon' ? ' profile-values-block--saloon' : '' }}">
  2.     {%- if haveMetro -%}
  3.         <div class="profile-values d-flex">
  4.             <span class="profile-values-title mr-2">Метро</span>
  5.             <div class="profile-values-list d-flex-c">
  6.                 {%- for station in profile.stationsSortedByPrimary|slice(0,3) -%}
  7.                     <a class="profile-values-link d-flex-c link" href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}" target="_blank" title="{{ station.name }}">
  8.                         {%- include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} -%}
  9.                         {{- station.name -}}
  10.                     </a>
  11.                 {%- endfor -%}
  12.             </div>
  13.         </div>
  14.     {%- endif -%}
  15.     {%- if template is defined and template == 'profile' -%}
  16.     <div class="profile-values d-flex">
  17.         <span class="profile-values-title mr-2">Город</span>
  18.         <div class="profile-values-list d-flex-c">
  19.             <span class="profile-values-link d-flex-c" title="{{ profile.city.name|trans }}">
  20.                 {{- profile.city.name|trans -}}
  21.             </span>
  22.         </div>
  23.     </div>
  24.     {%- endif -%}
  25.     {%- if haveMetro and template == 'profile' -%}
  26.         <div class="profile-values d-flex">
  27.             <span class="profile-values-title mr-2">Район</span>
  28.             <div class="profile-values-list d-flex-c">
  29.                 {%- for station in profile.stationsSortedByPrimary -%}
  30.                     {%- set district = station.district -%}
  31.                     {%- if district -%}
  32.                         {%- if loop.first -%}
  33.                             {%- set county = district.county -%}
  34.                             {%- if county -%}
  35.                                 <span>
  36.                                     <a class="profile-values-link link" href="{{ path('profile_list.list_by_county', {'city': county.city.uriIdentity, 'county': county.uriIdentity}) }}" target="_blank">{{ county.name|trans }}</a>,
  37.                                     <a class="profile-values-link link" href="{{ path('profile_list.list_by_district', {'city': county.city.uriIdentity, 'district': district.uriIdentity}) }}" target="_blank">{{ district.name|trans }}</a>
  38.                                 </span>
  39.                             {%- else -%}
  40.                                 Не указан
  41.                             {%- endif -%}
  42.                         {%- endif -%}
  43.                     {%- endif -%}
  44.                 {%- endfor -%}
  45.             </div>
  46.         </div>
  47.     {%- endif -%}
  48.     {%- if template is defined and template == 'saloon' -%}
  49.         <div class="profile-values d-flex">
  50.             <span class="profile-values-title mr-2">Адрес</span>
  51.             <div class="profile-values-list d-flex-c">
  52.                 {{- profile.address -}}
  53.             </div>
  54.         </div>
  55.     {%- endif -%}
  56. </div>
  57. {%- if type == 'mobile' -%}
  58.     <div class="profile-show-map">
  59.         <button class="profile-show-map-btn btn btn-grey btn-fluid" type="button" id="show-map-btn">
  60.             <svg class=" btn-icon" width="25" height="24" fill="none"><path fill-rule="evenodd" d="M4.674 8.826C4.674 4.512 8.186 1 12.499 1c4.314 0 7.826 3.512 7.826 7.826 0 5.448-6.808 13.05-7.102 13.372L12.5 23l-.723-.802c-.294-.323-7.102-7.924-7.102-13.372Zm1.956 0c0 3.463 3.737 8.667 5.87 11.22 1.711-2.064 5.869-7.474 5.869-11.22a5.874 5.874 0 0 0-5.87-5.87 5.874 5.874 0 0 0-5.869 5.87Zm5.87 0c.811 0 1.467-.656 1.467-1.468 0-.812-.656-1.467-1.468-1.467-.811 0-1.467.665-1.467 1.467 0 .812.656 1.468 1.467 1.468ZM9.564 11.27c0-.978 1.956-1.467 2.934-1.467.979 0 2.935.489 2.935 1.467v.118a3.88 3.88 0 0 1-2.934 1.35 3.88 3.88 0 0 1-2.935-1.35v-.118Z" clip-rule="evenodd"/></svg>
  61.             <span class="btn-text">Показать на карте</span>
  62.         </button>
  63.         <div class="profile-show-map-container skeleton" id="profile-map-mobile"></div>
  64.     </div>
  65. {%- endif -%}