templates/chat/listado-chat.html.twig line 1

Open in your IDE?
  1. {% for conversacion in aConversaciones %}
  2.     {% set activeChat = (numTelefonoSelected is defined and numTelefonoSelected is not empty)
  3.         ? (numTelefonoSelected == conversacion.num_telefono) ? 'active-chat' : '':'' %}
  4.     <li class="listado-conversaciones clearfix {{ activeChat }}" data-centroid="{{ conversacion.centroId }}" data-numtelefono="{{ conversacion.num_telefono }}">
  5.         <div class="row chat-list-item">
  6.             {% set imageUrls = [] %}
  7.             {% for paciente in conversacion.pacientes|slice(0, 4) %}
  8.                 {% set imageUrl = (paciente.imagen is not empty) ? paciente.imagen : asset('assets/img/user.png') %}
  9.                 {% set imageUrls = imageUrls|merge([imageUrl]) %}
  10.             {% endfor %}
  11.             {% if imageUrls|length == 0 %}
  12.                 {% set imageUrls = [asset('assets/img/user.png')] %}
  13.             {% endif %}
  14.             {% set imageCount = imageUrls|length %}
  15.             {# {% set compositeImageData = create_composite_image(imageUrls) %} #}
  16.             {# {% set imagen = (paciente.imagen is not empty) ? paciente.imagen : asset('assets/img/user.png') %} #}
  17.                 <div class="col-10 patient-list-data"> <div class="composite-image image-count-{{ imageCount }}">
  18.                     {% for imageUrl in imageUrls %}
  19.                         <img src="{{ imageUrl }}" alt="avatar"/>
  20.                     {% endfor %}
  21.                 </div>
  22.                 <div class="about">
  23.                     <div class="name">
  24.                         {% for paciente in conversacion.pacientes|slice(0, 2) %}
  25.                             <div>
  26.                                 <b>{{ paciente.nombre_paciente }}</b>
  27.                                 {{ paciente.nombre_familia }}
  28.                                 <span class="status">{{ getTipoContacto(conversacion.num_telefono, paciente.vcId, conversacion.centroId) }}</span>
  29.                             </div>
  30.                         {% endfor %}
  31.                         {% if conversacion.pacientes|length == 0 %}
  32.                             <div>
  33.                                 <b>{{ conversacion.num_telefono }}</b>
  34.                             </div>
  35.                         {% endif %}
  36.                         {% if conversacion.pacientes|length >= 3 %}
  37.                             {% set num_extra_patients = conversacion.pacientes|length - 2 %}
  38.                             <div class="more-than-two-patients">
  39.                                 y
  40.                                 {{ num_extra_patients }}
  41.                                 más
  42.                             </div>
  43.                         {% endif %}
  44.                     </div>
  45.                 </div>
  46.             </div>
  47.             <div class="col-2">
  48.                 {% if conversacion.total_notificaciones > 0 %}
  49.                     <span class="badge badge-coorporativo badge-{{ conversacion.num_telefono }}-{{ conversacion.centroId }}">{{ conversacion.total_notificaciones }}</span>
  50.                 {% endif %}
  51.             </div>
  52.         </div>
  53.     </li>
  54. {% endfor %}