-
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-1536] Strapi setup for webinars and webinar speakers (#780)
- Loading branch information
Showing
9 changed files
with
244 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 support for webinars |
65 changes: 65 additions & 0 deletions
65
apps/strapi-cms/src/api/webinar-speaker/content-types/webinar-speaker/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,65 @@ | ||
{ | ||
"kind": "collectionType", | ||
"collectionName": "webinar_speakers", | ||
"info": { | ||
"singularName": "webinar-speaker", | ||
"pluralName": "webinar-speakers", | ||
"displayName": "WebinarSpeaker", | ||
"description": "" | ||
}, | ||
"options": { | ||
"draftAndPublish": true | ||
}, | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"attributes": { | ||
"name": { | ||
"type": "string", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"required": true | ||
}, | ||
"jobTitle": { | ||
"type": "string", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"required": true | ||
}, | ||
"description": { | ||
"type": "blocks", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
} | ||
}, | ||
"avatar": { | ||
"type": "media", | ||
"multiple": false, | ||
"required": false, | ||
"allowedTypes": [ | ||
"images" | ||
], | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
} | ||
}, | ||
"webinars": { | ||
"type": "relation", | ||
"relation": "manyToMany", | ||
"target": "api::webinar.webinar", | ||
"mappedBy": "webinarSpeakers" | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
apps/strapi-cms/src/api/webinar-speaker/controllers/webinar-speaker.ts
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,9 @@ | ||
/** | ||
* webinar-speaker controller | ||
*/ | ||
|
||
import { factories } from '@strapi/strapi'; | ||
|
||
export default factories.createCoreController( | ||
'api::webinar-speaker.webinar-speaker' | ||
); |
9 changes: 9 additions & 0 deletions
9
apps/strapi-cms/src/api/webinar-speaker/routes/webinar-speaker.ts
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,9 @@ | ||
/** | ||
* webinar-speaker router | ||
*/ | ||
|
||
import { factories } from '@strapi/strapi'; | ||
|
||
export default factories.createCoreRouter( | ||
'api::webinar-speaker.webinar-speaker' | ||
); |
9 changes: 9 additions & 0 deletions
9
apps/strapi-cms/src/api/webinar-speaker/services/webinar-speaker.ts
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,9 @@ | ||
/** | ||
* webinar-speaker service | ||
*/ | ||
|
||
import { factories } from '@strapi/strapi'; | ||
|
||
export default factories.createCoreService( | ||
'api::webinar-speaker.webinar-speaker' | ||
); |
126 changes: 126 additions & 0 deletions
126
apps/strapi-cms/src/api/webinar/content-types/webinar/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,126 @@ | ||
{ | ||
"kind": "collectionType", | ||
"collectionName": "webinars", | ||
"info": { | ||
"singularName": "webinar", | ||
"pluralName": "webinars", | ||
"displayName": "Webinar", | ||
"description": "" | ||
}, | ||
"options": { | ||
"draftAndPublish": true | ||
}, | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"attributes": { | ||
"title": { | ||
"type": "string", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"required": true | ||
}, | ||
"coverImage": { | ||
"type": "media", | ||
"multiple": false, | ||
"required": true, | ||
"allowedTypes": [ | ||
"images" | ||
], | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
} | ||
}, | ||
"slug": { | ||
"type": "string", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"required": true, | ||
"regex": "^[a-zA-Z0-9-]+$" | ||
}, | ||
"textContent": { | ||
"type": "blocks", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
} | ||
}, | ||
"playerSrc": { | ||
"type": "string", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
} | ||
}, | ||
"startDatetime": { | ||
"type": "datetime", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
} | ||
}, | ||
"endDatetime": { | ||
"type": "datetime", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
} | ||
}, | ||
"webinarSpeakers": { | ||
"type": "relation", | ||
"relation": "manyToMany", | ||
"target": "api::webinar-speaker.webinar-speaker", | ||
"inversedBy": "webinars" | ||
}, | ||
"isVisibleInList": { | ||
"type": "boolean", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"required": true | ||
}, | ||
"relatedLinks": { | ||
"type": "component", | ||
"repeatable": false, | ||
"component": "common.related-links", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
} | ||
}, | ||
"subscribeParagraphLabel": { | ||
"type": "string", | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
} | ||
}, | ||
"description": { | ||
"pluginOptions": { | ||
"i18n": { | ||
"localized": true | ||
} | ||
}, | ||
"type": "text", | ||
"required": true | ||
} | ||
} | ||
} |
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 @@ | ||
/** | ||
* webinar controller | ||
*/ | ||
|
||
import { factories } from '@strapi/strapi'; | ||
|
||
export default factories.createCoreController('api::webinar.webinar'); |
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 @@ | ||
/** | ||
* webinar router | ||
*/ | ||
|
||
import { factories } from '@strapi/strapi'; | ||
|
||
export default factories.createCoreRouter('api::webinar.webinar'); |
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 @@ | ||
/** | ||
* webinar service | ||
*/ | ||
|
||
import { factories } from '@strapi/strapi'; | ||
|
||
export default factories.createCoreService('api::webinar.webinar'); |