@eeacms/volto-clms-theme 1.0.46 → 1.0.47
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.
- package/CHANGELOG.md +18 -0
- package/package.json +1 -1
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclVerticalTabsView.jsx +43 -17
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/TabsWidget.jsx +50 -0
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/subTabSchema.js +19 -0
- package/src/components/CLMSDatasetDetailView/BoundingBoxComponent.jsx +20 -0
- package/src/components/CLMSDatasetDetailView/ContactComponent.jsx +44 -0
- package/src/components/CLMSDatasetDetailView/DistributionInfoComponent.jsx +20 -0
- package/src/components/CLMSDatasetDetailView/MetadataContent.jsx +145 -61
- package/src/components/CLMSEventView/CLMSEventView.jsx +15 -13
- package/src/components/CLMSNewsItemView/CLMSNewsItemView.jsx +13 -11
- package/src/components/CclCard/CclCard.jsx +8 -5
- package/src/components/CclInfoDescription/CclInfoDescription.jsx +8 -6
- package/theme/clms/css/menu.css +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,26 @@ 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
|
+
#### [1.0.47](https://github.com/eea/volto-clms-theme/compare/1.0.46...1.0.47)
|
|
8
|
+
|
|
9
|
+
- use smaller images in Cards [`#147`](https://github.com/eea/volto-clms-theme/pull/147)
|
|
10
|
+
- Demo modifications [`#154`](https://github.com/eea/volto-clms-theme/pull/154)
|
|
11
|
+
- Geonetwork fields [`#153`](https://github.com/eea/volto-clms-theme/pull/153)
|
|
12
|
+
- Sub tab option created [`#152`](https://github.com/eea/volto-clms-theme/pull/152)
|
|
13
|
+
- add Role label [`ae98fda`](https://github.com/eea/volto-clms-theme/commit/ae98fdac159d385554a67d3a0690ba17b5dfa244)
|
|
14
|
+
- show all the fields of geonetwork [`9eae556`](https://github.com/eea/volto-clms-theme/commit/9eae55614a26e84613dd747451e9a3fb864a6ac4)
|
|
15
|
+
- if parent tab is clicked sub tab is opened [`5cc5d1c`](https://github.com/eea/volto-clms-theme/commit/5cc5d1c93691985965640499951e0a905da8acbb)
|
|
16
|
+
- add the content url to the simple line listing template [`6ad396f`](https://github.com/eea/volto-clms-theme/commit/6ad396fdaf1850a3d509f4f640e421278341b74b)
|
|
17
|
+
- pretier fix on text carousel [`5e18334`](https://github.com/eea/volto-clms-theme/commit/5e183349cf13b6f2739dbbfbbd48617bc6c9c34c)
|
|
18
|
+
- SubTab style set [`73d9fa8`](https://github.com/eea/volto-clms-theme/commit/73d9fa85b05055b180409927583b71dc0a562f0f)
|
|
19
|
+
- remove default image from New and Event view [`0ef541d`](https://github.com/eea/volto-clms-theme/commit/0ef541dbede5316c46f48585b9728a672f03b7ad)
|
|
20
|
+
- use smaller images [`a545b9e`](https://github.com/eea/volto-clms-theme/commit/a545b9ed547fa124903b66987e6d7b3e46c17146)
|
|
21
|
+
|
|
7
22
|
#### [1.0.46](https://github.com/eea/volto-clms-theme/compare/1.0.45...1.0.46)
|
|
8
23
|
|
|
24
|
+
> 15 December 2021
|
|
25
|
+
|
|
26
|
+
- Develop [`#151`](https://github.com/eea/volto-clms-theme/pull/151)
|
|
9
27
|
- volto-form-block style [`#150`](https://github.com/eea/volto-clms-theme/pull/150)
|
|
10
28
|
- Bugs n improvements [`#149`](https://github.com/eea/volto-clms-theme/pull/149)
|
|
11
29
|
- Develop [`#148`](https://github.com/eea/volto-clms-theme/pull/148)
|
package/package.json
CHANGED
|
@@ -47,30 +47,56 @@ const CclVerticalTabsView = (props) => {
|
|
|
47
47
|
setActiveTab = () => {},
|
|
48
48
|
} = props;
|
|
49
49
|
const title = tabs[tab].title;
|
|
50
|
+
const subTab = tabs[tab]?.subTab || false;
|
|
50
51
|
const tabIndex = index + 1;
|
|
52
|
+
const nextTabIndex = index + 2;
|
|
53
|
+
const nextSubTab = tabs[tabsList[tabIndex]]?.subTab || false;
|
|
51
54
|
const defaultTitle = `Tab ${tabIndex}`;
|
|
52
55
|
return (
|
|
53
56
|
<div
|
|
54
57
|
key={index}
|
|
55
58
|
id={tabIndex}
|
|
56
|
-
className={cx(
|
|
59
|
+
className={cx(
|
|
60
|
+
'card',
|
|
61
|
+
tab === activeTab && 'active',
|
|
62
|
+
subTab && 'subcard',
|
|
63
|
+
)}
|
|
57
64
|
>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
{subTab === false && nextSubTab !== false ? (
|
|
66
|
+
<NavLink
|
|
67
|
+
to={'#tab' + nextTabIndex}
|
|
68
|
+
className="collapsed"
|
|
69
|
+
onClick={(e) => {
|
|
70
|
+
if (activeTab !== tab) {
|
|
71
|
+
setActiveTab(tab);
|
|
72
|
+
}
|
|
73
|
+
}}
|
|
74
|
+
onKeyDown={() => {
|
|
75
|
+
if (activeTab !== tab) {
|
|
76
|
+
setActiveTab(tab);
|
|
77
|
+
}
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
{title || defaultTitle}
|
|
81
|
+
</NavLink>
|
|
82
|
+
) : (
|
|
83
|
+
<NavLink
|
|
84
|
+
to={'#tab' + tabIndex}
|
|
85
|
+
className="collapsed"
|
|
86
|
+
onClick={(e) => {
|
|
87
|
+
if (activeTab !== tab) {
|
|
88
|
+
setActiveTab(tab);
|
|
89
|
+
}
|
|
90
|
+
}}
|
|
91
|
+
onKeyDown={() => {
|
|
92
|
+
if (activeTab !== tab) {
|
|
93
|
+
setActiveTab(tab);
|
|
94
|
+
}
|
|
95
|
+
}}
|
|
96
|
+
>
|
|
97
|
+
{title || defaultTitle}
|
|
98
|
+
</NavLink>
|
|
99
|
+
)}
|
|
74
100
|
</div>
|
|
75
101
|
);
|
|
76
102
|
})}
|
|
@@ -12,8 +12,10 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
|
12
12
|
import { faIcons, faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';
|
|
13
13
|
import trashSVG from '@plone/volto/icons/delete.svg';
|
|
14
14
|
import plusSVG from '@plone/volto/icons/circle-plus.svg';
|
|
15
|
+
import leftMenuSVG from '@plone/volto/icons/nav.svg';
|
|
15
16
|
import { SidebarPopup } from '@plone/volto/components';
|
|
16
17
|
import { fontAwesomeSchema } from './fontAwesomeSchema';
|
|
18
|
+
import { subTabSchema } from './subTabSchema';
|
|
17
19
|
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
18
20
|
import clearSVG from '@plone/volto/icons/clear.svg';
|
|
19
21
|
import './fontawesome';
|
|
@@ -36,6 +38,7 @@ const TabsWidget = (props) => {
|
|
|
36
38
|
const [blockStyleVisible, setBlockStyleVisible] = React.useState(false);
|
|
37
39
|
const [activeTabId, setActiveTabId] = React.useState(0);
|
|
38
40
|
const [activeFontAwesomePopup, setActiveFontAwesomePopup] = React.useState(0);
|
|
41
|
+
const [activeSubTabPopup, setActiveSubTabPopup] = React.useState(0);
|
|
39
42
|
|
|
40
43
|
const { value = {}, id, onChange } = props;
|
|
41
44
|
const { blocks = {} } = value;
|
|
@@ -44,6 +47,7 @@ const TabsWidget = (props) => {
|
|
|
44
47
|
blocks[id],
|
|
45
48
|
]);
|
|
46
49
|
const activeTabData = blocks[activeTabId] || {};
|
|
50
|
+
|
|
47
51
|
return (
|
|
48
52
|
<FormFieldWrapper
|
|
49
53
|
{...props}
|
|
@@ -190,6 +194,52 @@ const TabsWidget = (props) => {
|
|
|
190
194
|
/>
|
|
191
195
|
</SidebarPopup>
|
|
192
196
|
|
|
197
|
+
<button
|
|
198
|
+
onClick={() => {
|
|
199
|
+
setActiveTabId(childId);
|
|
200
|
+
setActiveSubTabPopup(true);
|
|
201
|
+
}}
|
|
202
|
+
title="Sub Tab"
|
|
203
|
+
>
|
|
204
|
+
<Icon size={'24px'} name={leftMenuSVG} />
|
|
205
|
+
</button>
|
|
206
|
+
<SidebarPopup open={activeSubTabPopup}>
|
|
207
|
+
<InlineForm
|
|
208
|
+
schema={subTabSchema()}
|
|
209
|
+
title={
|
|
210
|
+
<>
|
|
211
|
+
{subTabSchema().title}
|
|
212
|
+
<button
|
|
213
|
+
onClick={() => {
|
|
214
|
+
setActiveSubTabPopup(false);
|
|
215
|
+
}}
|
|
216
|
+
style={{ float: 'right' }}
|
|
217
|
+
>
|
|
218
|
+
<Icon name={clearSVG} size="24px" />
|
|
219
|
+
</button>
|
|
220
|
+
</>
|
|
221
|
+
}
|
|
222
|
+
formData={{
|
|
223
|
+
...activeTabData?.subTab,
|
|
224
|
+
}}
|
|
225
|
+
onChangeField={(idTab, formValue) => {
|
|
226
|
+
onChange(id, {
|
|
227
|
+
...value,
|
|
228
|
+
blocks: {
|
|
229
|
+
...value.blocks,
|
|
230
|
+
[activeTabId]: {
|
|
231
|
+
...(activeTabData || {}),
|
|
232
|
+
subTab: {
|
|
233
|
+
...activeTabData?.subTab,
|
|
234
|
+
[idTab]: formValue,
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
}}
|
|
240
|
+
/>
|
|
241
|
+
</SidebarPopup>
|
|
242
|
+
|
|
193
243
|
{value.blocks_layout?.items?.length > 1 ? (
|
|
194
244
|
<button
|
|
195
245
|
onClick={() => {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const subTabSchema = () => ({
|
|
2
|
+
title: 'Vertical tab block',
|
|
3
|
+
fieldsets: [
|
|
4
|
+
{
|
|
5
|
+
id: 'default',
|
|
6
|
+
title: 'Default',
|
|
7
|
+
fields: ['subtab'],
|
|
8
|
+
},
|
|
9
|
+
],
|
|
10
|
+
properties: {
|
|
11
|
+
subtab: {
|
|
12
|
+
title: 'Is subtab',
|
|
13
|
+
description: 'Define if this tab is a subTab',
|
|
14
|
+
type: 'boolean',
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
required: [],
|
|
19
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const BoundingBoxComponent = (props) => {
|
|
4
|
+
const { north, south, east, west } = props.bbox;
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<div className="bounding-box-container">
|
|
8
|
+
<h3>Bounding Box</h3>
|
|
9
|
+
<div className="bounding-box-item">
|
|
10
|
+
{east && <div className="bounding-box-item">East: {east}</div>}
|
|
11
|
+
{west && <div className="bounding-box-item">West: {west}</div>}
|
|
12
|
+
{north && <div className="bounding-box-item">North: {north}</div>}
|
|
13
|
+
{south && <div className="bounding-box-item">South: {south}</div>}
|
|
14
|
+
</div>
|
|
15
|
+
<br />
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default BoundingBoxComponent;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const ContactComponent = (props) => {
|
|
4
|
+
const {
|
|
5
|
+
organisationName,
|
|
6
|
+
deliveryPoint,
|
|
7
|
+
city,
|
|
8
|
+
administrativeArea,
|
|
9
|
+
postalCode,
|
|
10
|
+
country,
|
|
11
|
+
electronicMailAddress,
|
|
12
|
+
url,
|
|
13
|
+
urlTitle,
|
|
14
|
+
roleCode,
|
|
15
|
+
} = props.contact;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div className="contact-container">
|
|
19
|
+
<h3>Contact</h3>
|
|
20
|
+
<div className="contact-item">
|
|
21
|
+
{city && <div className="contact-item">{city}</div>}
|
|
22
|
+
{organisationName && (
|
|
23
|
+
<div className="contact-item">{organisationName}</div>
|
|
24
|
+
)}
|
|
25
|
+
{deliveryPoint && <div className="contact-item">{deliveryPoint}</div>}
|
|
26
|
+
{city && <div className="contact-item">{city}</div>}
|
|
27
|
+
{administrativeArea && (
|
|
28
|
+
<div className="contact-item">{administrativeArea}</div>
|
|
29
|
+
)}
|
|
30
|
+
{postalCode && <div className="contact-item">{postalCode}</div>}
|
|
31
|
+
{country && <div className="contact-item">{country}</div>}
|
|
32
|
+
{electronicMailAddress && (
|
|
33
|
+
<div className="contact-item">{electronicMailAddress}</div>
|
|
34
|
+
)}
|
|
35
|
+
{url && <div className="contact-item">{url}</div>}
|
|
36
|
+
{urlTitle && <div className="contact-item">{urlTitle}</div>}
|
|
37
|
+
{roleCode && <div className="contact-item">Role: {roleCode}</div>}
|
|
38
|
+
</div>
|
|
39
|
+
<br />
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default ContactComponent;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const DistributionInfoComponent = (props) => {
|
|
4
|
+
const { resourceLocator, services } = props.resource;
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<div className="distribution-info-container">
|
|
8
|
+
<h3>Resource</h3>
|
|
9
|
+
<div className="distribution-info-item">
|
|
10
|
+
{resourceLocator && (
|
|
11
|
+
<div className="distribution-info-item">{resourceLocator}</div>
|
|
12
|
+
)}
|
|
13
|
+
{services && <div className="distribution-info-item">{services}</div>}
|
|
14
|
+
</div>
|
|
15
|
+
<br />
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default DistributionInfoComponent;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { CclInfoContainer, CclInfoDescription } from '../CclInfoDescription';
|
|
2
|
+
|
|
3
|
+
import BoundingBoxComponent from './BoundingBoxComponent';
|
|
3
4
|
import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
|
|
5
|
+
import ContactComponent from './ContactComponent';
|
|
6
|
+
import DistributionInfoComponent from './DistributionInfoComponent';
|
|
7
|
+
import React from 'react';
|
|
4
8
|
import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
|
|
5
9
|
|
|
6
10
|
const MetadataContent = (data) => {
|
|
@@ -34,11 +38,27 @@ const MetadataContent = (data) => {
|
|
|
34
38
|
|
|
35
39
|
<CclInfoContainer>
|
|
36
40
|
<h2>Data identification</h2>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
{data.dataResourceTitle && (
|
|
42
|
+
<CclInfoDescription
|
|
43
|
+
title="Resource title"
|
|
44
|
+
tooltip="Name by which the cited resource is known"
|
|
45
|
+
description={data.dataResourceTitle}
|
|
46
|
+
/>
|
|
47
|
+
)}
|
|
48
|
+
{data.resourceEffective && (
|
|
49
|
+
<CclInfoDescription
|
|
50
|
+
title="Date of publication"
|
|
51
|
+
tooltip=""
|
|
52
|
+
description={data.resourceEffective}
|
|
53
|
+
/>
|
|
54
|
+
)}
|
|
55
|
+
{data.resourceModified && (
|
|
56
|
+
<CclInfoDescription
|
|
57
|
+
title="Revision date"
|
|
58
|
+
tooltip=""
|
|
59
|
+
description={data.resourceModified}
|
|
60
|
+
/>
|
|
61
|
+
)}
|
|
42
62
|
<CclInfoDescription
|
|
43
63
|
title="Resource abstract"
|
|
44
64
|
tooltip="Brief narrative summary of the content of the resource(s) with coverage, main attributes, data sources, important of the work, etc."
|
|
@@ -46,38 +66,110 @@ const MetadataContent = (data) => {
|
|
|
46
66
|
<StringToHTML string={data.dataResourceAbstract?.data || ''} />
|
|
47
67
|
}
|
|
48
68
|
/>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
{data.keywords?.length > 0 && (
|
|
70
|
+
<CclInfoDescription
|
|
71
|
+
title="Keywords"
|
|
72
|
+
tooltip=""
|
|
73
|
+
description={data.keywords.map((keyword) => keyword).join(', ')}
|
|
74
|
+
/>
|
|
75
|
+
)}
|
|
76
|
+
{data.geographicCoverage && (
|
|
77
|
+
<CclInfoDescription
|
|
78
|
+
title="Geographic coverage"
|
|
79
|
+
tooltip=""
|
|
80
|
+
description={JSON.stringify(data.geographicCoverage)}
|
|
81
|
+
/>
|
|
82
|
+
)}
|
|
83
|
+
{data.accessAndUseLimitationPublic_line && (
|
|
84
|
+
<CclInfoDescription
|
|
85
|
+
title="Limitation of public access"
|
|
86
|
+
tooltip=""
|
|
87
|
+
description={data.accessAndUseLimitationPublic_line}
|
|
88
|
+
/>
|
|
89
|
+
)}
|
|
66
90
|
<CclInfoDescription
|
|
67
|
-
title="
|
|
68
|
-
tooltip="
|
|
69
|
-
description={
|
|
91
|
+
title="Conditions applying to access and use"
|
|
92
|
+
tooltip=""
|
|
93
|
+
description={
|
|
94
|
+
<StringToHTML string={data.accessAndUseConstraints?.data || ''} />
|
|
95
|
+
}
|
|
70
96
|
/>
|
|
71
97
|
<CclInfoDescription
|
|
72
|
-
title="Spatial
|
|
73
|
-
tooltip="
|
|
98
|
+
title="Spatial Resolution"
|
|
99
|
+
tooltip=""
|
|
74
100
|
description={
|
|
75
|
-
<StringToHTML string={data.qualitySpatialResolution?.data} />
|
|
101
|
+
<StringToHTML string={data.qualitySpatialResolution?.data || ''} />
|
|
76
102
|
}
|
|
77
103
|
/>
|
|
104
|
+
{data.classificationTopicCategory && (
|
|
105
|
+
<CclInfoDescription
|
|
106
|
+
title="Topic of Category"
|
|
107
|
+
tooltip=""
|
|
108
|
+
description={
|
|
109
|
+
data.classificationTopicCategory &&
|
|
110
|
+
data.classificationTopicCategory.map((topic) => topic).join(', ')
|
|
111
|
+
}
|
|
112
|
+
/>
|
|
113
|
+
)}
|
|
114
|
+
{data.geographicBoundingBox?.items?.length > 0 && (
|
|
115
|
+
<CclInfoDescription
|
|
116
|
+
title="Bounding Boxes"
|
|
117
|
+
tooltip=""
|
|
118
|
+
description={data.geographicBoundingBox?.items.map((bbox) => {
|
|
119
|
+
return <BoundingBoxComponent bbox={bbox} />;
|
|
120
|
+
})}
|
|
121
|
+
/>
|
|
122
|
+
)}
|
|
123
|
+
{data.temporalCoverage && (
|
|
124
|
+
<CclInfoDescription
|
|
125
|
+
title="Temporal Extent"
|
|
126
|
+
tooltip=""
|
|
127
|
+
description={
|
|
128
|
+
data.temporalCoverage &&
|
|
129
|
+
data.temporalCoverage.map((year) => year).join(', ')
|
|
130
|
+
}
|
|
131
|
+
/>
|
|
132
|
+
)}
|
|
78
133
|
</CclInfoContainer>
|
|
134
|
+
{data.dataResourceType && (
|
|
135
|
+
<CclInfoContainer>
|
|
136
|
+
<h2>Hierarchy Level</h2>
|
|
137
|
+
<CclInfoDescription
|
|
138
|
+
title="Resource Type"
|
|
139
|
+
tooltip=""
|
|
140
|
+
description={data.dataResourceType}
|
|
141
|
+
/>
|
|
142
|
+
</CclInfoContainer>
|
|
143
|
+
)}
|
|
144
|
+
{data.responsiblePartyWithRole?.items?.length > 0 && (
|
|
145
|
+
<CclInfoContainer>
|
|
146
|
+
<h2>Contacts</h2>
|
|
147
|
+
<CclInfoDescription
|
|
148
|
+
title="Responsible Party with Role"
|
|
149
|
+
tooltip=""
|
|
150
|
+
description={data.responsiblePartyWithRole?.items.map((item) => {
|
|
151
|
+
return <ContactComponent contact={item} />;
|
|
152
|
+
})}
|
|
153
|
+
/>
|
|
154
|
+
</CclInfoContainer>
|
|
155
|
+
)}
|
|
156
|
+
{data.coordinateReferenceSystemList.length > 0 && (
|
|
157
|
+
<CclInfoContainer>
|
|
158
|
+
<h2>Reference system info</h2>
|
|
159
|
+
<CclInfoDescription
|
|
160
|
+
title="Coordinate Reference System"
|
|
161
|
+
tooltip="CRS of the resource"
|
|
162
|
+
description={
|
|
163
|
+
data.coordinateReferenceSystemList &&
|
|
164
|
+
data.coordinateReferenceSystemList
|
|
165
|
+
.map((reference) => reference)
|
|
166
|
+
.join(', ')
|
|
167
|
+
}
|
|
168
|
+
/>
|
|
169
|
+
</CclInfoContainer>
|
|
170
|
+
)}
|
|
79
171
|
<CclInfoContainer>
|
|
80
|
-
<h2>
|
|
172
|
+
<h2>Data quality info</h2>
|
|
81
173
|
<CclInfoDescription
|
|
82
174
|
title="Specification"
|
|
83
175
|
tooltip="A citation of the implementing rules adopted under Article 7(1) of Directive 2007/2/EC or other specification to which a particular resource conforms"
|
|
@@ -85,39 +177,31 @@ const MetadataContent = (data) => {
|
|
|
85
177
|
<StringToHTML string={data.conformitySpecification?.data} />
|
|
86
178
|
}
|
|
87
179
|
/>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
<StringToHTML string={data.accessAndUseConstraints?.data} />
|
|
96
|
-
}
|
|
97
|
-
/>
|
|
98
|
-
<CclInfoDescription
|
|
99
|
-
title="Limitation of public access"
|
|
100
|
-
tooltip="Limitation and other reason for public access"
|
|
101
|
-
description={
|
|
102
|
-
<StringToHTML string={data.accessAndUseLimitationPublic?.data} />
|
|
103
|
-
}
|
|
104
|
-
/>
|
|
105
|
-
</CclInfoContainer>
|
|
106
|
-
<CclInfoContainer>
|
|
107
|
-
<h2>Responsible organisation</h2>
|
|
108
|
-
<CclInfoDescription
|
|
109
|
-
title="Responsible party"
|
|
110
|
-
tooltip="Organisation associated with the resource. Organisation name, contact information (email)."
|
|
111
|
-
description={<StringToHTML string={data.owners?.data} />}
|
|
112
|
-
/>
|
|
180
|
+
{data.conformityPass && (
|
|
181
|
+
<CclInfoDescription
|
|
182
|
+
title="Pass"
|
|
183
|
+
tooltip=""
|
|
184
|
+
description={data.conformityPass}
|
|
185
|
+
/>
|
|
186
|
+
)}
|
|
113
187
|
<CclInfoDescription
|
|
114
|
-
title="
|
|
115
|
-
tooltip="
|
|
116
|
-
description={
|
|
117
|
-
<StringToHTML string={data.responsiblePartyRole?.data} />
|
|
118
|
-
}
|
|
188
|
+
title="Lineage"
|
|
189
|
+
tooltip="General explanation of the data produce knowledge's about the lineage of a dataset"
|
|
190
|
+
description={<StringToHTML string={data.qualityLineage?.data} />}
|
|
119
191
|
/>
|
|
120
192
|
</CclInfoContainer>
|
|
193
|
+
{data.distributionInfo?.items?.length > 0 && (
|
|
194
|
+
<CclInfoContainer>
|
|
195
|
+
<h2>Distribution info</h2>
|
|
196
|
+
<CclInfoDescription
|
|
197
|
+
title="Resource Locator and Services"
|
|
198
|
+
tooltip=""
|
|
199
|
+
description={data.distributionInfo?.items.map((resource) => {
|
|
200
|
+
return <DistributionInfoComponent resource={resource} />;
|
|
201
|
+
})}
|
|
202
|
+
/>
|
|
203
|
+
</CclInfoContainer>
|
|
204
|
+
)}
|
|
121
205
|
</>
|
|
122
206
|
);
|
|
123
207
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
|
|
3
|
-
import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
|
|
4
2
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
|
|
5
5
|
|
|
6
6
|
export const CLMSEventView = (props) => {
|
|
7
7
|
const { content } = props;
|
|
@@ -12,17 +12,19 @@ export const CLMSEventView = (props) => {
|
|
|
12
12
|
<div className="event-detail-date">
|
|
13
13
|
{new Date(content?.effective).toLocaleDateString()}
|
|
14
14
|
</div>
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
{content?.image && (
|
|
16
|
+
<figure className="news-detail-image">
|
|
17
|
+
<img
|
|
18
|
+
src={
|
|
19
|
+
content?.image
|
|
20
|
+
? content?.image?.download
|
|
21
|
+
: 'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
|
|
22
|
+
}
|
|
23
|
+
alt={content?.image ? content?.image?.filename : 'Placeholder'}
|
|
24
|
+
/>
|
|
25
|
+
<figcaption>{content?.image_caption}</figcaption>
|
|
26
|
+
</figure>
|
|
27
|
+
)}
|
|
26
28
|
<div className="event-detail-when">
|
|
27
29
|
<FontAwesomeIcon icon={['far', 'calendar-alt']} />
|
|
28
30
|
<div className="event-detail-when-text">
|
|
@@ -10,17 +10,19 @@ const CLMSNewsItemView = (props) => {
|
|
|
10
10
|
<div className="news-detail-date">
|
|
11
11
|
{new Date(content?.effective).toLocaleDateString()}
|
|
12
12
|
</div>
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
{content?.image && (
|
|
14
|
+
<figure className="news-detail-image">
|
|
15
|
+
<img
|
|
16
|
+
src={
|
|
17
|
+
content?.image
|
|
18
|
+
? content?.image?.download
|
|
19
|
+
: 'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
|
|
20
|
+
}
|
|
21
|
+
alt={content?.image ? content?.image?.filename : 'Placeholder'}
|
|
22
|
+
/>
|
|
23
|
+
<figcaption>{content?.image_caption}</figcaption>
|
|
24
|
+
</figure>
|
|
25
|
+
)}
|
|
24
26
|
<div className="news-detail-content">
|
|
25
27
|
<StringToHTML string={content.text?.data || ''} />
|
|
26
28
|
</div>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
3
1
|
import './cards.less';
|
|
4
|
-
|
|
5
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
2
|
+
|
|
6
3
|
import * as mime from 'react-native-mime-types';
|
|
7
4
|
|
|
5
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
6
|
+
import { Link } from 'react-router-dom';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
8
10
|
function bytesToSize(bytes) {
|
|
9
11
|
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
|
10
12
|
if (bytes === 0) return '0 Byte';
|
|
@@ -26,7 +28,7 @@ function CclCard(props) {
|
|
|
26
28
|
{type === 'doc' && (
|
|
27
29
|
<>
|
|
28
30
|
<div className="card-doc-title">
|
|
29
|
-
<a href={card?.file?.download ||
|
|
31
|
+
<a href={card?.file?.download || url}>
|
|
30
32
|
{card?.title || 'Card default title'}
|
|
31
33
|
</a>
|
|
32
34
|
</div>
|
|
@@ -47,6 +49,7 @@ function CclCard(props) {
|
|
|
47
49
|
<div className="card-block-image">
|
|
48
50
|
<img
|
|
49
51
|
src={
|
|
52
|
+
card?.image?.scales?.preview ||
|
|
50
53
|
card?.image?.download ||
|
|
51
54
|
'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
|
|
52
55
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
1
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -16,14 +16,16 @@ import { faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
|
|
16
16
|
</CclInfoDescription>
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
|
-
function CclInfoDescription({ title, description, tooltip
|
|
19
|
+
function CclInfoDescription({ title, description, tooltip }) {
|
|
20
20
|
return (
|
|
21
21
|
<div className="dataset-info-field">
|
|
22
22
|
<div className="dataset-field-title">
|
|
23
23
|
<h3>{title}</h3>
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
|
|
24
|
+
{tooltip && (
|
|
25
|
+
<span className="info-icon" tooltip={tooltip} direction="up">
|
|
26
|
+
<FontAwesomeIcon icon={faInfoCircle} />
|
|
27
|
+
</span>
|
|
28
|
+
)}
|
|
27
29
|
</div>
|
|
28
30
|
<div className="dataset-field-description">{description}</div>
|
|
29
31
|
</div>
|