@eeacms/volto-clms-theme 1.0.41 → 1.0.45

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 (60) hide show
  1. package/CHANGELOG.md +117 -0
  2. package/Jenkinsfile +17 -19
  3. package/package.json +5 -3
  4. package/src/actions/geonetwork/import_geonetwork.js +21 -0
  5. package/src/actions/index.js +16 -0
  6. package/src/actions/registry/registry.js +21 -0
  7. package/src/actions/userschema/userschema.js +17 -0
  8. package/src/components/Blocks/CclHomeBgImageBlock/CclGreenBgView.jsx +32 -8
  9. package/src/components/Blocks/CclHomeBgImageBlock/CclHomeBgImageBlockEdit.jsx +5 -1
  10. package/src/components/Blocks/CclHomeBgImageBlock/CclHomeBgImageSchema.js +36 -7
  11. package/src/components/Blocks/CclRelatedListingBlock/CclRelatedListingEdit.jsx +95 -0
  12. package/src/components/Blocks/CclRelatedListingBlock/CclRelatedListingView.jsx +67 -0
  13. package/src/components/Blocks/CclRelatedListingBlock/schema.js +34 -0
  14. package/src/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselEdit.jsx +38 -0
  15. package/src/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselView.jsx +41 -0
  16. package/src/components/Blocks/CclTextLinkCarouselBlock/TextLinkCarouselSchema.js +18 -0
  17. package/src/components/Blocks/CustomTemplates/VoltoListingBlock/CclListingWorkOpportunities.jsx +5 -15
  18. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclCarouselView.jsx +39 -13
  19. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclProductTabsView.jsx +6 -1
  20. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclVerticalFaqTabsView.jsx +19 -60
  21. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/FixTemplates.jsx +19 -0
  22. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/custom.less +55 -1
  23. package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/index.js +2 -0
  24. package/src/components/Blocks/customBlocks.js +97 -26
  25. package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.jsx +175 -15
  26. package/src/components/CLMSDatasetDetailView/DataSetInfoContent.jsx +20 -13
  27. package/src/components/CLMSDatasetDetailView/MetadataContent.jsx +26 -7
  28. package/src/components/CLMSDownloadCartView/CLMSDownloadCartView.jsx +5 -1
  29. package/src/components/CLMSProfileView/CLMSApiTokensView.jsx +55 -33
  30. package/src/components/CLMSProfileView/CLMSProfileView.jsx +28 -15
  31. package/src/components/CLMSProfileView/CLMSUserProfileView.jsx +37 -64
  32. package/src/components/CclCard/CclCard.jsx +1 -7
  33. package/src/components/CclCard/cards.less +1 -1
  34. package/src/components/CclLoginModal/CclLoginModal.jsx +83 -0
  35. package/src/components/CclLoginModal/ccl-login-modal.css +3 -0
  36. package/src/components/CclModal/CclModal.jsx +20 -5
  37. package/src/components/Widgets/ContactWidget.jsx +91 -0
  38. package/src/components/Widgets/DistributionInfoWidget.jsx +40 -0
  39. package/src/components/Widgets/GeonetworkIdentifiersWidget.jsx +48 -0
  40. package/src/components/Widgets/TextLinkWidget.jsx +41 -0
  41. package/src/constants/ActionTypes.js +1 -0
  42. package/src/customizations/volto/components/theme/Header/Header.jsx +31 -31
  43. package/src/customizations/volto/components/theme/SearchWidget/SearchWidget.jsx +11 -3
  44. package/src/index.js +13 -8
  45. package/src/reducers/geonetwork/import_geonetwork_reducer.js +45 -0
  46. package/src/reducers/index.js +9 -3
  47. package/src/reducers/registry/registry.js +46 -0
  48. package/src/reducers/tokens/tokens.js +14 -10
  49. package/src/reducers/userschema/userschema.js +48 -0
  50. package/theme/clms/css/breadcrumbs.css +1 -0
  51. package/theme/clms/css/carousel.css +109 -11
  52. package/theme/clms/css/forms.css +6 -1
  53. package/theme/clms/css/home.css +29 -4
  54. package/theme/clms/css/maps.css +4 -0
  55. package/theme/clms/css/maps.less +4 -0
  56. package/theme/clms/css/styles.less +12 -3
  57. package/src/components/Blocks/CclTechnicalLibrariesList/CclTechnicalLibrariesListEdit.jsx +0 -63
  58. package/src/components/Blocks/CclTechnicalLibrariesList/CclTechnicalLibrariesListView.jsx +0 -43
  59. package/src/components/Blocks/CclTechnicalLibrariesList/TechnicalLibrariesListSchema.js +0 -17
  60. package/src/components/CLMSServiceDeskView/CLMSServiceDeskView.jsx +0 -113
