From 37236ec10ad44197ed396afaa327cb5b01f9272c Mon Sep 17 00:00:00 2001 From: Ian Ward Date: Thu, 27 Jun 2024 18:38:03 -0400 Subject: [PATCH] update fluent_scheming.yaml example schema --- ckanext/fluent/fluent_scheming.json | 47 ---------------- ckanext/fluent/fluent_scheming.yaml | 86 +++++++++++++++++++++++++++++ ckanext/fluent/presets.json | 4 +- 3 files changed, 88 insertions(+), 49 deletions(-) delete mode 100644 ckanext/fluent/fluent_scheming.json create mode 100644 ckanext/fluent/fluent_scheming.yaml diff --git a/ckanext/fluent/fluent_scheming.json b/ckanext/fluent/fluent_scheming.json deleted file mode 100644 index 5ea36ee..0000000 --- a/ckanext/fluent/fluent_scheming.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "scheming_version": 1, - "dataset_type": "fluent-test", - "about_url": "http://github.com/open-data/ckanext-fluent", - "form_languages": ["en", "fr"], - "dataset_fields": [ - { - "field_name": "title", - "label": { - "en": "Title", - "fr": "Titre"}, - "preset": "title", - "form_placeholder": "eg. Yellow Submarine" - }, - { - "field_name": "name", - "label": "URL", - "preset": "dataset_slug", - "form_placeholder": "eg. yellow-submarine" - }, - { - "field_name": "books", - "label": { - "en": "Books", - "fr": "Livres"}, - "preset": "fluent_text", - "required": true - }, - { - "field_name": "keywords", - "label": { - "en": "Keywords", - "fr": "Mots-cl\u00e9s" - }, - "form_languages": ["en", "fr", "es"], - "preset": "fluent_tags", - "required": true - } - ], - "resource_fields": [ - { - "field_name": "url", - "label": "URL", - "preset": "resource_url_upload" - } - ] -} diff --git a/ckanext/fluent/fluent_scheming.yaml b/ckanext/fluent/fluent_scheming.yaml new file mode 100644 index 0000000..39ee5c0 --- /dev/null +++ b/ckanext/fluent/fluent_scheming.yaml @@ -0,0 +1,86 @@ +scheming_version: 1 +dataset_type: fluent-test +about_url: http://github.com/open-data/ckanext-fluent +form_languages: [en, fr] +dataset_fields: + - field_name: title_translated + label: + en: Title + fr: Titre + fluent_form_label: + en: + en: Title (English) + fr: Titre (anglais) + fr: + en: Title (French) + fr: Titre (français) + fluent_help_text: + en: + en: The English name by which the dataset is known + fr: Nom anglais désignant le jeu de données + fr: + en: The French name by which the dataset is known + fr: Nom français désignant le jeu de données + preset: fluent_core_translated + required: true + + - field_name: name + label: URL + preset: dataset_slug + + - field_name: owner_org + label: Organization + preset: dataset_organization + + - field_name: notes_translated + label: + en: Description + fr: Description + fluent_form_label: + en: + en: Description (English) + fr: Description (anglais) + fr: + en: Description (French) + fr: Description (français) + fluent_help_text: + en: + en: "An account of the dataset, in English. A description may include but is not limited to: an abstract, a table of contents, or a free-text account of the resource." + fr: Description du jeu de données, en anglais. La description peut comprendre un résumé, une table des matières ou un texte libre. + fr: + en: "An account of the dataset, in French. A description may include but is not limited to: an abstract, a table of contents, or a free-text account of the resource." + fr: Description du jeu de données, en anglais. La description peut comprendre un résumé, une table des matières ou un texte libre. + + preset: fluent_core_translated + + - field_name: keywords + label: + en: Keywords + fr: Mots-clés + preset: fluent_tags + required: true + +resource_fields: + - field_name: url + label: URL + preset: resource_url_upload + + - field_name: name_translated + label: + en: Title + fr: Titre + fluent_form_label: + en: + en: Title (English) + fr: Titre (anglais) + fr: + en: Title (French) + fr: Titre (français) + fluent_help_text: + en: + en: An English name given to the resource. + fr: Nom anglais attribué à la ressource + fr: + en: A French name given to the resource. + fr: Nom français attribué à la ressource + preset: fluent_core_translated diff --git a/ckanext/fluent/presets.json b/ckanext/fluent/presets.json index 9d93ea9..885fe5f 100644 --- a/ckanext/fluent/presets.json +++ b/ckanext/fluent/presets.json @@ -32,8 +32,8 @@ "validators": "fluent_tags", "output_validators": "fluent_tags_output", "form_attrs": { - "data-module": "autocomplete", - "data-module-tags": "" + "style": "width: 100%", + "class": "form-control" } } },