{% extends 'base.html.twig' %} {% block title %}Communautés - Na+{% endblock %} {% block body %}

Communautés

+ Créer une communauté
{# ===== MES COMMUNAUTÉS ===== #} {% if joined|length > 0 %}

Mes communautés ({{ joined|length }})

{% for community in joined %}
{% if community.avatarPath %} {% else %}
{{ community.name|first|upper }}
{% endif %}
{{ community.name }}
{% if community.description %}
{{ community.description }}
{% endif %}
{{ community.acceptedMembersCount }} membre(s) {% if community.founder == app.user %} · Fondateur{% endif %}
Fil Gérer
{% endfor %}
{% endif %} {# ===== DÉCOUVRIR ===== #}

Découvrir ({{ available|length }})

{% if available|length == 0 %}

Tu as rejoint toutes les communautés disponibles !

{% else %}
{% for community in available %} {% set isPendingInvite = community.id in pendingIds %}
{% if community.avatarPath %} {% else %}
{{ community.name|first|upper }}
{% endif %}
{{ community.name }}
{% if community.description %}
{{ community.description }}
{% endif %}
{{ community.acceptedMembersCount }} membre(s) · Fondateur : {{ community.founder.displayName }}
{# Boutons selon le statut #} {% if isPendingInvite %} {# Invitation reçue du fondateur → Accepter / Refuser #}
{% else %} {# Pas d'invitation → demande standard #} {% endif %}
{% endfor %}
{% endif %}
{% endblock %}