diff --git a/templates/macros/widgets.html.twig b/templates/macros/widgets.html.twig
index 5c6d3524..8bc34a40 100644
--- a/templates/macros/widgets.html.twig
+++ b/templates/macros/widgets.html.twig
@@ -432,26 +432,27 @@
{% endif %}
{% for team in teams|sort((a, b) => a.name <=> b.name) %}
+ {% set users = team.users|filter(u => u.enabled) %}
+ {% set userTeamCount = users|length %}
|
{{ team.name }}
|
- {% set userTeamCount = team.users|length %}
{{ macro.user_avatar(team.teamlead, ('label.teamlead'|trans ~ ': ' ~ team.teamlead.displayName), 'teamlead') }}
{% set teamHiddenId = 'team_' ~ team.id ~ '_hiddenUser' ~ random() %}
{% set counter = 0 %}
- {% for user in team.users %}
+ {% for user in users %}
{% if user != team.teamlead %}
{{ macro.user_avatar(user) }}
{% set counter = counter + 1 %}
{% endif %}
- {% if userTeamCount > 5 and counter == 4 and not loop.last %}
+ {% if userTeamCount > 5 and counter == 4 and loop.index != userTeamCount %}
{{ 'label.plus_more'|trans({'%count%': (userTeamCount - 5)}) }}
{% set counter = counter + 1 %}
{% endif %}
- {% if userTeamCount > 5 and counter != 4 and loop.last %}
+ {% if userTeamCount > 5 and counter != 4 and loop.index == userTeamCount %}
{% endif %}
{% endfor %}
diff --git a/templates/widget/widget-userteamprojects.html.twig b/templates/widget/widget-userteamprojects.html.twig
index 9bc13041..609bf75f 100644
--- a/templates/widget/widget-userteamprojects.html.twig
+++ b/templates/widget/widget-userteamprojects.html.twig
@@ -18,8 +18,8 @@
|
{% for stats in projectStats|sort((a, b) => a.project.name <=> b.project.name) %}
{% set project = stats.project %}
-
- |
+ |
+
{{ widgets.label_project(stats.project) }}
{{ widgets.label_customer(stats.project.customer) }}
|