{% extends 'layout/base.html.twig' %} {% set i18n_prefix = _self|i18n_prefix %} {# User logged? #} {% set logged = is_granted('IS_AUTHENTICATED_REMEMBERED') %} {# Is the group public? #} {% set is_public = group.type.isPublic %} {# Get the current status of the user for the current group #} {% set group_membership = logged ? app.user.getGroupMembership(group) : null %} {% set has_group_membership = group_membership != null %} {# Can we display the show members button? #} {% set display_show_members_button = is_public or (has_group_membership and group_membership.membership.isConfirmed) %} {% block body %}
{% include 'components/layout/_title_3.html.twig' with { name: group.name } %}
{% set pill_bg = group.type.isPublic() ? 'text-primary text-bg-blue-custom' : 'text-bg-secondary' %} {{ group.type.value|trans }}
{% include 'components/layout/_text.html.twig' with { text: group.description } %} {# 1. logged but not member and no pending invitaton #} {% if logged and not has_group_membership %} {% include 'pages/group/show/_logged_without_link.html.twig' %} {# 2. logged and has a link with the group #} {% elseif logged and has_group_membership %} {% include 'pages/group/show/_logged_with_link.html.twig' %} {# 3. not logged, display the link to login and come back to this page #} {% else %}

{{ (i18n_prefix ~ '.login_text')|trans }}

{% endif %} {% if display_show_members_button %}
{{ (i18n_prefix ~ '.show_members')|trans }}
{% endif %}
{% endblock %} {% block link %}{% endblock %}