{% import "macros/widgets.html.twig" as widgets %} {% set teams = data %} {% set title = options.title|default('label.my_teams') %} {% set widgetId = options.id %} {% if teams|length > 0 %}
{{ 'label.team'|trans }} | {{ 'label.teamlead'|trans }} | {{ 'label.user'|trans }} |
---|---|---|
{{ team.name }} | {{ widgets.user_avatar(team.teamlead) }} | {% set userTeamCount = team.users|length %} {% for user in team.users %} {% set teamHiddenId = widgetId ~ '_' ~ team.id ~ '_hiddenUser' %} {{ widgets.user_avatar(user) }} {% if userTeamCount > 5 and loop.index == 5 and not loop.last %} {{ 'label.plus_more'|trans({'%count%': (userTeamCount - 5)}) }} {% endif %} {% if userTeamCount > 5 and loop.index != 5 and loop.last %} {% endif %} {% endfor %} |