{# Shown near the top of the dataset read page when the dataset is missing a publisher and/or contact-point actor link -- lets an editor fix it right there, with the same picker/quick-create controls as the dataset edit form (compact=true here: no field-level/DCAT help text, per Björn's request 2026-09-15 -- that belongs in the advanced edit view, not this quick-fix prompt: "Det ska man ha koll på om man är inne i denna avancerade vy."). #} {#- Follows the schema: a field that is not in the schema is never missing, and an empty publisher only counts when the schema requires one (without one, the organization is the publisher in the DCAT export). -#} {% set schema = h.scheming_get_dataset_schema(pkg.type) %} {% set publisher_field = h.scheming_field_by_name(schema.dataset_fields, 'publisher_actor_id') if schema else none %} {% set contact_field = h.scheming_field_by_name(schema.dataset_fields, 'contact_point_ids') if schema else none %} {% set missing_publisher = publisher_field and h.scheming_field_required(publisher_field) and not pkg.publisher_actor_id %} {% set missing_contact = contact_field and not pkg.contact_point_ids %} {% if missing_publisher or missing_contact %}
{% if missing_publisher and missing_contact %}{{ _('Publisher and contact point missing.') }}{% elif missing_publisher %}{{ _('Publisher missing.') }}{% else %}{{ _('Contact point missing.') }}{% endif %} {% if h.check_access('package_update', {'id': pkg.id}) %}
{{ h.csrf_input() }} {% if missing_publisher %} {% snippet 'scheming/form_snippets/actors_multiple_select.html', field=publisher_field, data={}, errors={}, compact=true %} {% endif %} {% if missing_contact %} {% snippet 'scheming/form_snippets/contactpoints_multiple_select.html', field=contact_field, data={}, errors={}, compact=true %} {% endif %}
{% else %} {{ _('Log in with permission to edit the dataset to add what is missing.') }} {% endif %}
{% endif %}