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

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