From d131524b1aedc5b3f9dc26d709b77142403f5ed0 Mon Sep 17 00:00:00 2001 From: yulia-bel Date: Wed, 12 Jun 2024 15:37:22 +0200 Subject: [PATCH] Add description field to Dataset collection type --- .../sync/admin-role.strapi-super-admin.json | 18 +++++++---- ...n_content_types##api##dataset.dataset.json | 32 +++++++++++++++---- ...ntent_types##api##ecoregion.ecoregion.json | 30 +++++++++++++---- .../dataset/content-types/dataset/schema.json | 8 +++++ .../1.0.0/full_documentation.json | 13 ++++++-- cms/types/generated/contentTypes.d.ts | 6 ++++ 6 files changed, 87 insertions(+), 20 deletions(-) diff --git a/cms/config/sync/admin-role.strapi-super-admin.json b/cms/config/sync/admin-role.strapi-super-admin.json index 5468644..ead6176 100644 --- a/cms/config/sync/admin-role.strapi-super-admin.json +++ b/cms/config/sync/admin-role.strapi-super-admin.json @@ -17,7 +17,8 @@ "citations.url", "sources.name", "sources.url", - "slug" + "slug", + "description" ], "locales": [ "en", @@ -67,7 +68,8 @@ "citations.url", "sources.name", "sources.url", - "slug" + "slug", + "description" ], "locales": [ "en", @@ -91,7 +93,8 @@ "citations.url", "sources.name", "sources.url", - "slug" + "slug", + "description" ], "locales": [ "en", @@ -110,7 +113,8 @@ "title", "slug", "code", - "rangeland" + "rangeland", + "color" ], "locales": [ "en", @@ -155,7 +159,8 @@ "title", "slug", "code", - "rangeland" + "rangeland", + "color" ], "locales": [ "en", @@ -174,7 +179,8 @@ "title", "slug", "code", - "rangeland" + "rangeland", + "color" ], "locales": [ "en", diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##dataset.dataset.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##dataset.dataset.json index 7a5581f..7e88fe7 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##dataset.dataset.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##dataset.dataset.json @@ -103,6 +103,20 @@ "sortable": true } }, + "description": { + "edit": { + "label": "description", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "description", + "searchable": true, + "sortable": true + } + }, "createdAt": { "edit": { "label": "createdAt", @@ -163,6 +177,12 @@ } }, "layouts": { + "list": [ + "id", + "title", + "type", + "layers" + ], "edit": [ [ { @@ -199,13 +219,13 @@ "name": "sources", "size": 12 } + ], + [ + { + "name": "description", + "size": 6 + } ] - ], - "list": [ - "id", - "title", - "type", - "layers" ] }, "uid": "api::dataset.dataset" diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##ecoregion.ecoregion.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##ecoregion.ecoregion.json index f132493..e9cc203 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##ecoregion.ecoregion.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##ecoregion.ecoregion.json @@ -76,6 +76,20 @@ "sortable": true } }, + "color": { + "edit": { + "label": "color", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "color", + "searchable": true, + "sortable": true + } + }, "createdAt": { "edit": { "label": "createdAt", @@ -136,6 +150,12 @@ } }, "layouts": { + "list": [ + "id", + "title", + "slug", + "code" + ], "edit": [ [ { @@ -159,14 +179,12 @@ { "name": "rangeland", "size": 6 + }, + { + "name": "color", + "size": 6 } ] - ], - "list": [ - "id", - "title", - "slug", - "code" ] }, "uid": "api::ecoregion.ecoregion" diff --git a/cms/src/api/dataset/content-types/dataset/schema.json b/cms/src/api/dataset/content-types/dataset/schema.json index cf575f2..5c5a1b8 100644 --- a/cms/src/api/dataset/content-types/dataset/schema.json +++ b/cms/src/api/dataset/content-types/dataset/schema.json @@ -79,6 +79,14 @@ } }, "type": "string" + }, + "description": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "text" } } } diff --git a/cms/src/extensions/documentation/documentation/1.0.0/full_documentation.json b/cms/src/extensions/documentation/documentation/1.0.0/full_documentation.json index 08265e9..2418c9d 100644 --- a/cms/src/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/cms/src/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -21,11 +21,11 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "2024-06-07T08:29:46.415Z" + "x-generation-date": "2024-06-12T13:34:50.933Z" }, "servers": [ { - "url": "http://localhost:1337/api", + "url": "http://0.0.0.0:1337/api", "description": "Development server" } ], @@ -126,6 +126,9 @@ "slug": { "type": "string" }, + "description": { + "type": "string" + }, "locale": { "type": "string" } @@ -176,6 +179,9 @@ "slug": { "type": "string" }, + "description": { + "type": "string" + }, "locale": { "type": "string" } @@ -336,6 +342,9 @@ "slug": { "type": "string" }, + "description": { + "type": "string" + }, "createdAt": { "type": "string", "format": "date-time" diff --git a/cms/types/generated/contentTypes.d.ts b/cms/types/generated/contentTypes.d.ts index 2c9cc44..c0367ee 100644 --- a/cms/types/generated/contentTypes.d.ts +++ b/cms/types/generated/contentTypes.d.ts @@ -420,6 +420,12 @@ export interface ApiDatasetDataset extends Schema.CollectionType { localized: false; }; }>; + description: Attribute.Text & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; publishedAt: Attribute.DateTime;