{% regroup active_memberships by roles as memberships_per_role %}
{% for role in roles %}
{{ role }} {% if role.weirole %}(Pour le WEI){% endif %} {% if role.for_club %}(Pour le club {{ role.for_club }} uniquement){% endif %}
{% if role.clubs %}
{% trans "Own this role in the clubs" %} {{ role.clubs|join:", " }}
{% endif %}
{% for permission in role.permissions.all %}
{{ permission }} ({{ permission.type }} {{ permission.model }}{% if permission.permanent %}, {% trans "permanent" %}{% endif %})
{% empty %}
{% trans "No associated permission" %}
{% endfor %}