{% ckan_extends %}

{% block package_notes %}
  {%- if not dataset_type -%}
    <p>
    dataset_type not passed to template. your version of CKAN
    might not be compatible with ckanext-scheming
    </p>
  {%- endif -%}
  {% if pkg.notes %}
    <div class="notes embedded-content">
      {{ h.render_markdown(h.get_translated(pkg, 'notes')) }}
    </div>
  {% endif %}
{% endblock %}

{% block content_action %}
  {% if h.check_access('service_permission_application_create', {})
     and h.is_extension_loaded('apply_permissions_for_service')
     and not h.check_access('package_update', {'id':pkg.id }) %}
    {% snippet 'apply_permissions_for_service/snippets/request_access_button.html', subsystem_id=pkg.name %}
  {% endif %}
  {{ super() }}
{% endblock %}

{% block package_additional_info %}
  {%- set include_fields = [
      'validSince',
      'validUntil',
      'shared_resource',
      'url',
      'maintainer',
      'maintainer_email',
      'maintainer_phone',
      'xroad_instance',
      'xroad_memberclass',
      'xroad_membercode',
      'xroad_subsystemcode'
      ] -%}
  {% snippet "scheming/package/snippets/additional_info.html",
  pkg_dict=pkg, dataset_type=dataset_type, schema=schema, include_fields=include_fields %}
{% endblock %}

{% ckan_extends %}

{% block package_notes %}
  {%- if not dataset_type -%}
    <p>
    dataset_type not passed to template. your version of CKAN
    might not be compatible with ckanext-scheming
    </p>
  {%- endif -%}
  {% if pkg.notes %}
    <div class="notes embedded-content">
      {{ h.render_markdown(h.get_translated(pkg, 'notes')) }}
    </div>
  {% endif %}
{% endblock %}

{% block content_action %}
  {% if h.is_extension_loaded('apply_permissions_for_service')
     and h.check_access('service_permission_application_create', {})
     and not h.check_access('package_update', {'id':pkg.id }) %}
    {% snippet 'apply_permissions_for_service/snippets/request_access_button.html', subsystem_id=pkg.name %}
  {% endif %}
  {{ super() }}
{% endblock %}

{% block package_additional_info %}
  {%- set include_fields = [
      'validSince',
      'validUntil',
      'shared_resource',
      'url',
      'maintainer',
      'maintainer_email',
      'maintainer_phone',
      'xroad_instance',
      'xroad_memberclass',
      'xroad_membercode',
      'xroad_subsystemcode'
      ] -%}
  {% snippet "scheming/package/snippets/additional_info.html",
  pkg_dict=pkg, dataset_type=dataset_type, schema=schema, include_fields=include_fields %}
{% endblock %}

Reorder checks if the plugin is not loaded
Reorder checks if the plugin is not loaded
