From ce842f0baf1e12d2967d404b4abf1c5efc8a0976 Mon Sep 17 00:00:00 2001 From: DrMint Date: Tue, 21 Dec 2021 02:02:50 +0100 Subject: [PATCH] Renamed the source collection to credits --- .../content-types/glossary-item/schema.json | 7 ++++ src/api/post/content-types/post/schema.json | 31 +++++++------- .../content-types/weapon-story/schema.json | 7 ++++ .../basics/{source.json => credits.json} | 40 +++++++++---------- src/components/source/url-source.json | 4 +- src/components/translations/audio-sets.json | 12 +++--- src/components/translations/posts.json | 36 +++++++++++++++++ src/components/translations/scan-set.json | 13 +++--- src/components/translations/text-set.json | 12 +++--- src/components/translations/video-sets.json | 12 +++--- 10 files changed, 113 insertions(+), 61 deletions(-) rename src/components/basics/{source.json => credits.json} (90%) create mode 100644 src/components/translations/posts.json diff --git a/src/api/glossary-item/content-types/glossary-item/schema.json b/src/api/glossary-item/content-types/glossary-item/schema.json index 867526c..870a555 100644 --- a/src/api/glossary-item/content-types/glossary-item/schema.json +++ b/src/api/glossary-item/content-types/glossary-item/schema.json @@ -34,6 +34,13 @@ "type": "relation", "relation": "oneToOne", "target": "api::glossary-item-type.glossary-item-type" + }, + "thumbnail": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false } } } diff --git a/src/api/post/content-types/post/schema.json b/src/api/post/content-types/post/schema.json index e192e7c..bcf2680 100644 --- a/src/api/post/content-types/post/schema.json +++ b/src/api/post/content-types/post/schema.json @@ -12,24 +12,27 @@ }, "pluginOptions": {}, "attributes": { - "content": { - "pluginOptions": {}, - "type": "dynamiczone", - "components": [ - "page-builder.text", - "page-builder.tabs", - "page-builder.gallery", - "page-builder.grid" - ] - }, - "title": { - "pluginOptions": {}, - "type": "string" - }, "authors": { "type": "relation", "relation": "oneToMany", "target": "api::recorder.recorder" + }, + "slug": { + "type": "string", + "required": true, + "unique": true, + "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + }, + "categories": { + "type": "relation", + "relation": "oneToMany", + "target": "api::category.category" + }, + "translations": { + "displayName": "Posts", + "type": "component", + "repeatable": true, + "component": "translations.posts" } } } diff --git a/src/api/weapon-story/content-types/weapon-story/schema.json b/src/api/weapon-story/content-types/weapon-story/schema.json index e283cb3..cca53fd 100644 --- a/src/api/weapon-story/content-types/weapon-story/schema.json +++ b/src/api/weapon-story/content-types/weapon-story/schema.json @@ -33,6 +33,13 @@ "type": "relation", "relation": "oneToOne", "target": "api::weapon-story-type.weapon-story-type" + }, + "thumbnail": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false } } } diff --git a/src/components/basics/source.json b/src/components/basics/credits.json similarity index 90% rename from src/components/basics/source.json rename to src/components/basics/credits.json index 50d1a29..34785bb 100644 --- a/src/components/basics/source.json +++ b/src/components/basics/credits.json @@ -1,21 +1,16 @@ { - "collectionName": "components_basics_sources", + "collectionName": "components_basics_credits", "info": { - "displayName": "Source", - "icon": "book-reader", + "displayName": "Credits", + "icon": "user", "description": "" }, "options": {}, "attributes": { - "scanners": { + "source_language": { "type": "relation", - "relation": "oneToMany", - "target": "api::recorder.recorder" - }, - "cleaners": { - "type": "relation", - "relation": "oneToMany", - "target": "api::recorder.recorder" + "relation": "oneToOne", + "target": "api::language.language" }, "transcribers": { "type": "relation", @@ -32,23 +27,28 @@ "relation": "oneToMany", "target": "api::recorder.recorder" }, + "scanners": { + "type": "relation", + "relation": "oneToMany", + "target": "api::recorder.recorder" + }, + "cleaners": { + "type": "relation", + "relation": "oneToMany", + "target": "api::recorder.recorder" + }, "typesetters": { "type": "relation", "relation": "oneToMany", "target": "api::recorder.recorder" }, - "source_language": { - "type": "relation", - "relation": "oneToOne", - "target": "api::language.language" - }, - "footnotes": { - "type": "text" - }, - "Subbers": { + "subbers": { "type": "relation", "relation": "oneToMany", "target": "api::recorder.recorder" + }, + "footnotes": { + "type": "text" } } } diff --git a/src/components/source/url-source.json b/src/components/source/url-source.json index ed43ae2..5b211ab 100644 --- a/src/components/source/url-source.json +++ b/src/components/source/url-source.json @@ -16,10 +16,10 @@ "note": { "type": "text" }, - "source": { + "credits": { "type": "component", "repeatable": false, - "component": "basics.source", + "component": "basics.credits", "required": true } } diff --git a/src/components/translations/audio-sets.json b/src/components/translations/audio-sets.json index d8a0ce0..ece8dc9 100644 --- a/src/components/translations/audio-sets.json +++ b/src/components/translations/audio-sets.json @@ -20,12 +20,6 @@ "files" ] }, - "source": { - "type": "component", - "repeatable": false, - "component": "basics.source", - "required": true - }, "status": { "type": "enumeration", "enum": [ @@ -36,6 +30,12 @@ ], "default": "Incomplete", "required": true + }, + "credits": { + "type": "component", + "repeatable": false, + "component": "basics.credits", + "required": true } } } diff --git a/src/components/translations/posts.json b/src/components/translations/posts.json new file mode 100644 index 0000000..be0384e --- /dev/null +++ b/src/components/translations/posts.json @@ -0,0 +1,36 @@ +{ + "collectionName": "components_translations_posts", + "info": { + "displayName": "Posts", + "icon": "icons" + }, + "options": {}, + "attributes": { + "Status": { + "type": "enumeration", + "enum": [ + "Incomplete", + "Draft", + "Review", + "Done" + ], + "default": "Incomplete", + "required": true + }, + "title": { + "type": "string", + "required": true + }, + "excerpt": { + "type": "text", + "maxLength": 150 + }, + "thumbnail": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + } + } +} diff --git a/src/components/translations/scan-set.json b/src/components/translations/scan-set.json index 75b660f..36b7a4d 100644 --- a/src/components/translations/scan-set.json +++ b/src/components/translations/scan-set.json @@ -20,13 +20,6 @@ "images" ] }, - "source": { - "displayName": "Source", - "type": "component", - "repeatable": false, - "component": "basics.source", - "required": true - }, "status": { "type": "enumeration", "enum": [ @@ -37,6 +30,12 @@ ], "default": "Incomplete", "required": true + }, + "credits": { + "type": "component", + "repeatable": false, + "component": "basics.credits", + "required": true } } } diff --git a/src/components/translations/text-set.json b/src/components/translations/text-set.json index b26dea5..4241205 100644 --- a/src/components/translations/text-set.json +++ b/src/components/translations/text-set.json @@ -10,12 +10,6 @@ "text": { "type": "richtext" }, - "source": { - "type": "component", - "repeatable": false, - "component": "basics.source", - "required": true - }, "language": { "type": "relation", "relation": "oneToOne", @@ -31,6 +25,12 @@ ], "default": "Incomplete", "required": true + }, + "credits": { + "type": "component", + "repeatable": false, + "component": "basics.credits", + "required": true } } } diff --git a/src/components/translations/video-sets.json b/src/components/translations/video-sets.json index d64b77c..b8857b0 100644 --- a/src/components/translations/video-sets.json +++ b/src/components/translations/video-sets.json @@ -19,12 +19,6 @@ "video_embed": { "type": "string" }, - "source": { - "type": "component", - "repeatable": false, - "component": "basics.source", - "required": true - }, "subfile": { "type": "media", "multiple": false, @@ -43,6 +37,12 @@ ], "required": true, "default": "Incomplete" + }, + "credits": { + "type": "component", + "repeatable": false, + "component": "basics.credits", + "required": true } } }