{% extends "package/edit_base.html" %} {% block subtitle -%} {{- ui.subtitle_item(_('Edit Collaborator') if user else _('Add Collaborator')) }} {{- super() }} {%- endblock %} {%- block content_action -%} {{ ui.content_action(_('Back to all collaborators'), href=h.url_for('dataset.collaborators_read', id=pkg_dict.name), icon="chevron-left") }} {{ super() }} {%- endblock %} {% block primary_content_inner %} {%- call ui.util.call(ui.section, title=_('Edit Collaborator') if user else _('Add Collaborator'), level=1) -%} {% block form %} {%- call ui.util.call(ui.form, method="POST") -%} {{ ui.input(name="username", label=_("User"), value=user.name if user else "", required=true, attrs={"readonly": ""} if user else {}) }} {{ ui.select(name='capacity', label=_('Role'), options=capacities, selected=user_capacity) }} {%- call ui.util.call(ui.form_actions) -%} {% if user %} {{ ui.button(_('Delete'), href=h.url_for('dataset.collaborator_delete', id=pkg_dict.id, user_id=user.name), style="danger", data={"module": "confirm-action", "module-content": _('Are you sure you want to delete this collaborator?')}) }} {{ ui.button(_('Update Collaborator'), type="submit") }} {% else %} {{ ui.button(_('Add Collaborator'), type="submit") }} {% endif %} {%- endcall %} {%- endcall %} {% endblock %} {%- endcall %} {% endblock %} {% block secondary_content %} {{ super() }} {%- call ui.util.call(ui.sidebar_section, title=_('What are the available roles?'), _extra_class="nsw-m-top-xs") -%} {% if h.check_config_permission('allow_admin_collaborators') %} {% trans %}
Admin: In addition to managing the dataset, admins can add and remove collaborators from a dataset.
{% endtrans %} {% endif %} {% trans %}Editor: Editors can edit the dataset and its resources, as well accessing the dataset if private.
Member: Members can access the dataset if private, but not edit it.
{% endtrans %} {%- endcall %} {% endblock %}