templates/ProfileList/list.profiles.html.twig line 1

Open in your IDE?
  1. {% if null != profiles or profile_top_placement is defined %}
  2.     <h2 class="px-3 w-100">{{ profiles.totalCount }} {{ profiles.totalCount|incline_numeral(['товар', 'товара', 'товаров']) }}</h2>
  3. {% endif %}
  4. {% set profiles_array = (profiles is iterable) ? ((profiles.array is defined) ? profiles.array : profiles) : [] %}
  5. {% if top_profile is defined and null != top_profile and null != profiles %}
  6.     {% set profiles_array = [top_profile]|merge(profiles_array) %}
  7. {% endif %}
  8. {% for profile in profiles %}
  9.     <div class="col-4">
  10.         <div class="card" alt="{{ profile.seo ? profile.seo.phone : '' }}">
  11.             {% set photo = profile|avatar %}
  12.             {% if photo is not null %}
  13.                 <img class="card-img-top"
  14.                      src="{{ responsive_asset(photo.path, photo.type == 'photo' ? 'profile_media' : 'profile_media_avatar', '357x500', 'jpg') }}"
  15.                      alt="{{ profile.seo ? profile.seo.phone : '' }}">
  16.             {% endif %}
  17.             <div class="card-body">
  18.                 {% if profile.isApproved %}APPROVED{% endif %}
  19.                 <h5 class="card-title"><a
  20.                             href="{{ path('profile_preview.page', {'city': profile.city.uriIdentity, 'profile': profile.uriIdentity}) }}"
  21.                             title="">{{ profile.name|trans }} (pos: {{ profile.position ?? '' }})</a></h5>
  22.                 {% if profile.isActive or not profile.hidden %}
  23.                     <h6 class="card-subtitle mb-2"><a href="tel:{{ profile.phoneNumber }}">{{ profile.phoneNumber }}</a>
  24.                     </h6>
  25.                 {% endif %}
  26.                 {% for station in profile.stations %}
  27.                     <a href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}">{{ station.name|trans }} {% if loop.first %}*{% endif %}</a>
  28.                     {% if not loop.last %}, {% endif %}
  29.                 {% endfor %}
  30.                 <dl class="small">
  31.                     <dt>{% trans %}Возраст{% endtrans %}</dt>
  32.                     <dd>{{ profile.personParameters.age }}</dd>
  33.                     <dt>{% trans %}Рост{% endtrans %}</dt>
  34.                     <dd>{{ profile.personParameters.height }}</dd>
  35.                     <dt>{% trans %}Вес{% endtrans %}</dt>
  36.                     <dd>{{ profile.personParameters.weight }}</dd>
  37.                     <dt>{% trans %}Грудь{% endtrans %}</dt>
  38.                     <dd>{{ profile.personParameters.breastSize }}</dd>
  39.                 </dl>
  40.                 <dl class="small">
  41.                     <dt>{% trans %}Час{% endtrans %}</dt>
  42.                     <dd>{{ profile.apartmentsPricing.oneHourPrice }} руб</dd>
  43.                     <dt>{% trans %}2 часа{% endtrans %}</dt>
  44.                     <dd>{{ profile.apartmentsPricing.twoHoursPrice }} руб</dd>
  45.                     <dt>{% trans %}Ночь{% endtrans %}</dt>
  46.                     <dd>{{ profile.apartmentsPricing.nightPrice }} руб</dd>
  47.                 </dl>
  48.                 <p class="small">
  49.                     {% if profile.apartmentsPricing.isProvided %}
  50.                         {{ 'апартаменты'|trans }}
  51.                     {% endif %}
  52.                     {% if profile.takeOutPricing.isProvided %}
  53.                         {{ 'выезд'|trans }}
  54.                     {% endif %}
  55.                 </p>
  56.                 {#                        <p> #}
  57.                 {#                            <ul> #}
  58.                 {#                                {% for service in profile.providedServices %} #}
  59.                 {#                                    <li class="text-success"> #}
  60.                 {#                                        <a>{{ service.service.name|trans }}</a> #}
  61.                 {#                                    </li> #}
  62.                 {#                                {% endfor %} #}
  63.                 {#                            </ul> #}
  64.                 {#                        </p> #}
  65.                 <p class="card-text text-muted small">{{ profile.description|trans }}</p>
  66.                 <p class="card-text text-muted small">{{ (top_profile is defined and profile != top_profile) and profile.isStandard ? 'standard' }}</p>
  67.                 {% include 'ProfileList/tags.html.twig' with { 'profile': profile } %}
  68.             </div>
  69.         </div>
  70.     </div>
  71.     {# {% if loop.index % 3 == 0 %}</div><div class="row mb-3">{% endif %} #}
  72. {% endfor %}
  73. {% if show_pagination is defined %}
  74.     <div class="filtered_profiles_pagination">
  75.         {{ porpaginas_render(profiles) }}
  76.     </div>
  77. {% endif %}