Show user avatar next to its name, in all possible locations

This commit is contained in:
Jan Böhmer 2023-01-23 23:01:57 +01:00
parent 29bce6f19f
commit 97b87dee5f
9 changed files with 143 additions and 47 deletions

View file

@ -160,14 +160,18 @@
{% if user is not null %}
{% if user.fullName is not empty %}
(<a href="{{ path('user_info', {"id": user.id}) }}" title="@{{ user.name }}">{{ user.fullName }}</a>)
({{ _self.user_icon(user) }} <a href="{{ path('user_info', {"id": user.id}) }}" title="@{{ user.name }}">{{ user.fullName }}</a>)
{% else %}
(<a href="{{ path('user_info', {"id": user.id}) }}" title="@{{ user.name }}">@{{ user.name }}</a>)
({{ _self.user_icon(user) }} <a href="{{ path('user_info', {"id": user.id}) }}" title="@{{ user.name }}">@{{ user.name }}</a>)
{% endif %}
{% endif %}
{% endif %}
{% endmacro %}
{% macro user_icon(user) %}
<img src="{{ avatar_helper.avatarSmURL(user) }}" class="rounded" style="height: 1.2rem;" alt="User avatar">
{% endmacro %}
{% macro parameters_table(parameters) %}
<table class="table table-hover table-striped table-sm">
<thead>