{% macro usage_link(usage) -%} {% if usage and usage.total %}Used by {{ usage.total }} {{ 'mapping' if usage.total == 1 else 'mappings' }}{% endif %} {%- endmacro %} {% macro mapping_list(usage) -%}
{% for mapping in usage.mappings %}
{{ mapping.name }}
{{ mapping.team }}{% if mapping.not_yet_in_effect %} · not yet in effect{% endif %}{% if mapping.status and mapping.status != 'Current' %} · {{ mapping.status }}{% endif %}{% if mapping.source_number is not none %} · uses V{{ mapping.source_number }} · {{ 'update available' if mapping.update_available else 'up to date' }}{% endif %}{% if mapping.draft_source_number is not none %} · Draft uses V{{ mapping.draft_source_number }}{% endif %}
{% endfor %} {% for group in usage.restricted %}
{{ group.count }} {{ 'mapping' if group.count == 1 else 'mappings' }} you don't have access to
{{ group.team }}
{% endfor %}
{%- endmacro %} {% macro settings(usage) -%} {% if usage and usage.total %}

Used by mappings

Mappings based on this dataset, with the source version they use.

{{ mapping_list(usage) }}
{% endif %} {%- endmacro %} {% macro publication_notice(usage) -%} {% if usage and usage.total %}

{{ usage.total }} {{ 'mapping is' if usage.total == 1 else 'mappings are' }} based on this dataset. Their owners will see that a new version is available.

{{ mapping_list(usage) }}
{% endif %} {%- endmacro %}