-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DEV-1417] Add news-item entity and news-showcase component to Strapi…
… CMS (#666)
- Loading branch information
1 parent
2f76678
commit b9e82d4
Showing
7 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"strapi-cms": minor | ||
--- | ||
|
||
Add news-item entity and news-showcase component to Strapi CMS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
apps/strapi-cms/src/api/news-item/content-types/news-item/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"kind": "collectionType", | ||
"collectionName": "news_items", | ||
"info": { | ||
"singularName": "news-item", | ||
"pluralName": "news-items", | ||
"displayName": "NewsItem", | ||
"description": "" | ||
}, | ||
"options": { | ||
"draftAndPublish": true | ||
}, | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"attributes": { | ||
"title": { | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"type": "string", | ||
"required": true | ||
}, | ||
"link": { | ||
"type": "component", | ||
"repeatable": false, | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"component": "common.links", | ||
"required": true | ||
}, | ||
"image": { | ||
"type": "media", | ||
"multiple": false, | ||
"allowedTypes": [ | ||
"images" | ||
], | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
} | ||
}, | ||
"comingSoon": { | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"type": "boolean", | ||
"default": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* news-item controller | ||
*/ | ||
|
||
import { factories } from '@strapi/strapi'; | ||
|
||
export default factories.createCoreController('api::news-item.news-item'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* news-item router | ||
*/ | ||
|
||
import { factories } from '@strapi/strapi'; | ||
|
||
export default factories.createCoreRouter('api::news-item.news-item'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* news-item service | ||
*/ | ||
|
||
import { factories } from '@strapi/strapi'; | ||
|
||
export default factories.createCoreService('api::news-item.news-item'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"collectionName": "components_common_news_showcases", | ||
"info": { | ||
"displayName": "NewsShowcase", | ||
"icon": "bell", | ||
"description": "" | ||
}, | ||
"options": {}, | ||
"attributes": { | ||
"title": { | ||
"type": "string", | ||
"required": true | ||
}, | ||
"subTitle": { | ||
"type": "text" | ||
}, | ||
"items": { | ||
"type": "relation", | ||
"relation": "oneToMany", | ||
"target": "api::news-item.news-item" | ||
} | ||
} | ||
} |