@eeacms/volto-cca-policy 0.1.91 → 0.1.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/package.json +1 -1
  3. package/src/components/index.js +1 -0
  4. package/src/components/manage/Blocks/Listing/OrganisationCardsListingView.jsx +20 -18
  5. package/src/components/theme/PortalMessage/PortalMessage.jsx +19 -0
  6. package/src/components/theme/Views/AdaptationOptionView.jsx +6 -16
  7. package/src/components/theme/Views/C3SIndicatorView.jsx +2 -0
  8. package/src/components/theme/Views/CaseStudyView.jsx +8 -11
  9. package/src/components/theme/Views/CcaEventView.jsx +8 -5
  10. package/src/components/theme/Views/{IndicatorView.jsx → DatabaseItemView.jsx} +71 -35
  11. package/src/components/theme/Views/{InformationPortalView.test.jsx → DatabaseItemView.test.jsx} +12 -4
  12. package/src/components/theme/Views/EventView.jsx +5 -1
  13. package/src/components/theme/Views/NewsItemView.jsx +5 -1
  14. package/src/components/theme/Views/ProjectView.jsx +6 -12
  15. package/src/components/theme/Views/VideoView.jsx +10 -42
  16. package/src/components/theme/Views/VideoView.test.jsx +1 -1
  17. package/src/helpers/Constants.jsx +12 -0
  18. package/src/helpers/ContentMetadata.jsx +58 -55
  19. package/src/helpers/Utils.jsx +58 -25
  20. package/src/helpers/index.js +1 -0
  21. package/src/index.js +14 -19
  22. package/theme/globals/site.overrides +10 -0
  23. package/theme/globals/views.less +18 -24
  24. package/src/components/theme/Views/GuidanceView.jsx +0 -112
  25. package/src/components/theme/Views/GuidanceView.test.jsx +0 -50
  26. package/src/components/theme/Views/IndicatorView.test.jsx +0 -50
  27. package/src/components/theme/Views/InformationPortalView.jsx +0 -78
  28. package/src/components/theme/Views/OrganisationView.jsx +0 -112
  29. package/src/components/theme/Views/OrganisationView.test.jsx +0 -50
  30. package/src/components/theme/Views/PublicationReportView.jsx +0 -71
  31. package/src/components/theme/Views/PublicationReportView.test.jsx +0 -50
  32. package/src/components/theme/Views/ToolView.jsx +0 -59
  33. package/src/components/theme/Views/ToolView.test.jsx +0 -50
