{% extends "package/read_base.html" %} {% import 'macros/form.html' as form %} {% block primary_content_inner %}

{{ _('Groups') }}

{% if c.group_dropdown %} {# ADDED BY FRANCESCO MANGIACRAPA, related to TASK #5196 #} {% if c.userobj %} {% set username_id = c.userobj.id %} {% set whereAdmin = [] %} {% for option in c.group_dropdown %} {% set role_for_user = h.d4science_theme_get_user_role_for_group_or_org(option[0], username_id) %} {% if role_for_user and role_for_user == 'admin' %} {% do whereAdmin.append(option) %} {% else %} {# SYSADMIN #} {% if c.userobj.sysadmin %} {% do whereAdmin.append(option) %} {% endif %} {% endif %} {% endfor %} {% if whereAdmin %}
{% endif %} {% endif %} {% endif %} {% if c.pkg_dict.groups %}
{% snippet 'group/snippets/group_list_simple.html', groups=c.pkg_dict.groups %}
{% else %}

{{ _('There are no groups associated with this dataset') }}

{% endif %} {% endblock %}