{% extends "organization/edit_base.html" %} {% set dataset_type = h.default_package_type() %} {% set default_collapsed = h.default_collapse_facets() %} {% block subtitle -%} {{ ui.subtitle_item(h.humanize_entity_type('package', dataset_type, 'edit label') or _('Edit Datasets')) }} {{- super() }} {%- endblock %} {% block breadcrumb_content_inner -%} {{ ui.breadcrumb(organization.display_name|truncate(35), href=h.url_for(group_type+'.read', id=organization.name, attrs={"title": organization.display_name})) }} {{- ui.breadcrumb(_('Edit datasets'), href=h.url_for(group_type+'.bulk_process', id=organization.name, attrs={"title": organization.display_name}), active=true) }} {%- endblock %} {% block page_primary_action -%} {{ ui.page_action(h.humanize_entity_type('package', dataset_type, 'add link') or _("Add Dataset"), href=h.url_for(dataset_type ~ '.new', group=group_dict.id), icon="plus-square") }} {%- endblock %} {% block primary_content_inner %} {{ ui.heading(h.humanize_entity_type('package', dataset_type, 'edit label') or _('Edit Datasets'), level=1) }}
{% block search_form %} {% set sorting = [ (_('Name Ascending'), 'title_string asc'), (_('Name Descending'), 'title_string desc'), (_('Last Modified'), 'metadata_modified desc') ] %} {% snippet 'snippets/search_form.html', form_id='organization-datasets-search-form', type=dataset_type, query=q, count=page.item_count, sorting=sorting, sorting_selected=sort_by_selected, no_title=true, search_class=' ' %} {% endblock %} {% block form %} {% if page.item_count %} {%- call ui.util.call(ui.form, method="POST", data={"module": "basic-form"}) -%} {% for package in packages %} {% set title = package.title or package.name %} {% set notes = h.markdown_extract(package.notes, extract_length=180) %} {% endfor %}
{%- call ui.util.call(ui.button_group) -%} {{ ui.button(_('Make public'), style="secondary", icon="eye", type="submit", attrs={"name": "bulk_action.public", "value": "public"}) }} {{ ui.button(_('Make private'), style="secondary", icon="eye-slash", type="submit", attrs={"name": "bulk_action.private", "value": "private"}) }} {%- endcall %} {%- call ui.util.call(ui.button_group) -%} {{ ui.button(_('Make public'), style="danger", icon="times", type="submit", attrs={"name": "bulk_action.delete", "value": "delete"}) }} {%- endcall %}
{{ _('Edit') }}

{{ title|truncate(80) }} {% if package.get('state', '').startswith('draft') %} {{ _('Draft') }} {% elif package.get('state', '').startswith('deleted') %} {{ _('Deleted') }} {% endif %} {% if package.private %} {{ _('Private') }} {% endif %}

{% if notes %}

{{ notes|urlize }}

{% endif %}
{%- endcall %} {% else %} {{ ui.empty(_('This organization has no datasets associated to it')) }} {% endif %} {% endblock %}
{{ ui.pagination(page=page.page, total=page.last_page) }} {% endblock %} {% block secondary_content %} {{ super() }} {%- with use_htmx=false -%} {% include 'package/snippets/search_facets.html' %} {%- endwith %} {% endblock %}