package/CHANGELOG.md CHANGED
@@ -4,6 +4,33 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ ### [0.1.92](https://github.com/eea/volto-cca-policy/compare/0.1.91...0.1.92) - 6 March 2024
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: add portal message for archived content [kreafox - [`e430c84`](https://github.com/eea/volto-cca-policy/commit/e430c849011fbf5c09a52a2785898d850c8904ab)]
12
+
13
+ #### :bug: Bug Fixes
14
+
15
+ - fix(views): remove RenderBlocks from CCA Event [kreafox - [`b3037d5`](https://github.com/eea/volto-cca-policy/commit/b3037d5f69616ad5542f63f00f8f88749c08d77e)]
16
+ - fix(views): fix condition [kreafox - [`bdf40c9`](https://github.com/eea/volto-cca-policy/commit/bdf40c9ae6c2b8fd9094f6fcb50cf4a5d60e09d7)]
17
+ - fix(tests): more cleanup on db items view [kreafox - [`ea7dbeb`](https://github.com/eea/volto-cca-policy/commit/ea7dbeb1b44295450f8953f6e96ca8a6a1e6cf0a)]
18
+ - fix(test): duplicated code issue [kreafox - [`80027ee`](https://github.com/eea/volto-cca-policy/commit/80027eebc1739bd90976a24b4e1b760d35d7f82a)]
19
+ - fix(views): logo on db items view [kreafox - [`15b7cad`](https://github.com/eea/volto-cca-policy/commit/15b7cadff03dd5532c11209308d58f655131d1ab)]
20
+ - fix(views): add missing fields [kreafox - [`1d50f3d`](https://github.com/eea/volto-cca-policy/commit/1d50f3d5f9497c2591b53ef3b57dd49079ee4224)]
21
+
22
+ #### :nail_care: Enhancements
23
+
24
+ - change(views): use DatabaseItemView for Organisation item [kreafox - [`30d0e18`](https://github.com/eea/volto-cca-policy/commit/30d0e18894b6a70ba7b95c8154659b8785128831)]
25
+ - change(views): Elements -> Adaptation elements [kreafox - [`5575a68`](https://github.com/eea/volto-cca-policy/commit/5575a684253ec32f799d58c613698cd0e3725950)]
26
+
27
+ #### :hammer_and_wrench: Others
28
+
29
+ - test: update snapshot [kreafox - [`a8bf420`](https://github.com/eea/volto-cca-policy/commit/a8bf420e9bb62a315ab0eec3c2c37f63312234d4)]
30
+ - Change label for search in observatory [Tiberiu Ichim - [`1d9848f`](https://github.com/eea/volto-cca-policy/commit/1d9848f31d89d9ad969609d4b1f1860b814ad001)]
31
+ - test: WIP on reduce duplicated code by adding a common view for DB items [kreafox - [`92e33e8`](https://github.com/eea/volto-cca-policy/commit/92e33e866c709ab132e78214e2422c8dec914d22)]
32
+ - test: more cleanup [kreafox - [`5b3aa8e`](https://github.com/eea/volto-cca-policy/commit/5b3aa8e4735eb0b02e8142bbebd4b2ae15b89bbd)]
33
+ - tests: update snapshots [kreafox - [`3acbec8`](https://github.com/eea/volto-cca-policy/commit/3acbec8db2f069e2ea62051a43bde563e095d277)]
7
34
  ### [0.1.91](https://github.com/eea/volto-cca-policy/compare/0.1.90...0.1.91) - 5 March 2024
8
35
 
9
36
  #### :bug: Bug Fixes
@@ -13,7 +40,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
13
40
  #### :hammer_and_wrench: Others
14
41
 
15
42
  - Add test file [Tiberiu Ichim - [`282e32c`](https://github.com/eea/volto-cca-policy/commit/282e32cde07122150379df996b19d37eed3e0260)]
16
- - Add override for UniversalLink, see #266263 [Tiberiu Ichim - [`63242f5`](https://github.com/eea/volto-cca-policy/commit/63242f5fc4b0e54d1170b8f8ee31dba46e997eee)]
17
43
  ### [0.1.90](https://github.com/eea/volto-cca-policy/compare/0.1.89...0.1.90) - 5 March 2024
18
44
 
19
45
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.1.91",
3
+ "version": "0.1.92",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -1,2 +1,3 @@
1
1
  export ImageGallery from './theme/ImageGallery/ImageGallery';
2
2
  export BannerTitle from './theme/BannerTitle/BannerTitle';
3
+ export PortalMessage from './theme/PortalMessage/PortalMessage';
@@ -15,30 +15,32 @@ const OrganisationCardsListingView = ({ items, isEditMode, token }) => {
15
15
  'european-commission': 'European Commission',
16
16
  'european-environment-agency-eea': 'European Environment Agency',
17
17
  'european-food-safety-authority': 'European Food Safety Authority',
18
- 'lancet-countdown': 'Lancet Countdown',
18
+ 'lancet-countdown': 'Lancet Countdown in Europe',
19
19
  'who-regional-office-for-europe-who-europe':
20
20
  'WHO Regional Office for Europe',
21
21
  'world-health-organization': 'World Health Organization',
22
+ 'association-schools-public-health-in-european-region-aspher':
23
+ 'The Association of Schools of Public Health in the European Region',
22
24
  };
23
25
  const org = mapContributorValues[item['@id'].split('/').pop()] || '';
24
- const query = {
25
- query: {
26
- function_score: {
27
- query: {
28
- bool: {
29
- filter: {
30
- bool: {
31
- should: [{ term: { partner_contributors: org } }],
32
- },
33
- },
34
- },
35
- },
36
- },
37
- },
38
- };
26
+ const query =
27
+ 'size=n_10_n' +
28
+ '&filters[0][field]=cca_partner_contributors.keyword' +
29
+ '&filters[0][values][0]=' +
30
+ org +
31
+ '&filters[0][type]=any' +
32
+ '&filters[1][field]=issued.date' +
33
+ '&filters[1][values][0]=Last 5 years' +
34
+ '&filters[1][type]=any' +
35
+ '&filters[2][field]=language' +
36
+ '&filters[2][values][0]=en' +
37
+ '&filters[2][type]=any' +
38
+ '&sort-field=issued.date' +
39
+ '&sort-direction=desc';
39
40
 
40
- const encodedQuery = encodeURIComponent(JSON.stringify(query));
41
- return `/en/observatory/advanced-search/?source=${encodedQuery}`;
41
+ return `/en/observatory/advanced-search?${query
42
+ .replaceAll('[', '%5B')
43
+ .replaceAll(']', '%5D')}`;
42
44
  };
43
45
 
44
46
  return (
@@ -0,0 +1,19 @@
1
+ import { Message, Icon } from 'semantic-ui-react';
2
+
3
+ const PortalMessage = (props) => {
4
+ const { content } = props;
5
+ const { review_state } = content;
6
+ const isArchivedContent = review_state === 'archived';
7
+
8
+ return isArchivedContent ? (
9
+ <Message info icon>
10
+ <Icon name="info" />
11
+ <Message.Content>
12
+ This object has been archived because its content is outdated. You can
13
+ still access it as legacy.
14
+ </Message.Content>
15
+ </Message>
16
+ ) : null;
17
+ };
18
+
19
+ export default PortalMessage;
@@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
2
2
  import {
3
3
  HTMLField,
4
4
  ContentMetadata,
5
- LinksList,
5
+ ReferenceInfo,
6
6
  PublishedModifiedInfo,
7
7
  ShareInfo,
8
8
  BannerTitle,
@@ -10,6 +10,7 @@ import {
10
10
  } from '@eeacms/volto-cca-policy/helpers';
11
11
  import { Segment, Divider, Image, Grid } from 'semantic-ui-react';
12
12
  import { UniversalLink } from '@plone/volto/components';
13
+ import { PortalMessage } from '@eeacms/volto-cca-policy/components';
13
14
 
14
15
  function createDataField(type, field, section, title) {
15
16
  return {
@@ -106,8 +107,6 @@ function AdaptationOptionView(props) {
106
107
  const {
107
108
  related_case_studies,
108
109
  long_description,
109
- websites,
110
- source,
111
110
  ipcc_category,
112
111
  logo,
113
112
  title,
@@ -125,6 +124,7 @@ function AdaptationOptionView(props) {
125
124
  />
126
125
 
127
126
  <div className="ui container">
127
+ <PortalMessage content={content} />
128
128
  <Grid columns="12">
129
129
  <div className="row">
130
130
  <Grid.Column
@@ -180,16 +180,7 @@ function AdaptationOptionView(props) {
180
180
  </Fragment>
181
181
  )}
182
182
 
183
- <h2>Reference information</h2>
184
-
185
- {websites && websites?.length > 0 && (
186
- <LinksList title="Websites:" value={websites} />
187
- )}
188
-
189
- <div id="source" className="section">
190
- <h5 id="source">References:</h5>
191
- <HTMLField value={source} />
192
- </div>
183
+ <ReferenceInfo content={content} />
193
184
 
194
185
  <PublishedModifiedInfo {...props} />
195
186
  <ShareInfo {...props} />
@@ -201,9 +192,8 @@ function AdaptationOptionView(props) {
201
192
  computer={4}
202
193
  className="col-right"
203
194
  >
204
- <Segment>
205
- <ContentMetadata {...props} />
206
- </Segment>
195
+ <ContentMetadata {...props} />
196
+
207
197
  {related_case_studies?.length > 0 && (
208
198
  <Segment>
209
199
  <h5>Case studies related to this option:</h5>
@@ -6,6 +6,7 @@ import {
6
6
  LogoWrapper,
7
7
  } from '@eeacms/volto-cca-policy/helpers';
8
8
  import { Accordion, Icon, Segment, Image } from 'semantic-ui-react';
9
+ import { PortalMessage } from '@eeacms/volto-cca-policy/components';
9
10
 
10
11
  if (!__SERVER__) {
11
12
  window.cds_toolbox = {
@@ -153,6 +154,7 @@ function C3SIndicatorView(props) {
153
154
  <BannerTitle content={{ ...content, image: '' }} />
154
155
 
155
156
  <div className="ui container">
157
+ <PortalMessage content={content} />
156
158
  <LogoWrapper logo={logo}>
157
159
  <h2>Background information</h2>
158
160
  {logo && (
@@ -8,8 +8,9 @@ import {
8
8
  ShareInfo,
9
9
  BannerTitle,
10
10
  } from '@eeacms/volto-cca-policy/helpers';
11
- import { Divider, Segment, Grid, Icon, Image } from 'semantic-ui-react';
11
+ import { Divider, Grid, Icon, Image } from 'semantic-ui-react';
12
12
  import { ImageGallery } from '@eeacms/volto-cca-policy/components';
13
+ import { PortalMessage } from '@eeacms/volto-cca-policy/components';
13
14
 
14
15
  const PrimaryPhoto = (props) => {
15
16
  const { content } = props;
@@ -236,8 +237,7 @@ const SectionContent = (props) => {
236
237
 
237
238
  function CaseStudyView(props) {
238
239
  const { content } = props;
239
- const { cca_files, long_description } = content;
240
- const hasFiles = cca_files && cca_files.length > 0;
240
+ const { long_description } = content;
241
241
 
242
242
  const hasValue = (field) => {
243
243
  if (!content.hasOwnProperty(field)) {
@@ -263,6 +263,7 @@ function CaseStudyView(props) {
263
263
  <BannerTitle content={{ ...content, image: '' }} type="Case Studies" />
264
264
 
265
265
  <div className="ui container">
266
+ <PortalMessage content={content} />
266
267
  <Grid columns="12">
267
268
  <div className="row">
268
269
  <Grid.Column
@@ -343,14 +344,10 @@ function CaseStudyView(props) {
343
344
  className="col-right"
344
345
  >
345
346
  <PhotoGallery {...props} />
346
- <Segment>
347
- <ContentMetadata {...props} />
348
- </Segment>
349
- {hasFiles && (
350
- <Segment>
351
- <DocumentsList {...props} />
352
- </Segment>
353
- )}
347
+
348
+ <ContentMetadata {...props} />
349
+
350
+ <DocumentsList {...props} />
354
351
  </Grid.Column>
355
352
  </div>
356
353
  </Grid>
@@ -1,9 +1,12 @@
1
1
  import React from 'react';
2
- import { DocumentsList, HTMLField } from '@eeacms/volto-cca-policy/helpers';
3
- import { BannerTitle } from '@eeacms/volto-cca-policy/components';
4
- import { When } from '@plone/volto/components/theme/View/EventDatesInfo';
5
2
  import { Grid } from 'semantic-ui-react';
6
- import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
3
+ import {
4
+ DocumentsList,
5
+ HTMLField,
6
+ BannerTitle,
7
+ } from '@eeacms/volto-cca-policy/helpers';
8
+ import { When } from '@plone/volto/components/theme/View/EventDatesInfo';
9
+ import { PortalMessage } from '@eeacms/volto-cca-policy/components';
7
10
 
8
11
  function CcaEventView(props) {
9
12
  const { content } = props;
@@ -34,6 +37,7 @@ function CcaEventView(props) {
34
37
  <BannerTitle content={content} />
35
38
 
36
39
  <div className="ui container">
40
+ <PortalMessage content={content} />
37
41
  <Grid columns="12">
38
42
  <div className="row">
39
43
  <Grid.Column
@@ -49,7 +53,6 @@ function CcaEventView(props) {
49
53
  </>
50
54
  )}
51
55
  <HTMLField value={content.text} className="long_description" />
52
- <RenderBlocks {...props} />
53
56
 
54
57
  <h2>Agenda and supporting documents</h2>
55
58
  <HTMLField value={content.agenda} className="long_description" />
@@ -1,28 +1,63 @@
1
1
  import React from 'react';
2
+ import {
3
+ TOOL,
4
+ GUIDANCE,
5
+ INDICATOR,
6
+ INFORMATION_PORTAL,
7
+ PUBICATION_REPORT,
8
+ ORGANISATION,
9
+ } from '@eeacms/volto-cca-policy/helpers/Constants';
2
10
  import {
3
11
  HTMLField,
12
+ ReferenceInfo,
4
13
  ContentMetadata,
5
- LinksList,
6
14
  PublishedModifiedInfo,
15
+ LogoWrapper,
7
16
  ShareInfo,
17
+ ContentRelatedItems,
18
+ DocumentsList,
8
19
  BannerTitle,
9
- LogoWrapper,
10
20
  } from '@eeacms/volto-cca-policy/helpers';
11
- import { Segment, Divider, Image, Grid } from 'semantic-ui-react';
21
+ import { PortalMessage } from '@eeacms/volto-cca-policy/components';
22
+ import { Divider, Image, Grid } from 'semantic-ui-react';
12
23
 
13
- function IndicatorView(props) {
24
+ const DatabaseItemView = (props) => {
14
25
  const { content } = props;
26
+ const type = content['@type'];
15
27
  const {
16
- long_description,
17
- websites,
18
- source,
19
- contributor_list,
20
- other_contributor,
21
28
  logo,
22
29
  title,
30
+ long_description,
23
31
  map_graphs,
32
+ organisational_key_activities,
33
+ organisational_websites,
34
+ organisational_contact_information,
24
35
  } = content;
25
36
 
37
+ let subtitle;
38
+ switch (type) {
39
+ case TOOL:
40
+ subtitle = 'Tools';
41
+ break;
42
+ case PUBICATION_REPORT:
43
+ subtitle = 'Publications and Report';
44
+ break;
45
+ case GUIDANCE:
46
+ subtitle = 'Guidance Document';
47
+ break;
48
+ case INDICATOR:
49
+ subtitle = 'Indicator';
50
+ break;
51
+ case INFORMATION_PORTAL:
52
+ subtitle = 'Information Portal';
53
+ break;
54
+ case ORGANISATION:
55
+ subtitle = 'Organisation';
56
+ break;
57
+ default:
58
+ subtitle = '';
59
+ }
60
+
26
61
  // https://helpcenter.flourish.studio/hc/en-us/articles/8761537208463-How-to-embed-Flourish-charts-in-your-CMS
27
62
  const data_src = (map_graphs) => {
28
63
  if (typeof map_graphs === 'string') {
@@ -38,10 +73,11 @@ function IndicatorView(props) {
38
73
  };
39
74
 
40
75
  return (
41
- <div className="db-item-view indicator-view">
42
- <BannerTitle content={{ ...content, image: '' }} type="Indicator" />
76
+ <div className="db-item-view">
77
+ <BannerTitle content={{ ...content, image: '' }} type={subtitle} />
43
78
 
44
79
  <div className="ui container">
80
+ <PortalMessage content={content} />
45
81
  <Grid columns="12">
46
82
  <div className="row">
47
83
  <Grid.Column
@@ -62,6 +98,13 @@ function IndicatorView(props) {
62
98
  </LogoWrapper>
63
99
  <HTMLField value={long_description} />
64
100
 
101
+ {organisational_key_activities && (
102
+ <>
103
+ <h3>Key activities within climate change and health</h3>
104
+ <HTMLField value={organisational_key_activities} />
105
+ </>
106
+ )}
107
+
65
108
  {!!data_src(map_graphs) && (
66
109
  <iframe
67
110
  height="980"
@@ -71,53 +114,46 @@ function IndicatorView(props) {
71
114
  className="flourish-embed-iframe"
72
115
  frameBorder="0"
73
116
  scrolling="no"
74
- // style="width:100%;height:600px;"
75
117
  sandbox="allow-same-origin allow-forms allow-scripts allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation"
76
118
  ></iframe>
77
119
  )}
78
-
79
120
  <Divider />
80
- <h2>Reference information</h2>
81
121
 
82
- {websites && websites?.length > 0 && (
83
- <LinksList title="Websites:" value={websites} />
122
+ <ReferenceInfo content={content} />
123
+
124
+ {organisational_websites && (
125
+ <>
126
+ <h5>Links to further information</h5>
127
+ <HTMLField value={organisational_websites} />
128
+ </>
84
129
  )}
85
130
 
86
- <h5>Source:</h5>
87
- <HTMLField value={source} />
88
- {(contributor_list?.length > 0 ||
89
- other_contributor?.length > 0) && (
131
+ {organisational_contact_information && (
90
132
  <>
91
- <h4>Contributor:</h4>
92
- {contributor_list
93
- .map((item) => (
94
- <>
95
- {item.title}
96
- <br />
97
- </>
98
- ))
99
- .sort()}
100
- {other_contributor}
133
+ <h5>Contact information for the Observatory</h5>
134
+ <HTMLField value={organisational_contact_information} />
101
135
  </>
102
136
  )}
137
+
138
+ <ContentRelatedItems {...props} />
103
139
  <PublishedModifiedInfo {...props} />
104
140
  <ShareInfo {...props} />
105
141
  </Grid.Column>
142
+
106
143
  <Grid.Column
107
144
  mobile={12}
108
145
  tablet={12}
109
146
  computer={4}
110
147
  className="col-right"
111
148
  >
112
- <Segment>
113
- <ContentMetadata {...props} />
114
- </Segment>
149
+ <ContentMetadata {...props} />
150
+ <DocumentsList {...props} />
115
151
  </Grid.Column>
116
152
  </div>
117
153
  </Grid>
118
154
  </div>
119
155
  </div>
120
156
  );
121
- }
157
+ };
122
158
 
123
- export default IndicatorView;
159
+ export default DatabaseItemView;
@@ -3,7 +3,7 @@ import { MemoryRouter } from 'react-router-dom';
3
3
  import configureStore from 'redux-mock-store';
4
4
  import '@testing-library/jest-dom/extend-expect';
5
5
  import { Provider } from 'react-intl-redux';
6
- import InformationPortalView from './InformationPortalView';
6
+ import DatabaseItemView from './DatabaseItemView';
7
7
  import renderer from 'react-test-renderer';
8
8
  import config from '@plone/volto/registry';
9
9
 
@@ -21,12 +21,20 @@ jest.mock('semantic-ui-react', () => ({
21
21
  ...jest.requireActual('semantic-ui-react'),
22
22
  }));
23
23
 
24
- describe('InformationPortalView', () => {
24
+ describe('DatabaseItemView', () => {
25
25
  it('should render the component', () => {
26
26
  const content = {
27
- title: 'My InformationPortalView',
27
+ title: 'My DatabaseItemView',
28
+ long_description: {
29
+ 'content-type': null,
30
+ data:
31
+ '<p>Nam commodo suscipit quam. Praesent egestas neque eu enim. Quisque rutrum.</p>',
32
+ encoding: 'utf-8',
33
+ },
28
34
  geochars:
29
35
  '{\r\n "geoElements":{"element":"GLOBAL",\r\n "macrotrans":null,"biotrans":null,"countries":[],\r\n "subnational":[],"city":""}}',
36
+ keywords: ['keyword 1', 'keyword 2'],
37
+ websites: ['https://example.org/'],
30
38
  };
31
39
 
32
40
  const store = mockStore({
@@ -40,7 +48,7 @@ describe('InformationPortalView', () => {
40
48
  const component = renderer.create(
41
49
  <Provider store={store}>
42
50
  <MemoryRouter>
43
- <InformationPortalView content={content} />
51
+ <DatabaseItemView content={content} />
44
52
  </MemoryRouter>
45
53
  </Provider>,
46
54
  );
@@ -1,6 +1,9 @@
1
1
  import React from 'react';
2
2
  import { HTMLField } from '@eeacms/volto-cca-policy/helpers';
3
- import { BannerTitle } from '@eeacms/volto-cca-policy/components';
3
+ import {
4
+ BannerTitle,
5
+ PortalMessage,
6
+ } from '@eeacms/volto-cca-policy/components';
4
7
  import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
5
8
  import { When } from '@plone/volto/components/theme/View/EventDatesInfo';
6
9
  import { Grid } from 'semantic-ui-react';
@@ -14,6 +17,7 @@ function CcaEventView(props) {
14
17
  <BannerTitle content={content} />
15
18
 
16
19
  <div className="ui container">
20
+ <PortalMessage content={content} />
17
21
  <Grid columns="12">
18
22
  <div className="row">
19
23
  <Grid.Column
@@ -3,7 +3,10 @@ import React from 'react';
3
3
  import { HTMLField } from '@eeacms/volto-cca-policy/helpers';
4
4
  import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
5
5
  import { Label } from 'semantic-ui-react';
6
- import { BannerTitle } from '@eeacms/volto-cca-policy/components';
6
+ import {
7
+ BannerTitle,
8
+ PortalMessage,
9
+ } from '@eeacms/volto-cca-policy/components';
7
10
 
8
11
  // const Date = (props) => {
9
12
  // const date = props.content?.effective;
@@ -33,6 +36,7 @@ function CcaEventView(props) {
33
36
  <div className="cca-newsitem-view">
34
37
  <BannerTitle content={content} />
35
38
  <div className="ui container">
39
+ <PortalMessage content={content} />
36
40
  <p>{content.description}</p>
37
41
  <HTMLField value={content.text} className="long_description" />
38
42
  <RenderBlocks {...props} />
@@ -2,12 +2,13 @@ import React from 'react';
2
2
  import {
3
3
  HTMLField,
4
4
  ContentMetadata,
5
- LinksList,
6
5
  PublishedModifiedInfo,
7
6
  ShareInfo,
7
+ ReferenceInfo,
8
8
  LogoWrapper,
9
9
  } from '@eeacms/volto-cca-policy/helpers';
10
- import { Divider, Segment, Image, Grid } from 'semantic-ui-react';
10
+ import { Divider, Image, Grid } from 'semantic-ui-react';
11
+ import { PortalMessage } from '@eeacms/volto-cca-policy/components';
11
12
 
12
13
  import config from '@plone/volto/registry';
13
14
 
@@ -20,7 +21,6 @@ function ProjectView(props) {
20
21
  partners,
21
22
  acronym,
22
23
  title,
23
- websites,
24
24
  logo,
25
25
  } = content;
26
26
 
@@ -51,6 +51,7 @@ function ProjectView(props) {
51
51
  />
52
52
 
53
53
  <div className="ui container">
54
+ <PortalMessage content={content} />
54
55
  <Grid columns="12">
55
56
  <div className="row">
56
57
  <Grid.Column
@@ -86,12 +87,7 @@ function ProjectView(props) {
86
87
  )}
87
88
 
88
89
  <Divider />
89
- <h2>Reference information</h2>
90
-
91
- {websites && websites?.length > 0 && (
92
- <LinksList title="Websites:" value={websites} />
93
- )}
94
-
90
+ <ReferenceInfo content={content} />
95
91
  <PublishedModifiedInfo {...props} />
96
92
  <ShareInfo {...props} />
97
93
  </Grid.Column>
@@ -101,9 +97,7 @@ function ProjectView(props) {
101
97
  computer={4}
102
98
  className="col-right"
103
99
  >
104
- <Segment>
105
- <ContentMetadata {...props} />
106
- </Segment>
100
+ <ContentMetadata {...props} />
107
101
  </Grid.Column>
108
102
  </div>
109
103
  </Grid>