{% extends "package/edit_base.html" %} {% import 'macros/form.html' as form %} {% block subtitle %}{{ _('Edit Collaborator') if user else _('Add Collaborator') }} - {{ super() }}{% endblock %} {% block primary_content_inner %} {% link_for _('Back to all collaborators'), named_route='dataset.collaborators_read', id=pkg_dict.name, class_='btn btn-default pull-right', icon='arrow-left' %}

{% block page_heading %}{{ _('Edit Collaborator') if user else _('Add Collaborator') }}{% endblock %}

{% block form %}
{{ h.csrf_input() }}
{% if not user %}

{{ _('If you wish to add an existing user, search for their username below.') }}

{% endif %}
{% if user %} {% else %} {% endif %}
{% set format_attrs = {'data-module': 'autocomplete'} %} {{ form.select('capacity', label=_('Role'), options=capacities, selected=user_capacity, error='', attrs=format_attrs) }}
{% if user %} {{ _('Delete') }} {% else %} {% endif %}
{% endblock %} {% endblock %} {% block secondary_content %} {{ super() }}

{{ _('What are the available roles?') }}

{% 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 %}
{% endblock %}