{% extends 'package/snippets/resource_form.html' %} {% block errors %} {%- if errors -%} {%- set schema = h.scheming_get_dataset_schema(dataset_type) -%} {%- snippet 'scheming/snippets/errors.html', errors=errors, fields=schema.resource_fields, entity_type='dataset', object_type=dataset_type -%} {%- endif -%} {% endblock %} {% block basic_fields %} {%- if not dataset_type -%}

dataset_type not passed to template. your version of CKAN might not be compatible with ckanext-scheming

{%- endif -%} {%- set schema = h.scheming_get_dataset_schema(dataset_type) -%} {%- if dataset_type == 'service' -%}

This is a service!

{%- snippet 'snippets/resource_fields.html', resource_type='deployment', schema=schema, dataset_type=dataset_type, data=data, errors=errors -%} {%- snippet 'snippets/resource_fields.html', resource_type='configuration', schema=schema, dataset_type=dataset_type, data=data, errors=errors -%} {%- snippet 'snippets/resource_fields.html', resource_type='readme', schema=schema, dataset_type=dataset_type, data=data, errors=errors -%} {%- endif -%} {%- if dataset_type == 'application' -%}

This is an application!

{%- snippet 'snippets/resource_fields.html', resource_type='Deployment file (docker-compose.xml) - mandatory', schema=schema, dataset_type=dataset_type, data=data, errors=errors -%} {%- snippet 'snippets/resource_fields.html', resource_type='Configuration file (.env) - optional', schema=schema, dataset_type=dataset_type, data=data, errors=errors -%} {%- snippet 'snippets/resource_fields.html', resource_type='Routing (.xml) - optional', schema=schema, dataset_type=dataset_type, data=data, errors=errors -%} {%- endif -%} {%- if dataset_type == 'dataset' -%}

This is a dataset!

{%- snippet 'snippets/resource_fields.html', resource_type='resource', schema=schema, dataset_type=dataset_type, data=data, errors=errors -%} {%- endif -%} {% endblock %} {% block again_button %} {%- if dataset_type == 'dataset' -%} {{ super() }} {%- endif -%} {% endblock %} {% block metadata_fields %} {%- if dataset_type == 'dataset' -%} {{ super() }} {%- endif -%} {% endblock %}