{% ckan_extends %} {% block package_basic_fields_org %} {% resource 'privatedatasets/allowed_users.js' %} {# if we have a default group then this wants remembering #} {% if data.group_id %} {% endif %} {% set dataset_is_draft = data.get('state', 'draft').startswith('draft') or data.get('state', 'none') == 'none' %} {% set dataset_has_organization = data.owner_org or data.group_id %} {% set organizations_available = h.organizations_available('create_dataset') %} {% set user_is_sysadmin = h.check_access('sysadmin') %} {% set show_organizations_selector = organizations_available and (user_is_sysadmin or dataset_is_draft) %} {% if show_organizations_selector and show_visibility_selector %}
{% endif %} {% if show_organizations_selector %} {% set existing_org = data.owner_org or data.group_id %}
{% endif %} {% block package_metadata_fields_visibility %}
{% trans %} If private, the dataset will be only accesible to certain users. Otherwise, everyone will be able to access the dataset. {% endtrans %}
{% endblock %} {% block package_metadata_fields_protected %}
{% trans %} When true, the dataset will be shown in search. Otherwise, it will only be accesible entering its URL directly. {% endtrans %}
{% endblock %} {% if show_organizations_selector and show_visibility_selector %}
{% endif %} {% set users_attrs = {'data-module': 'autocomplete', 'data-module-tags': '', 'data-module-source': '/api/2/util/user/autocomplete?q=?'} %} {{ form.input('allowed_users', label=_('Allowed Users'), id='field-allowed_users', placeholder=_('Allowed Users'), value=data.allowed_users, error=errors.custom_text, classes=['control-full'], attrs=users_attrs) }} {{ form.input('adquire_url', label=_('Adquire URL'), id='field-adquire_url', placeholder=_('http://example.com/adquire/'), value=data.adquire_url, error=errors.custom_text, classes=['control-medium']) }} {% if data.id and h.check_access('package_delete', {'id': data.id}) and data.state != 'active' %}
{% endif %} {% endblock %}