{% ckan_extends %} {% block content_action %} {{ super() }} {% if h.check_access('package_update', {'id': pkg.id }) %} {{ _('Add resource') }} {% endif %} {# Workflow order for editors: edit, add files, then publish last. One-way on purpose (DOI + Zenodo are permanent) - no matching "Unpublish" button, see blueprints/publish.py. #} {% if pkg.private and pkg.state == 'active' and h.check_access('package_update', {'id': pkg.id }) %} {{ _('Publish') }} {% elif not pkg.private and pkg.state == 'active' and h.check_access('package_update', {'id': pkg.id }) %} {# Takes the Publish button's place once public, so editors don't go looking for it. Links to the DOI once DataCite minted it (ckanext-doi's doi/doi_status fields). Making the dataset private again stays possible via Manage -> Visibility. #} {% if pkg.doi and pkg.doi_status %} {{ _('Published') }} {% else %} {{ _('Published') }} {% endif %} {% endif %} {% if h.check_access('package_show', {'id': pkg.id }) and pkg.resources %} {# Catalogue files are zipped by CKAN; Zenodo files come as Zenodo's own ZIP, straight from Zenodo - never through this server (that's the point of storing them there). Both -> a choice between the two. #} {% set has_uploads = pkg.resources | selectattr('url_type', 'equalto', 'upload') | list %} {% set zenodo_zip = h.fair3r_zenodo_files_archive_url(pkg.id) %} {% if has_uploads and zenodo_zip %} {% elif has_uploads %} {{ _('Download all') }} {% elif zenodo_zip %} {{ _('Download all') }} {% endif %} {% endif %} {% endblock %}