Skip to content

Commit

Permalink
Merge pull request #10 from keitaroinc/shema-update
Browse files Browse the repository at this point in the history
Shema update
  • Loading branch information
blagojabozinovski authored Dec 26, 2023
2 parents f74f079 + 44e43ea commit ba1dbc6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 21 deletions.
54 changes: 33 additions & 21 deletions ckanext/kepa/kepa_dataset_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ dataset_fields:
- value: NotCompleted
label: Not Completed



- field_name: tag_string
label: Tags
preset: tag_string_autocomplete
Expand All @@ -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
Expand All @@ -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: [email protected]
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
Expand All @@ -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]}
Expand Down
11 changes: 11 additions & 0 deletions ckanext/kepa/templates/package/read.html
Original file line number Diff line number Diff line change
@@ -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 %}

0 comments on commit ba1dbc6

Please sign in to comment.