{% extends '@ChillMain/layout.html.twig' %} {% block css %} {{ parent() }} {{ encore_entry_link_tags('mod_pickentity_type') }} {% endblock %} {% block js %} {{ parent() }} {{ encore_entry_script_tags('mod_pickentity_type') }} {% endblock %} {% block title 'user_group.my_groups'|trans %} {% block content %}

{{ block('title') }}

{% if paginator.totalItems == 0 %}

{{ 'user_group.no_user_groups'|trans }}

{% else %}
{% for entity in groups %}
{{ entity|chill_entity_render_box }}
{%- if not entity.active -%}
{{ 'user_group.inactive'|trans }}
  {%- endif -%}
{{ 'user_group.with_count_users'|trans({'count': entity.users|length}) }}
{{ 'user_group.with_users'|trans }}
{% if entity.users.contains(app.user) %} {% if is_granted('CHILL_MAIN_USER_GROUP_APPEND_TO_GROUP', entity) %}

{{ 'user_group.me'|trans }}

{% else %}

{% if entity.users|length > 1 %}{{ 'user_group.me_and'|trans }}{% else %}{{ 'user_group.me_only'|trans }}{% endif %}

{% endif %} {% endif %} {% for user in entity.userListByLabelAscending %} {% if user is not same as app.user %} {% if is_granted('CHILL_MAIN_USER_GROUP_APPEND_TO_GROUP', entity) %}

{{ user|chill_entity_render_box }}

{% else %}

{{ user|chill_entity_render_box }}

{% endif %} {% endif %} {% endfor %}
{% if entity.adminUsers|length > 0 %}
{{ 'user_group.adminUsers'|trans }}
{% if entity.adminUsers.contains(app.user) %}

{% if entity.adminUsers|length > 1 %}{{ 'user_group.me_and'|trans }}{% else %}{{ 'user_group.me_only'|trans }}{% endif %}

{% endif %} {% for user in entity.adminUserListByLabelAscending %} {% if user is not same as app.user %}

{{ user|chill_entity_render_box }}

{% endif %} {% endfor %}
{% endif -%} {%- set form = forms.offsetGet(entity) %} {%- if form is not null -%}
  • {{- form_start(form) -}} {{- form_widget(form.users) -}} {{- form_end(form) -}}
{%- endif %}
{% endfor %}
{{ chill_pagination(paginator) }} {% endif %} {% endblock %}