{% 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 %} Private datasets can only be accessed by certain users, while public datasets can be accessed by anyone. {% endtrans %}
{% endblock %} {% block package_metadata_fields_protected %}
{% trans %} Searchable datasets can be searched by anyone, while not-searchable datasets can only be accessed by entering directly its URL. {% 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_str', label=_('Allowed Users'), id='field-allowed_users_str', placeholder=_('Allowed Users'), value=h.get_allowed_users_str(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 %}