templates/ProfilePreview/components/services-output-only-active.partial.twig line 1

Open in your IDE?
  1. {% for service in servicesGroup %}
  2.     {% set providedService = profile.providedService(service) %}
  3.     {% if providedService %}
  4.         <li class="service-item{% if providedService %} service-provide{% endif %} d-flex-c mb-1">
  5.             <div class="service-item-block d-flex">
  6.                 {% set serviceIcon = 'grey' %}
  7.                 {% if providedService %}
  8.                     {% if providedService.condition == 1 %}
  9.                         {% set serviceIcon = 'green' %}
  10.                     {% elseif providedService.condition == 2 %}
  11.                         {% set serviceIcon = 'orange' %}
  12.                     {% elseif providedService.condition == 3 %}
  13.                         {% set serviceIcon = 'red' %}
  14.                     {% endif %}
  15.                 {% else %}
  16.                     {% set serviceIcon = 'grey' %}
  17.                 {% endif %}
  18.                 <a class="d-flex-c link{{ serviceIcon == 'grey' ? ' service-not-available' : '' }}" href="{{ path('profile_list.list_by_provided_service', {'city': profile.city.uriIdentity, 'service': service.uriIdentity}) }}">
  19.                     <svg class="service-icon mr-1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="20">
  20.                         <use xlink:href="#service-{{serviceIcon}}"></use>
  21.                     </svg>
  22.                     {{ service.name|trans }}
  23.                     {% if providedService and providedService.condition == 3 and providedService.extraCharge %}<span class="service-extra-charge clr-main-text fw-700 ml-1">+{{ providedService.extraCharge }}р</span>{% endif %}
  24.                 </a>
  25.                 {% if providedService and providedService.comment %}
  26.                     <div class="service-comment">{{ providedService.comment }}</div>
  27.                 {% endif %}
  28.             </div>
  29.         </li>
  30.     {% endif %}
  31. {% endfor %}