diff --git a/ckanext/kepa/kepa_dataset_schema.yaml b/ckanext/kepa/kepa_dataset_schema.yaml index 0769d70..d01ae64 100644 --- a/ckanext/kepa/kepa_dataset_schema.yaml +++ b/ckanext/kepa/kepa_dataset_schema.yaml @@ -29,8 +29,6 @@ dataset_fields: - value: NotCompleted label: Not Completed - - - field_name: tag_string label: Tags preset: tag_string_autocomplete @@ -52,12 +50,10 @@ dataset_fields: validators: ignore_missing unicode_safe package_version_validator form_placeholder: '1.0' - - field_name: separator display_snippet: separator.html label: Test Separator - - field_name: author label: Author form_placeholder: Joe Bloggs @@ -67,23 +63,40 @@ dataset_fields: label: Organization preset: dataset_organization -- field_name: position_name - label: Position Name - form_placeholder: eg. Head of Department - -- field_name: voice - label: Voice - form_placeholder: eg. +38344 XXX-XXX - -- field_name: author_email - label: Author Email - form_placeholder: joe@example.com - display_property: dc:creator - display_snippet: email.html - display_email_name_field: author - - +- field_name: citation + label: Citation + repeating_subfields: + - field_name: originator + label: Originator + preset: multiple_text + form_blanks: 3 + required: true + - field_name: publication_date + label: Publication Date + preset: date + - field_name: online_linkage + label: Online Linkage + preset: multiple_text + form_blanks: 2 + +- field_name: contact_address + label: Contact Address + repeating_subfields: + - field_name: address + label: Address + required: true + - field_name: city + label: City + - field_name: state + label: State + - field_name: postal_code + label: Postal Code + - field_name: country + label: Country +- field_name: separator + display_snippet: separator.html + label: Test Separator - field_name: maintainer @@ -98,7 +111,6 @@ dataset_fields: display_snippet: email.html display_email_name_field: maintainer - - field_name : spatial label: Spatial form_placeholder : {\"type\": \"Point\", \"coordinates\": [8.609762390208658, 47.40381297881529]} diff --git a/ckanext/kepa/templates/package/read.html b/ckanext/kepa/templates/package/read.html new file mode 100644 index 0000000..94e1ca8 --- /dev/null +++ b/ckanext/kepa/templates/package/read.html @@ -0,0 +1,11 @@ +{# Adds dataset-extent map to dataset-page #} +{% ckan_extends %} +{% block package_description %} + {{ super() }} + {# We include a filed "spatial" through ckanext-scheming. It is not in "extras" #} + {# AS set pkg = c.pkg_dict is in template this change is made: c.pkg_dict['spatial'] -> pkg.spatial #} + {% set dataset_extent = pkg.spatial %} + {% if dataset_extent and dataset_extent != "{}" %} + {% snippet "spatial/snippets/dataset_map.html", extent=dataset_extent %} + {% endif %} +{% endblock %} \ No newline at end of file