{# Group edition page. Displays the group edition or creation form. :param edited_group: :data:`None` in a creation context. In edition context this is the edited group. :type edited_group: :class:`~canaille.core.models.Group` :param form: The group edition/creation form. :type form: :class:`~canaille.core.endpoints.forms.CreateGroupForm` or :class:`~canaille.core.endpoints.forms.EditGroupForm` #} {% extends theme('base.html') %} {% import 'macro/form.html' as fui %} {% import "macro/table.html" as table %} {%- block title -%} {% if not edited_group %} {%- trans %}Group creation{% endtrans -%} {% else %} {%- trans %}Group edition{% endtrans -%} {% endif %} {%- endblock -%} {% block submenu %} {% trans %}View{% endtrans %} {% trans %}Add{% endtrans %} {% endblock %} {% block content %}

{% if not edited_group %} {% trans %}Group creation{% endtrans %} {% else %} {% trans %}Group edition{% endtrans %} {% endif %}
{% if not edited_group %} {% trans %}Create a new group{% endtrans %} {% else %} {% trans %}Edit information about a group{% endtrans %} {% endif %}

{% call fui.render_form(form) %} {{ fui.render_field(form.display_name) }} {{ fui.render_field(form.description) }} {% if not edited_group %}
{% trans %}Because group cannot be empty, you will be added to the group. You can remove you later by editing your profile when you will have added other members to the group.{% endtrans %}
{% endif %}
{% if edited_group %} {% endif %}
{% endcall %}
{% if edited_group %}

{% trans %}Group members{% endtrans %}

{{ table.search(table_form, "table.users") }}
{% include "core/partial/group-members.html" %} {% endif %} {% endblock %}