vendor/nellapp/sdk-bundle/src/Resources/views/Partials/TwigExtension/avatar_display.html.twig line 1

Open in your IDE?
  1. {% set tooltip = tooltip | default(false) %}
  2. {% set title = tiltle | default(true) %}
  3. {% if user and user.avatarPath is not null %}
  4.     {% if full_image is defined and full_image is same as true %}
  5.         {% set src = asset(user.avatarPath) %}
  6.         {% else %}
  7.         {% set src = get_user_avatar_thumbnail(user) %}
  8.     {% endif %}
  9.     <img class="user-account {{ classes | default('') }}"
  10.          src="{{ src }}"
  11.          alt="{{ user }}"
  12.          {% if title is same as true %}title="{{ user }}"{% endif %}
  13.          {% if tooltip is same as true %}data-bs-toggle="tooltip"
  14.          data-bs-custom-class="user-tooltip"{% endif %}
  15.     />
  16. {% else %}
  17.     <span class="default-avatar {{ classes | default('') }}"
  18.           title="{{ user }}"
  19.           {% if tooltip is same as true %}data-bs-toggle="tooltip"
  20.           data-bs-custom-class="user-tooltip"{% endif %}
  21.     >
  22.         {% if tooltip is same as true %}
  23.             {% if user.firstName is not null or user.lastName is not null %}
  24.                 {{ user.firstName | first }} {{ user.lastName | first }}
  25.             {% else %}
  26.                 <i class="mdi mdi-account"></i>
  27.             {% endif %}
  28.         {% else %}
  29.             {% if user.firstName is not null %}
  30.                 {{ user.firstName | first }}
  31.             {% elseif user.lastName is not null %}
  32.                 {{ user.lastName | first }}
  33.             {% else %}
  34.                 <i class="mdi mdi-account"></i>
  35.             {% endif %}
  36.         {% endif %}
  37.     </span>
  38. {% endif %}