{% load i18n thumbnail cosinnus_tags static %} {% load endless %} {% lazy_paginate 20 rows %} {% for group, members, pendings, admins, invited in rows %} {% group_url 'cosinnus:group-dashboard' group=group as group_url %} {% comment %} Microsite is not being linked to for now {% if user.pk in members or user.pk in admins or group.public %} {% group_url 'cosinnus:group-dashboard' group=group as group_url %} {% else %} {% group_url 'cosinnus:group-microsite' group=group as group_url %} {% endif %} {% endcomment %}
{% if group.description and group.description|length > 0 %}
{{ group.description|textfield }}
{% endif %} {% if group.is_active %} {% if user.is_authenticated and not user.pk in invited %} {% captureas modal_id %}groupModal_{{group.slug}}{% endcaptureas %} {% endif %} {% if user.is_authenticated and user.pk in admins %} {% endif %} {% if group.public or user.pk in members or user|is_superuser or user.pk in invited and SETTINGS.COSINNUS_MICROSITES_ENABLED %} {% endif %} {% if user.pk in invited %} {# Hacky green color #} {% captureas modal_decline_invitation_id %}userModal_decline_invitation_{{group.id}}{% endcaptureas %} {# hidden form, triggered by accept-button JS #} {% captureas label %}{% blocktrans %}Do you really want to decline the invitation?{% endblocktrans %}{% endcaptureas %} {% captureas title %}{% trans "Decline Invitation" %}{% endcaptureas %} {% captureas action %}{% group_url 'cosinnus:group-user-decline' group=group %}{% endcaptureas %} {% include "cosinnus/modal_box.html" with id=modal_decline_invitation_id label=label title=title form_action=action %} {% endif %} {% if user.pk in admins or user|is_superuser %} {% endif %} {% include 'cosinnus/feedback/report_button_btn.html' with object=group %} {% else %} {% comment %} --- Group inactive --- {% endcomment %} {% if user|is_superuser or user.pk in admins %} {% endif %} {% endif %}
{% if user.is_authenticated %} {% if user.pk in members %} {% captureas label %}{% blocktrans with title=group.name %}Do you really want to leave „{{ title }}“?{% endblocktrans %}{% endcaptureas %} {% captureas title %}{% trans "Leave" %}{% endcaptureas %} {% captureas action %}{% group_url 'cosinnus:group-user-leave' group=group %}{% endcaptureas %} {% elif user.pk in pendings %} {% captureas label %}{% blocktrans with title=group.name %}Do you really want to withdraw your join request to „{{ title }}“?{% endblocktrans %}{% endcaptureas %} {% captureas title %}{% trans "Withdraw Join Request" %}{% endcaptureas %} {% captureas action %}{% group_url 'cosinnus:group-user-withdraw' group=group %}{% endcaptureas %} {% else %} {% captureas label %}{% blocktrans with title=group.name %}Do you wish to request to join „{{ title }}“?{% endblocktrans %}{% endcaptureas %} {% captureas title %}{% trans "Join" %}{% endcaptureas %} {% captureas action %}{% group_url 'cosinnus:group-user-join' group=group %}{% endcaptureas %} {% endif %} {% include "cosinnus/modal_box.html" with id=modal_id label=label title=title form_action=action %} {% endif %} {% empty %} {% if group_type == 1 %} {% trans "There are no groups." as no_group_message %} {% elif group_type == 0 %} {% trans "There are no projects." as no_group_message %} {% else %} {% trans "There are no invitations." as no_group_message %} {% endif %} {% include 'cosinnus/common/empty_button.html' with message=no_group_message %} {% endfor %} {% show_more %}