{% set constUserTypeInge = constant('AppBundle\\Enum\\UserType::ENGINEER') %}

<h2>Derniers inscrits</h2>
<dl class="list-users">
    {% for user in users %}
        <dt>{{ user.firstname }} {{ user.lastname|truncate(1, false, '') }}, {% if user.jobother is not empty %}{{ user.jobother }}{% else %}{% if constUserTypeInge == user.type %}{{ user.job|transconst('AppBundle\\Enum\\UserJobEngineer') }}{% else %}{{ user.job|transconst('AppBundle\\Enum\\UserJobTeacher') }}{% endif %}{% endif %}{% if constUserTypeInge == user.type %}, {{ user.establishmentname}}{% endif %}</dt>
        <dd><time class="date" datetime="{{ user.created|date('Y-m-d') }}">{{ user.created|date("d/m/Y") }}</time> {{ user.establishmentCity }}</dd>
    {% endfor %}
</dl>