@@ -27,6 +27,8 @@ import CclHomeSearchBlockEdit from '@eeacms/volto-clms-theme/components/Blocks/C
27
27
  import {
28
28
  DefaultEdit,
29
29
  defaultSchema,
30
+ TabsEdit,
31
+ TabsView,
30
32
  } from '@eeacms/volto-tabs-block/components';
31
33
  import { TABS_BLOCK } from '@eeacms/volto-tabs-block/constants';
32
34
 
@@ -37,6 +39,7 @@ import {
37
39
  CclCarouselView,
38
40
  RoutingHOC,
39
41
  CclProductTabsView,
42
+ FixTemplates,
40
43
  } from '@eeacms/volto-clms-theme/components/Blocks/CustomTemplates/VoltoTabsBlock';
41
44
 
42
45
  import {
@@ -61,8 +64,12 @@ import { ARCGIS_BLOCK } from '@eeacms/volto-arcgis-block/constants';
61
64
  import CclUseCaseListView from '@eeacms/volto-clms-theme/components/Blocks/CclUseCaseList/CclUseCaseListView';
62
65
  import CclUseCaseListEdit from '@eeacms/volto-clms-theme/components/Blocks/CclUseCaseList/CclUseCaseListEdit';
63
66
 
64
- import CclTechnicalLibrariesListView from '@eeacms/volto-clms-theme/components/Blocks/CclTechnicalLibrariesList/CclTechnicalLibrariesListView';
65
- import CclTechnicalLibrariesListEdit from '@eeacms/volto-clms-theme/components/Blocks/CclTechnicalLibrariesList/CclTechnicalLibrariesListEdit';
67
+ import CclRelatedListingView from '@eeacms/volto-clms-theme/components/Blocks/CclRelatedListingBlock/CclRelatedListingView';
68
+ import CclRelatedListingEdit from '@eeacms/volto-clms-theme/components/Blocks/CclRelatedListingBlock/CclRelatedListingEdit';
69
+ import RelatedListingSchema from '@eeacms/volto-clms-theme/components/Blocks/CclRelatedListingBlock/schema';
70
+
71
+ import TextLinkCarouselView from '@eeacms/volto-clms-theme/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselView';
72
+ import TextLinkCarouselEdit from '@eeacms/volto-clms-theme/components/Blocks/CclTextLinkCarouselBlock/CclTextLinkCarouselEdit';
66
73
 
67
74
  import upSVG from '@plone/volto/icons/up-key.svg';
68
75
  import downSVG from '@plone/volto/icons/down-key.svg';
@@ -74,6 +81,11 @@ export const customGroupBlocksOrder = {
74
81
 
75
82
  const customBlocks = (config) => ({
76
83
  ...config.blocks.blocksConfig,
84
+ video: {
85
+ ...config.blocks.blocksConfig.video,
86
+ mostUsed: false,
87
+ },
88
+
77
89
  [ARCGIS_BLOCK]: {
78
90
  ...config.blocks.blocksConfig[ARCGIS_BLOCK],
79
91
  styles: {
@@ -93,8 +105,12 @@ const customBlocks = (config) => ({
93
105
  },
94
106
  [TABS_BLOCK]: {
95
107
  ...config.blocks.blocksConfig[TABS_BLOCK],
108
+ edit: FixTemplates(TabsEdit),
109
+ view: FixTemplates(TabsView),
110
+ deprecated_templates: ['CCLTabs', 'CclRouteTabsView'],
111
+ mostUsed: true, // A meta group `most used`, appearing at the top of the chooser
96
112
  templates: {
97
- CCLTabs: {
113
+ default: {
98
114
  title: 'Horizontal Tabs',
99
115
  edit: DefaultEdit,
100
116
  view: CclTabsView,
@@ -109,13 +125,13 @@ const customBlocks = (config) => ({
109
125
  CCLProductTabs: {
110
126
  title: 'Vertical Product Tabs',
111
127
  edit: DefaultEdit,
112
- view: CclProductTabsView,
128
+ view: RoutingHOC(CclProductTabsView),
113
129
  schema: defaultSchema,
114
130
  },
115
131
  CCLVerticalFaqTabs: {
116
132
  title: 'Vertical FAQ Tabs',
117
133
  edit: DefaultEdit,
118
- view: CclVerticalFaqTabsView,
134
+ view: RoutingHOC(CclVerticalFaqTabsView),
119
135
  schema: defaultSchema,
120
136
  },
121
137
  CCLCarousel: {
@@ -130,59 +146,59 @@ const customBlocks = (config) => ({
130
146
  ...config.blocks.blocksConfig.listing,
131
147
  showLinkMore: true,
132
148
  variations: [
133
- ...config.blocks.blocksConfig.listing.variations,
134
149
  {
135
- id: 'CclCardsline-color',
136
- isDefault: false,
137
- title: 'CclCards Colored Line',
150
+ id: 'CclCardsdoc',
151
+ isDefault: true,
152
+ title: 'Line list',
138
153
  template: CclListingCards,
139
154
  },
140
155
  {
141
156
  id: 'CclCardsline',
142
157
  isDefault: false,
143
- title: 'CclCards Image Line',
158
+ title: 'Line list with Image',
144
159
  template: CclListingCards,
145
160
  },
146
161
  {
147
- id: 'CclCardsdoc',
162
+ id: 'CclCardsline-color',
148
163
  isDefault: false,
149
- title: 'CclCards Line',
164
+ title: 'Colored Line list with Image',
150
165
  template: CclListingCards,
151
166
  },
152
167
  {
153
168
  id: 'CclCardsblock',
154
169
  isDefault: false,
155
- title: 'CclCards Block',
170
+ title: 'Cards list',
156
171
  template: CclListingCards,
157
172
  },
158
173
  {
159
174
  id: 'CclCardsnews',
160
175
  isDefault: false,
161
- title: 'CclCards News',
176
+ title: 'News Line list',
162
177
  template: CclListingCards,
163
178
  },
164
179
  {
165
180
  id: 'CclCardsevent',
166
181
  isDefault: false,
167
- title: 'CclCards Events',
182
+ title: 'Events Line list',
168
183
  template: CclListingCards,
169
184
  },
170
185
  {
171
186
  id: 'CclWOOpenTenders',
172
187
  isDefault: false,
173
- title: 'CclWO Open Tenders',
188
+ title: 'Open Work Opportunities',
174
189
  template: CclListingWorkOpportunities,
175
190
  },
176
191
  {
177
192
  id: 'CclWOCloseTenders',
178
193
  isDefault: false,
179
- title: 'CclWO Close Tenders',
194
+ title: 'Closed Work Opportunities',
180
195
  template: CclListingWorkOpportunities,
181
196
  },
182
197
  ],
183
198
  },
184
199
  accordion: {
185
200
  ...config.blocks.blocksConfig.accordion,
201
+ mostUsed: true,
186
202
  titleIcons: {
187
203
  closed: { leftPosition: downSVG, rightPosition: downSVG },
188
204
  opened: { leftPosition: upSVG, rightPosition: upSVG },
@@ -264,7 +280,7 @@ const customBlocks = (config) => ({
264
280
  view: CclProductLeftMenuView, // The view mode component
265
281
  edit: CclProductLeftMenuEdit, // The edit mode component
266
282
  restricted: false, // If the block is restricted, it won't show in the chooser
267
- mostUsed: true, // A meta group `most used`, appearing at the top of the chooser
283
+ mostUsed: false, // A meta group `most used`, appearing at the top of the chooser
268
284
  blockHasOwnFocusManagement: false, // Set this to true if the block manages its own focus
269
285
  sidebarTab: 1, // The sidebar tab you want to be selected when selecting the block
270
286
  security: {
@@ -324,7 +340,7 @@ const customBlocks = (config) => ({
324
340
  },
325
341
  homeBgImage: {
326
342
  id: 'homeBgImage', // The name (id) of the block
327
- title: 'Home BG Image', // The display name of the block
343
+ title: 'Carousel Item', // The display name of the block
328
344
  icon: homeBand, // The icon used in the block chooser
329
345
  group: 'ccl_blocks', // The group (blocks can be grouped, displayed in the chooser)
330
346
  view: CclHomeBgImageBlockView, // The view mode component
@@ -342,12 +358,12 @@ const customBlocks = (config) => ({
342
358
  {
343
359
  id: 'green-bg',
344
360
  isDefault: true,
345
- title: 'Green background carousel',
361
+ title: 'Green background',
346
362
  template: CclGreenBgView,
347
363
  },
348
364
  {
349
365
  id: 'white-bg',
350
- title: 'White background carousel',
366
+ title: 'White background',
351
367
  template: CclWhiteBgView,
352
368
  },
353
369
  ],
@@ -368,13 +384,68 @@ const customBlocks = (config) => ({
368
384
  view: [], // Future proof (not implemented yet) view user role(s)
369
385
  },
370
386
  },
371
- technicalLibrariesList: {
372
- id: 'technicalLibrariesList', // The name (id) of the block
373
- title: 'Technical Libraries List', // The display name of the block
387
+ relatedListing: {
388
+ id: 'relatedListing', // The name (id) of the block
389
+ title: 'Related items listing', // The display name of the block
390
+ icon: homeBand, // The icon used in the block chooser
391
+ group: 'ccl_blocks', // The group (blocks can be grouped, displayed in the chooser)
392
+ view: CclRelatedListingView, // The view mode component
393
+ edit: CclRelatedListingEdit, // The edit mode component
394
+ schema: RelatedListingSchema,
395
+ restricted: false, // If the block is restricted, it won't show in the chooser
396
+ mostUsed: false, // A meta group `most used`, appearing at the top of the chooser
397
+ blockHasOwnFocusManagement: false, // Set this to true if the block manages its own focus
398
+ sidebarTab: 1, // The sidebar tab you want to be selected when selecting the block
399
+ security: {
400
+ addPermission: [], // Future proof (not implemented yet) add user permission role(s)
401
+ view: [], // Future proof (not implemented yet) view user role(s)
402
+ },
403
+ variations: [
404
+ {
405
+ id: 'CclCardsdoc',
406
+ isDefault: false,
407
+ title: 'Line list',
408
+ template: CclListingCards,
409
+ },
410
+ {
411
+ id: 'CclCardsline',
412
+ isDefault: true,
413
+ title: 'Line list with Image',
414
+ template: CclListingCards,
415
+ },
416
+ {
417
+ id: 'CclCardsline-color',
418
+ isDefault: false,
419
+ title: 'Colored Line list with Image',
420
+ template: CclListingCards,
421
+ },
422
+ {
423
+ id: 'CclCardsblock',
424
+ isDefault: false,
425
+ title: 'Cards list',
426
+ template: CclListingCards,
427
+ },
428
+ {
429
+ id: 'CclCardsnews',
430
+ isDefault: false,
431
+ title: 'News Line list',
432
+ template: CclListingCards,
433
+ },
434
+ {
435
+ id: 'CclCardsevent',
436
+ isDefault: false,
437
+ title: 'Events Line list',
438
+ template: CclListingCards,
439
+ },
440
+ ],
441
+ },
442
+ textLinkCarousel: {
443
+ id: 'textLinkCarousel', // The name (id) of the block
444
+ title: 'Text and Link Carousel', // The display name of the block
374
445
  icon: homeBand, // The icon used in the block chooser
375
446
  group: 'ccl_blocks', // The group (blocks can be grouped, displayed in the chooser)
376
- view: CclTechnicalLibrariesListView, // The view mode component
377
- edit: CclTechnicalLibrariesListEdit, // The edit mode component
447
+ view: TextLinkCarouselView, // The view mode component
448
+ edit: TextLinkCarouselEdit, // The edit mode component
378
449
  restricted: false, // If the block is restricted, it won't show in the chooser
379
450
  mostUsed: false, // A meta group `most used`, appearing at the top of the chooser
380
451
  blockHasOwnFocusManagement: false, // Set this to true if the block manages its own focus
@@ -3,21 +3,27 @@
3
3
  * @module components/theme/View/CLMSDatasetDetailView
4
4
  */
5
5
 
6
- import React from 'react';
7
- import PropTypes from 'prop-types';
8
- // import { FormattedMessage } from 'react-intl';
9
- import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
10
- import CclTabs from '@eeacms/volto-clms-theme/components/CclTab/CclTabs';
11
6
  import {
12
7
  DataSetInfoContent,
13
8
  DownloadDataSetContent,
14
9
  MetadataContent,
15
10
  } from '@eeacms/volto-clms-theme/components/CLMSDatasetDetailView';
16
- import { useLocation } from 'react-router-dom';
11
+ import { Modal, Segment } from 'semantic-ui-react';
12
+ import { useDispatch, useSelector } from 'react-redux';
13
+
14
+ import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
15
+ import CclTabs from '@eeacms/volto-clms-theme/components/CclTab/CclTabs';
16
+ import { FormattedMessage } from 'react-intl';
17
+ import PropTypes from 'prop-types';
18
+ import React from 'react';
17
19
  import { compose } from 'redux';
18
20
  import { connect } from 'react-redux';
19
- import jwtDecode from 'jwt-decode';
21
+ import { getUser } from '@plone/volto/actions';
20
22
  import { injectIntl } from 'react-intl';
23
+ import jwtDecode from 'jwt-decode';
24
+ import { postImportGeonetwork } from '../../actions';
25
+ import { useLocation } from 'react-router-dom';
26
+
21
27
  // import {
22
28
  // mockDatabaseInfo,
23
29
  // mockMetadata,
@@ -35,20 +41,169 @@ import { injectIntl } from 'react-intl';
35
41
 
36
42
  const CLMSDatasetDetailView = ({ content, token }) => {
37
43
  const location = useLocation();
44
+ const dispatch = useDispatch();
45
+ const geonetwork_importation = useSelector(
46
+ (state) => state.geonetwork_importation,
47
+ );
48
+ // const userSession = useSelector((state) => state.userSession);
49
+ // const user_token = userSession.token ? jwtDecode(userSession.token).sub : '';
50
+ const user = useSelector((state) => state.users?.user);
51
+ React.useEffect(() => {
52
+ dispatch(getUser(token));
53
+ }, [dispatch, token]);
54
+
55
+ function handleImport(id, type) {
56
+ dispatch(postImportGeonetwork(location.pathname, id, type));
57
+ }
58
+ const [open, setOpen] = React.useState({});
59
+ const locale = useSelector((state) => state.intl.locale);
38
60
 
39
61
  return (
40
62
  <div className="ccl-container ">
41
63
  <h1 className="page-title">{content.title}</h1>
64
+ {content.geonetwork_identifiers?.items?.length > 0 &&
65
+ user.roles &&
66
+ user.roles.includes('Manager') && (
67
+ <Segment.Group compact horizontal>
68
+ {content.geonetwork_identifiers?.items.map((item) => {
69
+ return (
70
+ <Segment
71
+ padded={'very'}
72
+ color={'olive'}
73
+ key={item.id}
74
+ loading={geonetwork_importation.loading}
75
+ circular
76
+ >
77
+ <strong>
78
+ {item.title} (from {item.type}):{' '}
79
+ </strong>
80
+ <br />
81
+ <br />
82
+ <Modal
83
+ onClose={() => {
84
+ setOpen({ ...open, [item.id]: false });
85
+ }}
86
+ onOpen={() => {
87
+ setOpen({ ...open, [item.id]: true });
88
+ }}
89
+ open={open[item.id]}
90
+ trigger={
91
+ <CclButton>
92
+ <FormattedMessage
93
+ id="Import data"
94
+ defaultMessage="Import data"
95
+ />
96
+ </CclButton>
97
+ }
98
+ className={'modal-clms'}
99
+ >
100
+ <div className={'modal-clms-background'}>
101
+ <div className={'modal-clms-container'}>
102
+ <div className={'modal-close modal-clms-close'}>
103
+ <span
104
+ className="ccl-icon-close"
105
+ aria-label="Close"
106
+ onClick={() => {
107
+ setOpen({ ...open, [item.id]: false });
108
+ }}
109
+ onKeyDown={() => {
110
+ setOpen({ ...open, [item.id]: false });
111
+ }}
112
+ tabIndex="0"
113
+ role="button"
114
+ ></span>
115
+ </div>
116
+ <div className="modal-login-text">
117
+ <h1>
118
+ <FormattedMessage
119
+ id="Import from GeoNetwork"
120
+ defaultMessage="Import from GeoNetwork"
121
+ />
122
+ </h1>
123
+ This action will import the data from{' '}
124
+ <strong>{item.title}</strong> (from {item.type}) into
125
+ this dataset.
126
+ <br />
127
+ <br />
128
+ {item.type === 'EEA' && (
129
+ <a
130
+ target="_blank"
131
+ rel="noreferrer"
132
+ href={
133
+ 'https://sdi.eea.europa.eu/catalogue/srv/eng/catalog.search#/metadata/' +
134
+ item.id
135
+ }
136
+ >
137
+ <FormattedMessage
138
+ id="EEA Geonetwork element"
139
+ defaultMessage="EEA Geonetwork element"
140
+ />
141
+ </a>
142
+ )}
143
+ {item.type === 'VITO' && (
144
+ <a
145
+ target="_blank"
146
+ rel="noreferrer"
147
+ href={
148
+ 'https://land.copernicus.vgt.vito.be/geonetwork/srv/eng/catalog.search#/metadata/' +
149
+ item.id
150
+ }
151
+ >
152
+ <FormattedMessage
153
+ id="VITO Geonetwork element"
154
+ defaultMessage="VITO Geonetwork element"
155
+ />
156
+ </a>
157
+ )}
158
+ </div>
159
+ <CclButton
160
+ onClick={() => {
161
+ handleImport(item.id, item.type);
162
+ setOpen({ ...open, [item.id]: false });
163
+ }}
164
+ mode="filled"
165
+ >
166
+ <FormattedMessage
167
+ id="Import data"
168
+ defaultMessage="Import data"
169
+ />
170
+ </CclButton>
171
+ </div>
172
+ </div>
173
+ </Modal>
174
+ {geonetwork_importation.imported_data
175
+ ?.requested_geonetwork_id === item.id && (
176
+ <p>
177
+ {geonetwork_importation.loaded &&
178
+ geonetwork_importation.error === null && (
179
+ <strong>
180
+ {' '}
181
+ The data has been successfully imported
182
+ </strong>
183
+ )}
184
+ </p>
185
+ )}
186
+ {geonetwork_importation.imported_data?.status === 'error' && (
187
+ <p>
188
+ <strong>
189
+ {' '}
190
+ {geonetwork_importation.imported_data?.message}
191
+ </strong>
192
+ </p>
193
+ )}
194
+ </Segment>
195
+ );
196
+ })}
197
+ </Segment.Group>
198
+ )}
42
199
  <CclTabs>
43
200
  <div tabTitle="General Info">{DataSetInfoContent(content)}</div>
44
201
  <div tabTitle="Metadata">{MetadataContent(content)}</div>
45
- {(content.mapviewer_viewservice?.length === 0 ||
46
- content.mapviewer_viewservice === null) &&
47
- (content.downloadable_files?.items?.length === 0 ||
48
- content.downloadable_files === null) ? (
49
- <div tabTitle=""></div>
50
- ) : (
202
+
203
+ {content?.downloadable_dataset ? (
51
204
  <div tabTitle="Download">{DownloadDataSetContent(content)}</div>
205
+ ) : (
206
+ <div tabTitle=""></div>
52
207
  )}
53
208
 
54
209
  <div underPanel={true}>
@@ -63,8 +218,13 @@ const CLMSDatasetDetailView = ({ content, token }) => {
63
218
  )}
64
219
  {content?.mapviewer_viewservice?.length > 0 && (
65
220
  <div className="menu-detail-button">
66
- <CclButton url={location.pathname + '/map-viewer'}>
67
- View in the map viewer
221
+ <CclButton
222
+ url={'/' + locale + '/map-viewer?dataset=' + content.UID}
223
+ >
224
+ <FormattedMessage
225
+ id="View in the map viewer"
226
+ defaultMessage="View in the map viewer"
227
+ />
68
228
  </CclButton>
69
229
  </div>
70
230
  )}
@@ -12,11 +12,10 @@ import config from '@plone/volto/registry';
12
12
 
13
13
  const DataSetInfoContent = (props) => {
14
14
  const dispatch = useDispatch();
15
- const path = props.parent['@id'];
16
- const parent = useSelector((state) => state.reduxAsyncConnect.content.parent);
17
- const parentId = parent['@id'].split('/').pop();
15
+ const { UID, id } = props;
16
+ const path = props['@id'];
18
17
  const searchSubrequests = useSelector((state) => state.search.subrequests);
19
- let libraries = searchSubrequests?.[props.id]?.items || [];
18
+ let libraries = searchSubrequests?.[id]?.items || [];
20
19
 
21
20
  React.useEffect(() => {
22
21
  dispatch(
@@ -26,12 +25,12 @@ const DataSetInfoContent = (props) => {
26
25
  fullobjects: 1,
27
26
  portal_type: 'TechnicalLibrary',
28
27
  path: '/',
29
- associated_products: parentId,
28
+ associated_datasets: UID,
30
29
  },
31
- props.id,
30
+ id,
32
31
  ),
33
32
  );
34
- }, [path, props.id, parentId, dispatch]);
33
+ }, [path, id, UID, dispatch]);
35
34
 
36
35
  const [activeIndex, setActiveIndex] = React.useState([0]);
37
36
 
@@ -52,12 +51,13 @@ const DataSetInfoContent = (props) => {
52
51
 
53
52
  return (
54
53
  <div>
55
- <CclCitation title="Validation status" marginBottom={true}>
56
- <p>
57
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis luctus
58
- mauris ante, a iaculis leo placerat quis.
59
- </p>
60
- </CclCitation>
54
+ {props?.validation?.data && (
55
+ <CclCitation
56
+ title="Validation status"
57
+ marginBottom={true}
58
+ children={<StringToHTML string={props.validation.data} />}
59
+ ></CclCitation>
60
+ )}
61
61
  <CclInfoContainer>
62
62
  <h2>General Info</h2>
63
63
 
@@ -130,6 +130,13 @@ const DataSetInfoContent = (props) => {
130
130
  </div>
131
131
  </div>
132
132
  )}
133
+
134
+ <CclCitation title="Dataset citation" marginBottom={true}>
135
+ <p>
136
+ © European Union, Copernicus Land Monitoring Service , European
137
+ Environment Agency (EEA)
138
+ </p>
139
+ </CclCitation>
133
140
  </div>
134
141
  );
135
142
  };
@@ -6,13 +6,32 @@ import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
6
6
  const MetadataContent = (data) => {
7
7
  return (
8
8
  <>
9
- <CclButton
10
- className="ccl-button ccl-button--default download-dataset-metadata"
11
- url={data['@id']}
12
- download={true}
13
- >
14
- Download metadata
15
- </CclButton>
9
+ {data.geonetwork_identifiers?.items.map((item) => {
10
+ return item.type === 'EEA' ? (
11
+ <CclButton
12
+ className="ccl-button ccl-button--default download-dataset-metadata"
13
+ url={
14
+ 'https://sdi.eea.europa.eu/catalogue/srv/eng/catalog.search#/metadata/' +
15
+ item.id
16
+ }
17
+ download={true}
18
+ >
19
+ Download metadata: {item.title}
20
+ </CclButton>
21
+ ) : (
22
+ <CclButton
23
+ className="ccl-button ccl-button--default download-dataset-metadata"
24
+ url={
25
+ 'https://land.copernicus.vgt.vito.be/geonetwork/srv/eng/catalog.search#/metadata/' +
26
+ item.id
27
+ }
28
+ download={true}
29
+ >
30
+ Download metadata: {item.title}
31
+ </CclButton>
32
+ );
33
+ })}
34
+
16
35
  <CclInfoContainer>
17
36
  <h2>Data identification</h2>
18
37
  <CclInfoDescription
@@ -275,7 +275,11 @@ const CLMSDownloadCartView = (props) => {
275
275
  <tr>
276
276
  <td
277
277
  colSpan={11}
278
- style={{ textAlign: 'center', fontSize: '1.5em' }}
278
+ style={{
279
+ textAlign: 'center',
280
+ color: '#adb0b8',
281
+ opacity: 0.5,
282
+ }}
279
283
  >
280
284
  Empty cart
281
285
  </td>