Skip to content

Commit

Permalink
Add description field to Dataset collection type
Browse files Browse the repository at this point in the history
  • Loading branch information
yulia-bel committed Jun 12, 2024
1 parent 3fa4f70 commit d131524
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 20 deletions.
18 changes: 12 additions & 6 deletions cms/config/sync/admin-role.strapi-super-admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"citations.url",
"sources.name",
"sources.url",
"slug"
"slug",
"description"
],
"locales": [
"en",
Expand Down Expand Up @@ -67,7 +68,8 @@
"citations.url",
"sources.name",
"sources.url",
"slug"
"slug",
"description"
],
"locales": [
"en",
Expand All @@ -91,7 +93,8 @@
"citations.url",
"sources.name",
"sources.url",
"slug"
"slug",
"description"
],
"locales": [
"en",
Expand All @@ -110,7 +113,8 @@
"title",
"slug",
"code",
"rangeland"
"rangeland",
"color"
],
"locales": [
"en",
Expand Down Expand Up @@ -155,7 +159,8 @@
"title",
"slug",
"code",
"rangeland"
"rangeland",
"color"
],
"locales": [
"en",
Expand All @@ -174,7 +179,8 @@
"title",
"slug",
"code",
"rangeland"
"rangeland",
"color"
],
"locales": [
"en",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -163,6 +177,12 @@
}
},
"layouts": {
"list": [
"id",
"title",
"type",
"layers"
],
"edit": [
[
{
Expand Down Expand Up @@ -199,13 +219,13 @@
"name": "sources",
"size": 12
}
],
[
{
"name": "description",
"size": 6
}
]
],
"list": [
"id",
"title",
"type",
"layers"
]
},
"uid": "api::dataset.dataset"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -136,6 +150,12 @@
}
},
"layouts": {
"list": [
"id",
"title",
"slug",
"code"
],
"edit": [
[
{
Expand All @@ -159,14 +179,12 @@
{
"name": "rangeland",
"size": 6
},
{
"name": "color",
"size": 6
}
]
],
"list": [
"id",
"title",
"slug",
"code"
]
},
"uid": "api::ecoregion.ecoregion"
Expand Down
8 changes: 8 additions & 0 deletions cms/src/api/dataset/content-types/dataset/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@
}
},
"type": "string"
},
"description": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "text"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
],
Expand Down Expand Up @@ -126,6 +126,9 @@
"slug": {
"type": "string"
},
"description": {
"type": "string"
},
"locale": {
"type": "string"
}
Expand Down Expand Up @@ -176,6 +179,9 @@
"slug": {
"type": "string"
},
"description": {
"type": "string"
},
"locale": {
"type": "string"
}
Expand Down Expand Up @@ -336,6 +342,9 @@
"slug": {
"type": "string"
},
"description": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down
6 changes: 6 additions & 0 deletions cms/types/generated/contentTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d131524

Please sign in to comment.