Skip to content

Commit 3f25178

Browse files
authored
Merge pull request #1 from starpep-web/changes-february
Created PublicationsPage.
2 parents 19a2359 + f165be3 commit 3f25178

File tree

11 files changed

+311
-73
lines changed

11 files changed

+311
-73
lines changed

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"kind": "singleType",
3+
"collectionName": "publications_pages",
4+
"info": {
5+
"singularName": "publications-page",
6+
"pluralName": "publications-pages",
7+
"displayName": "PublicationsPage",
8+
"description": ""
9+
},
10+
"options": {
11+
"draftAndPublish": true
12+
},
13+
"pluginOptions": {},
14+
"attributes": {
15+
"originalPublications": {
16+
"type": "component",
17+
"repeatable": false,
18+
"component": "publications.publication-group",
19+
"required": true
20+
},
21+
"relevantPublications": {
22+
"type": "component",
23+
"repeatable": false,
24+
"component": "publications.publication-group",
25+
"required": true
26+
},
27+
"softwarePublications": {
28+
"type": "component",
29+
"repeatable": false,
30+
"component": "publications.software-publication-group",
31+
"required": true
32+
}
33+
}
34+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
/**
4+
* publications-page controller
5+
*/
6+
7+
const { createCoreController } = require('@strapi/strapi').factories;
8+
9+
module.exports = createCoreController('api::publications-page.publications-page');
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
/**
4+
* publications-page router
5+
*/
6+
7+
const { createCoreRouter } = require('@strapi/strapi').factories;
8+
9+
module.exports = createCoreRouter('api::publications-page.publications-page');
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
/**
4+
* publications-page service
5+
*/
6+
7+
const { createCoreService } = require('@strapi/strapi').factories;
8+
9+
module.exports = createCoreService('api::publications-page.publications-page');
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"collectionName": "components_publications_publication_groups",
3+
"info": {
4+
"displayName": "PublicationGroup",
5+
"icon": "folder"
6+
},
7+
"options": {},
8+
"attributes": {
9+
"title": {
10+
"type": "string"
11+
},
12+
"publications": {
13+
"type": "component",
14+
"repeatable": true,
15+
"component": "publications.publication"
16+
}
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"collectionName": "components_publications_publications",
3+
"info": {
4+
"displayName": "Publication",
5+
"icon": "file",
6+
"description": ""
7+
},
8+
"options": {},
9+
"attributes": {
10+
"citation": {
11+
"type": "richtext",
12+
"required": true
13+
},
14+
"link": {
15+
"type": "string"
16+
}
17+
}
18+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"collectionName": "components_publications_software_publication_groups",
3+
"info": {
4+
"displayName": "SoftwarePublicationGroup",
5+
"icon": "folder"
6+
},
7+
"options": {},
8+
"attributes": {
9+
"title": {
10+
"type": "string"
11+
},
12+
"publications": {
13+
"type": "component",
14+
"repeatable": true,
15+
"component": "publications.software-publication",
16+
"required": false
17+
}
18+
}
19+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"collectionName": "components_publications_software_publications",
3+
"info": {
4+
"displayName": "SoftwarePublication",
5+
"icon": "archive"
6+
},
7+
"options": {},
8+
"attributes": {
9+
"name": {
10+
"type": "string",
11+
"required": true
12+
},
13+
"downloadUrl": {
14+
"type": "string",
15+
"required": true
16+
},
17+
"sourceUrl": {
18+
"type": "string"
19+
},
20+
"image": {
21+
"allowedTypes": [
22+
"images"
23+
],
24+
"type": "media",
25+
"multiple": false
26+
}
27+
}
28+
}

types/generated/components.d.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,60 @@ export interface CommonFaq extends Schema.Component {
8686
};
8787
}
8888

89+
export interface PublicationsSoftwarePublication extends Schema.Component {
90+
collectionName: 'components_publications_software_publications';
91+
info: {
92+
displayName: 'SoftwarePublication';
93+
icon: 'archive';
94+
};
95+
attributes: {
96+
name: Attribute.String & Attribute.Required;
97+
downloadUrl: Attribute.String & Attribute.Required;
98+
sourceUrl: Attribute.String;
99+
image: Attribute.Media<'images'>;
100+
};
101+
}
102+
103+
export interface PublicationsSoftwarePublicationGroup extends Schema.Component {
104+
collectionName: 'components_publications_software_publication_groups';
105+
info: {
106+
displayName: 'SoftwarePublicationGroup';
107+
icon: 'folder';
108+
};
109+
attributes: {
110+
title: Attribute.String;
111+
publications: Attribute.Component<
112+
'publications.software-publication',
113+
true
114+
>;
115+
};
116+
}
117+
118+
export interface PublicationsPublication extends Schema.Component {
119+
collectionName: 'components_publications_publications';
120+
info: {
121+
displayName: 'Publication';
122+
icon: 'file';
123+
description: '';
124+
};
125+
attributes: {
126+
citation: Attribute.RichText & Attribute.Required;
127+
link: Attribute.String;
128+
};
129+
}
130+
131+
export interface PublicationsPublicationGroup extends Schema.Component {
132+
collectionName: 'components_publications_publication_groups';
133+
info: {
134+
displayName: 'PublicationGroup';
135+
icon: 'folder';
136+
};
137+
attributes: {
138+
title: Attribute.String;
139+
publications: Attribute.Component<'publications.publication', true>;
140+
};
141+
}
142+
89143
declare module '@strapi/types' {
90144
export module Shared {
91145
export interface Components {
@@ -95,6 +149,10 @@ declare module '@strapi/types' {
95149
'common.text-card': CommonTextCard;
96150
'common.image-gallery': CommonImageGallery;
97151
'common.faq': CommonFaq;
152+
'publications.software-publication': PublicationsSoftwarePublication;
153+
'publications.software-publication-group': PublicationsSoftwarePublicationGroup;
154+
'publications.publication': PublicationsPublication;
155+
'publications.publication-group': PublicationsPublicationGroup;
98156
}
99157
}
100158
}

0 commit comments

Comments
 (0)