{% extends "base.html" %} {% from "components.html" import feedback, form_field, readonly_field %} {% from "components/side_panel.html" import panel_form_actions %} {% from "components/mapping_update.html" import counts, warning, transition %} {% from "components/mapping_usage.html" import publication_notice %} {% block title %}Publish version · REFRNCR{% endblock %} {% block content %}

Publish version

{{ feedback(error, id='publication-error', focus=true) }} {{ publication_notice(mapping_usage) }} {% if mapping_source %}

{{ transition(mapping_source) }}

{{ counts(mapping_source) }}{{ warning(mapping_source) }}{% endif %} {% if review_available %}

Review & publish

{% endif %} {% if review %}{% set revision, number, content, summary = review %} {{ readonly_field('Next version', 'Version ' ~ number) }} {{ readonly_field('Dataset', content.name) }}

{{ content.fields|length }} {{ 'field' if content.fields|length == 1 else 'fields' }} and {{ content.records|length }} {{ 'record' if content.records|length == 1 else 'records' }}.

Fields
{{ summary.fields_added }} added · {{ summary.fields_changed }} changed · {{ summary.fields_removed }} removed
Records
{{ summary.records_added }} added · {{ summary.records_changed }} changed · {{ summary.records_removed }} removed
{% set date_help = 'On or after ' ~ (minimum_date|short_date) ~ ', the effective date of ' ~ mapping_source.name ~ ' V' ~ mapping_source.number ~ '.' if mapping_source and minimum_date == mapping_source.effective_date else 'On or after ' ~ (minimum_date|short_date) ~ '. The effective date of ' ~ mapping_source.name ~ ' V' ~ mapping_source.number ~ ' is ' ~ (mapping_source.effective_date|short_date) ~ '.' if mapping_source else 'Choose today or a future day. Calendar dates use UTC.' %} {{ form_field('Effective date', 'effective_date', 'publication-date', type='date', required=true, value=effective_date, min_value=minimum_date, help_text=date_help, error_id='publication-error' if error else none) }} {{ form_field('Release note (optional)', 'release_note', 'publication-note', control='textarea', value=release_note, max_length=2000, help_text='Up to 2,000 characters.', error_id='publication-error' if error else none) }} {{ form_field('I reviewed this version and confirm publication.', 'confirmed', 'publication-confirmed', type='checkbox', required=true, value='yes', error_id='publication-error' if error else none) }}
{% endif %}
{% call panel_form_actions() %} Cancel {% if review %}{% endif %} {% endcall %}
{% endblock %}