Licitator 1.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

32 lines
1.5 KiB

{% block sala %}
{% set userSala = sala.getDestinatario(userId) %}
{% if userSala is not null %}
{% set image = userSala.photo ? userSala.photo : asset(sonata_user.defaultAvatar) %}
{% endif %}
{% if is_granted('ROLE_TRAINER') and sala.denominacion == "My trainer" and userSala is not empty%}
{% set salaName = userSala.getNombreCompleto() %}
{% elseif sala.denominacion == "Contacto" and userSala is not empty%}
{% set salaName = userSala.getNombreCompleto() %}
{% else %}
{% set salaName = sala.denominacion %}
{% endif %}
<div class="sala_item" id="{{ 'sala-' ~ sala.id }}" role="button" data-load-path="{{ path('carga_mensajes_sala', {'id':sala.id}) }}" data-publish-url="{{ url('publisher', {'topic': 'sala-' ~ sala.id}) }}">
<div class="sala_img">
{% if unreaded is defined and unreaded > 0 %}
<span class="unreaded">{{ unreaded }}</span>
{% endif %}
{% if image is defined %}
{% if image is null %}
<img src="/images/user-profile.png" alt="{{ salaName }}">
{% else %}
<img src="{{ image }}" alt="{{ salaName }}">
{% endif %}
{% else %}
<span class="sala_logo">{{ salaName|slice(0,1)|upper }}</span>
{% endif %}
</div>
<div class="sala_desc">
{{ include('dashboard/chat/_sala_element_desc.html.twig', {salaName: salaName, lastMsg:sala.lastMessage}) }}
</div>
</div>
{% endblock %}