@eeacms/volto-cca-policy 0.2.88 → 0.2.90
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 +31 -2
- package/package.json +1 -1
- package/src/components/Result/ClusterHorizontalCardItem.jsx +2 -12
- package/src/components/Result/HealthHorizontalCardItem.jsx +2 -6
- package/src/components/manage/Blocks/CountryMapObservatory/CountryMapObservatoryOLView.jsx +15 -4
- package/src/components/manage/Blocks/Listing/IndicatorCardsListingView.jsx +1 -4
- package/src/components/manage/Blocks/Listing/OrganisationCardsListingView.jsx +3 -9
- package/src/components/theme/Header/LanguageSwitch.jsx +1 -9
- package/src/components/theme/Views/CaseStudyView.jsx +0 -2
- package/src/components/theme/Views/DatabaseItemView.jsx +28 -42
- package/src/components/theme/Views/EventView.jsx +7 -0
- package/src/components/theme/Views/NewsItemView.jsx +6 -7
- package/src/helpers/ContentMetadata.jsx +54 -72
- package/src/helpers/index.js +0 -8
- package/src/search/mission_all/config-all.js +5 -5
- package/theme/globals/views.less +9 -0
- package/src/components/theme/Views/CaseStudyView.less +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,40 @@ 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.2.
|
|
7
|
+
### [0.2.90](https://github.com/eea/volto-cca-policy/compare/0.2.89...0.2.90) - 8 January 2025
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat(view): move health specific metadata to a separate box [kreafox - [`2df42f7`](https://github.com/eea/volto-cca-policy/commit/2df42f755e13db8337e5e06b32b29aefeb964460)]
|
|
12
|
+
|
|
13
|
+
#### :bug: Bug Fixes
|
|
14
|
+
|
|
15
|
+
- fix: remove observatory-specific links from listings [kreafox - [`bc8c9a0`](https://github.com/eea/volto-cca-policy/commit/bc8c9a0dc843b04dac90ab91af89c1676b3b3d2e)]
|
|
16
|
+
- fix: cleanup import [kreafox - [`d7ee4bf`](https://github.com/eea/volto-cca-policy/commit/d7ee4bf9e7a5fe7bb3f199f630dc817d0bb73d63)]
|
|
17
|
+
|
|
18
|
+
#### :nail_care: Enhancements
|
|
19
|
+
|
|
20
|
+
- change(view): show lead image caption in the title block [kreafox - [`3d529a0`](https://github.com/eea/volto-cca-policy/commit/3d529a05cfc31d3e8e9d10acd3de557d0af254ae)]
|
|
21
|
+
- change: simplify URL construction by removing observatory-specific logic in language switcher [kreafox - [`63f087f`](https://github.com/eea/volto-cca-policy/commit/63f087fbb8b3c83c1bbb8cf546362dd4d402f762)]
|
|
22
|
+
- change(view): show health specific info on database item view [kreafox - [`443eca2`](https://github.com/eea/volto-cca-policy/commit/443eca2acabeada5bb076ce29c15b89ed3442a06)]
|
|
23
|
+
|
|
24
|
+
#### :house: Internal changes
|
|
25
|
+
|
|
26
|
+
- style: move styling to theme folder [kreafox - [`8f44461`](https://github.com/eea/volto-cca-policy/commit/8f444616f5cf6dc0ab9b4f95f9e97ae8436be9fc)]
|
|
8
27
|
|
|
9
28
|
#### :hammer_and_wrench: Others
|
|
10
29
|
|
|
11
|
-
-
|
|
30
|
+
- Refs #282067 - search engine remove ++aq link update [Tripon Eugen - [`c9a45bb`](https://github.com/eea/volto-cca-policy/commit/c9a45bb3aadd293746193fd361684e39432d596c)]
|
|
31
|
+
- core: code cleanup [kreafox - [`c6bb867`](https://github.com/eea/volto-cca-policy/commit/c6bb8676b954236279587286052e3b4a7175c31b)]
|
|
32
|
+
### [0.2.89](https://github.com/eea/volto-cca-policy/compare/0.2.88...0.2.89) - 8 January 2025
|
|
33
|
+
|
|
34
|
+
#### :hammer_and_wrench: Others
|
|
35
|
+
|
|
36
|
+
- Refs #268762 - update map to allow hover tr update [Tripon Eugen - [`0be2afe`](https://github.com/eea/volto-cca-policy/commit/0be2afed14d855d9bbf7bbaebb0f70688506e692)]
|
|
37
|
+
- Refs #268762 - update map to allow hover tr [Tripon Eugen - [`8a94cf1`](https://github.com/eea/volto-cca-policy/commit/8a94cf1888f34793b8637fe383b923ee196403d8)]
|
|
38
|
+
- Remove prefix condition, will be solved by indexing [Tiberiu Ichim - [`3cf4ed0`](https://github.com/eea/volto-cca-policy/commit/3cf4ed0befde89e8cc3393c8458aa3d5a6d9a70a)]
|
|
39
|
+
### [0.2.88](https://github.com/eea/volto-cca-policy/compare/0.2.87...0.2.88) - 6 January 2025
|
|
40
|
+
|
|
12
41
|
### [0.2.87](https://github.com/eea/volto-cca-policy/compare/0.2.86...0.2.87) - 20 December 2024
|
|
13
42
|
|
|
14
43
|
#### :nail_care: Enhancements
|
package/package.json
CHANGED
|
@@ -13,13 +13,6 @@ import ExternalLink from '@eeacms/search/components/Result/ExternalLink';
|
|
|
13
13
|
import ResultContext from '@eeacms/search/components/Result/ResultContext';
|
|
14
14
|
import ContentClusters from '@eeacms/search/components/Result/ContentClusters';
|
|
15
15
|
|
|
16
|
-
const healthURL = (href, is_observatory) => {
|
|
17
|
-
if (is_observatory) {
|
|
18
|
-
return href.replace(/\/metadata\//, '/observatory/++aq++metadata/');
|
|
19
|
-
}
|
|
20
|
-
return href;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
16
|
const healthBreadcrumb = (href, is_observatory) => {
|
|
24
17
|
// It's only cosmetic. We don't want to show ++aq...
|
|
25
18
|
if (is_observatory) {
|
|
@@ -52,7 +45,7 @@ const ExtraContent = (props) => {
|
|
|
52
45
|
<div>
|
|
53
46
|
<div className="result-info result-source">
|
|
54
47
|
<span className="result-info-title">Source: </span>
|
|
55
|
-
<ExternalLink href={
|
|
48
|
+
<ExternalLink href={result.href}>
|
|
56
49
|
<strong title={result.source} className="source">
|
|
57
50
|
{title}
|
|
58
51
|
{/* {firstWords(
|
|
@@ -99,10 +92,7 @@ const ClusterHorizontalCardItem = (props) => {
|
|
|
99
92
|
'@id': result.href,
|
|
100
93
|
title: (
|
|
101
94
|
<>
|
|
102
|
-
<ExternalLink
|
|
103
|
-
href={healthURL(result.href, is_observatory)}
|
|
104
|
-
title={result.title}
|
|
105
|
-
>
|
|
95
|
+
<ExternalLink href={result.href} title={result.title}>
|
|
106
96
|
{result.title}
|
|
107
97
|
{result.isNew && <Label className="new-item">New</Label>}
|
|
108
98
|
{result.isExpired && (
|
|
@@ -14,10 +14,6 @@ import ExternalLink from '@eeacms/search/components/Result/ExternalLink';
|
|
|
14
14
|
import ResultContext from '@eeacms/search/components/Result/ResultContext';
|
|
15
15
|
import ContentClusters from '@eeacms/search/components/Result/ContentClusters';
|
|
16
16
|
|
|
17
|
-
const healthURL = (href) => {
|
|
18
|
-
return href.replace(/\/metadata\//, '/observatory/++aq++metadata/');
|
|
19
|
-
};
|
|
20
|
-
|
|
21
17
|
const healthBreadcrumb = (href) => {
|
|
22
18
|
// It's only cosmetic. We don't want to show ++aq...
|
|
23
19
|
return href.replace(/\/metadata\//, '/observatory/');
|
|
@@ -40,7 +36,7 @@ const ExtraContent = (props) => {
|
|
|
40
36
|
<div>
|
|
41
37
|
<div className="result-info result-source">
|
|
42
38
|
<span className="result-info-title">Source: </span>
|
|
43
|
-
<ExternalLink href={
|
|
39
|
+
<ExternalLink href={result.href}>
|
|
44
40
|
<strong title={result.source} className="source">
|
|
45
41
|
{firstWords(
|
|
46
42
|
getTermDisplayValue({
|
|
@@ -75,7 +71,7 @@ const HealthHorizontalCardItem = (props) => {
|
|
|
75
71
|
'@id': result.href,
|
|
76
72
|
title: (
|
|
77
73
|
<>
|
|
78
|
-
<ExternalLink href={
|
|
74
|
+
<ExternalLink href={result.href} title={result.title}>
|
|
79
75
|
{result.title}
|
|
80
76
|
{result.isNew && <Label className="new-item">New</Label>}
|
|
81
77
|
{result.isExpired && (
|
|
@@ -37,12 +37,21 @@ const CountryMapObservatoryView = (props) => {
|
|
|
37
37
|
setOverlaySource(new ol.source.Vector());
|
|
38
38
|
|
|
39
39
|
const features = new ol.format.GeoJSON().readFeatures(geofeatures);
|
|
40
|
+
const updateEuCountryNames = euCountryNames.map((countryName) => {
|
|
41
|
+
if ('Turkey' === countryName) {
|
|
42
|
+
countryName = 'Türkiye';
|
|
43
|
+
}
|
|
44
|
+
return countryName;
|
|
45
|
+
});
|
|
46
|
+
|
|
40
47
|
const filtered = features.filter((f) =>
|
|
41
|
-
|
|
48
|
+
updateEuCountryNames.includes(f.get('na')),
|
|
42
49
|
);
|
|
43
|
-
|
|
44
50
|
filtered.forEach((feature) => {
|
|
45
51
|
const img = new Image();
|
|
52
|
+
if ('Türkiye' === feature.values_.na) {
|
|
53
|
+
feature.values_.na = 'Turkey';
|
|
54
|
+
}
|
|
46
55
|
img.onload = function () {
|
|
47
56
|
feature.set('flag', img);
|
|
48
57
|
};
|
|
@@ -70,12 +79,14 @@ const CountryMapObservatoryView = (props) => {
|
|
|
70
79
|
|
|
71
80
|
const onFeatureClick = React.useCallback(
|
|
72
81
|
(feature) => {
|
|
73
|
-
|
|
82
|
+
let country = feature.get('na');
|
|
83
|
+
if ('Türkiye' === country) {
|
|
84
|
+
country = 'Turkey';
|
|
85
|
+
}
|
|
74
86
|
history.push(`${baseUrl}/${country.toLowerCase()}`);
|
|
75
87
|
},
|
|
76
88
|
[baseUrl, history],
|
|
77
89
|
);
|
|
78
|
-
// console.log(geofeatures, projection, euCountriesSource, overlaySource);
|
|
79
90
|
|
|
80
91
|
return tileWMSSources ? (
|
|
81
92
|
<Map
|
|
@@ -5,7 +5,6 @@ import { compose } from 'redux';
|
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import { ConditionalLink } from '@plone/volto/components';
|
|
7
7
|
import { flattenToAppURL, getBaseUrl } from '@plone/volto/helpers';
|
|
8
|
-
import { makeObservatoryMetadataURL } from '@eeacms/volto-cca-policy/helpers';
|
|
9
8
|
import './styles.less';
|
|
10
9
|
|
|
11
10
|
const fixedTitles = {
|
|
@@ -28,9 +27,7 @@ const IndicatorCardsListingView = ({ items, isEditMode, token }) => {
|
|
|
28
27
|
<div className="wrapper">
|
|
29
28
|
<div className="slot-top">
|
|
30
29
|
<ConditionalLink
|
|
31
|
-
to={flattenToAppURL(
|
|
32
|
-
getBaseUrl(makeObservatoryMetadataURL(item['@id'])),
|
|
33
|
-
)}
|
|
30
|
+
to={flattenToAppURL(getBaseUrl(item['@id']))}
|
|
34
31
|
condition={!isEditMode}
|
|
35
32
|
>
|
|
36
33
|
<div className="listing-body">
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
4
|
-
makeContributionsSearchQuery,
|
|
5
|
-
makeObservatoryMetadataURL,
|
|
6
|
-
} from '@eeacms/volto-cca-policy/helpers';
|
|
3
|
+
import { makeContributionsSearchQuery } from '@eeacms/volto-cca-policy/helpers';
|
|
7
4
|
import { UniversalLink } from '@plone/volto/components';
|
|
8
5
|
|
|
9
6
|
import './styles.less';
|
|
@@ -25,10 +22,7 @@ const OrganisationCardsListingView = ({ items }) => {
|
|
|
25
22
|
<div className="ui fluid card u-card" key={item['@id']}>
|
|
26
23
|
<div className="content">
|
|
27
24
|
<div className="header">
|
|
28
|
-
<UniversalLink
|
|
29
|
-
className="image"
|
|
30
|
-
href={makeObservatoryMetadataURL(item['@id'])}
|
|
31
|
-
>
|
|
25
|
+
<UniversalLink className="image" href={item['@id']}>
|
|
32
26
|
<div className="img-container">
|
|
33
27
|
<img
|
|
34
28
|
src={item['@id'] + '/@@images/logo/preview'}
|
|
@@ -39,7 +33,7 @@ const OrganisationCardsListingView = ({ items }) => {
|
|
|
39
33
|
</UniversalLink>
|
|
40
34
|
<UniversalLink
|
|
41
35
|
className="header-link org-name"
|
|
42
|
-
href={
|
|
36
|
+
href={item['@id']}
|
|
43
37
|
>
|
|
44
38
|
{item.title}
|
|
45
39
|
</UniversalLink>
|
|
@@ -5,12 +5,7 @@ import { useSelector } from 'react-redux';
|
|
|
5
5
|
import { Dropdown, Image } from 'semantic-ui-react';
|
|
6
6
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
7
7
|
import config from '@plone/volto/registry';
|
|
8
|
-
import { useLocation } from 'react-router-dom';
|
|
9
8
|
import { Header } from '@eeacms/volto-eea-design-system/ui';
|
|
10
|
-
import {
|
|
11
|
-
isObservatoryMetadataURL,
|
|
12
|
-
makeObservatoryMetadataURL,
|
|
13
|
-
} from '@eeacms/volto-cca-policy/helpers';
|
|
14
9
|
import cx from 'classnames';
|
|
15
10
|
|
|
16
11
|
import { selectedLanguageAtom } from '../../../state';
|
|
@@ -18,8 +13,6 @@ import globeIcon from '@eeacms/volto-eea-design-system/../theme/themes/eea/asset
|
|
|
18
13
|
|
|
19
14
|
export default function LanguageSwitch({ history }) {
|
|
20
15
|
const { eea } = config.settings;
|
|
21
|
-
const location = useLocation();
|
|
22
|
-
const isObservatoryItem = isObservatoryMetadataURL(location.pathname);
|
|
23
16
|
const translations = useSelector(
|
|
24
17
|
(state) => state.content.data?.['@components']?.translations?.items,
|
|
25
18
|
);
|
|
@@ -39,14 +32,13 @@ export default function LanguageSwitch({ history }) {
|
|
|
39
32
|
const url = translation
|
|
40
33
|
? flattenToAppURL(translation['@id'])
|
|
41
34
|
: `/${item.code}`;
|
|
42
|
-
const to = isObservatoryItem ? makeObservatoryMetadataURL(url) : url;
|
|
43
35
|
|
|
44
36
|
setLanguage(item.code);
|
|
45
37
|
setSelectedLanguage(item.code);
|
|
46
38
|
searchParams.set('set_language', item.code);
|
|
47
39
|
|
|
48
40
|
history.push({
|
|
49
|
-
pathname:
|
|
41
|
+
pathname: url,
|
|
50
42
|
search: searchParams.toString(),
|
|
51
43
|
});
|
|
52
44
|
};
|
|
@@ -24,8 +24,6 @@ import {
|
|
|
24
24
|
ListItem,
|
|
25
25
|
} from 'semantic-ui-react';
|
|
26
26
|
|
|
27
|
-
import './CaseStudyView.less';
|
|
28
|
-
|
|
29
27
|
const messages = defineMessages({
|
|
30
28
|
References: { id: 'References', defaultMessage: 'References' },
|
|
31
29
|
Challenges: { id: 'Challenges', defaultMessage: 'Challenges' },
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormattedMessage } from 'react-intl';
|
|
3
|
-
import { useLocation } from 'react-router-dom';
|
|
4
3
|
import { PrivacyProtection } from '@eeacms/volto-embed';
|
|
5
4
|
import { Container, Divider, Grid } from 'semantic-ui-react';
|
|
6
5
|
import {
|
|
7
6
|
ShareInfoButton,
|
|
8
7
|
PortalMessage,
|
|
9
8
|
} from '@eeacms/volto-cca-policy/components';
|
|
10
|
-
import {
|
|
11
|
-
isObservatoryMetadataURL,
|
|
12
|
-
fixEmbedURL,
|
|
13
|
-
} from '@eeacms/volto-cca-policy/helpers';
|
|
9
|
+
import { fixEmbedURL } from '@eeacms/volto-cca-policy/helpers';
|
|
14
10
|
import {
|
|
15
11
|
TOOL,
|
|
16
12
|
GUIDANCE,
|
|
@@ -143,8 +139,6 @@ const MaybeIframeVisualization = ({ content }) => {
|
|
|
143
139
|
const DatabaseItemView = (props) => {
|
|
144
140
|
const { content } = props;
|
|
145
141
|
const type = content['@type'];
|
|
146
|
-
const location = useLocation();
|
|
147
|
-
const isObservatoryItem = isObservatoryMetadataURL(location.pathname);
|
|
148
142
|
const {
|
|
149
143
|
title,
|
|
150
144
|
acronym,
|
|
@@ -269,19 +263,15 @@ const DatabaseItemView = (props) => {
|
|
|
269
263
|
</>
|
|
270
264
|
)}
|
|
271
265
|
|
|
272
|
-
{
|
|
266
|
+
{organisational_key_activities && (
|
|
273
267
|
<>
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
</h3>
|
|
282
|
-
<HTMLField value={organisational_key_activities} />
|
|
283
|
-
</>
|
|
284
|
-
)}
|
|
268
|
+
<h3>
|
|
269
|
+
<FormattedMessage
|
|
270
|
+
id="Key activities within climate change and health"
|
|
271
|
+
defaultMessage="Key activities within climate change and health"
|
|
272
|
+
/>
|
|
273
|
+
</h3>
|
|
274
|
+
<HTMLField value={organisational_key_activities} />
|
|
285
275
|
</>
|
|
286
276
|
)}
|
|
287
277
|
|
|
@@ -292,31 +282,27 @@ const DatabaseItemView = (props) => {
|
|
|
292
282
|
|
|
293
283
|
<ReferenceInfo content={content} />
|
|
294
284
|
|
|
295
|
-
{
|
|
285
|
+
{organisational_websites && (
|
|
296
286
|
<>
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
</>
|
|
307
|
-
)}
|
|
287
|
+
<h5>
|
|
288
|
+
<FormattedMessage
|
|
289
|
+
id="Links to further information"
|
|
290
|
+
defaultMessage="Links to further information"
|
|
291
|
+
/>
|
|
292
|
+
</h5>
|
|
293
|
+
<HTMLField value={organisational_websites} />
|
|
294
|
+
</>
|
|
295
|
+
)}
|
|
308
296
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
</>
|
|
319
|
-
)}
|
|
297
|
+
{organisational_contact_information && (
|
|
298
|
+
<>
|
|
299
|
+
<h5>
|
|
300
|
+
<FormattedMessage
|
|
301
|
+
id="Contact information for the Observatory"
|
|
302
|
+
defaultMessage="Contact information for the Observatory"
|
|
303
|
+
/>
|
|
304
|
+
</h5>
|
|
305
|
+
<HTMLField value={organisational_contact_information} />
|
|
320
306
|
</>
|
|
321
307
|
)}
|
|
322
308
|
|
|
@@ -19,6 +19,13 @@ function EventView(props) {
|
|
|
19
19
|
hasBlockTypes,
|
|
20
20
|
} = filterBlocks(content, ['tabs_block', 'metadataSection']);
|
|
21
21
|
|
|
22
|
+
const titleBlock = Object.values(content.blocks).find(
|
|
23
|
+
(block) => block['@type'] === 'title',
|
|
24
|
+
);
|
|
25
|
+
if (titleBlock && !titleBlock.copyright && content.image_caption) {
|
|
26
|
+
titleBlock.copyright = content.image_caption;
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
return (
|
|
23
30
|
<div className="cca-event-view">
|
|
24
31
|
<PortalMessage content={content} />
|
|
@@ -17,13 +17,12 @@ const DescriptionText = ({ content }) => {
|
|
|
17
17
|
function NewsItemView(props) {
|
|
18
18
|
const { content } = props;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
// }
|
|
20
|
+
const titleBlock = Object.values(content.blocks).find(
|
|
21
|
+
(block) => block['@type'] === 'title',
|
|
22
|
+
);
|
|
23
|
+
if (titleBlock && !titleBlock.copyright && content.image_caption) {
|
|
24
|
+
titleBlock.copyright = content.image_caption;
|
|
25
|
+
}
|
|
27
26
|
|
|
28
27
|
// These blocks are used in the Edit View for dexterity layout.
|
|
29
28
|
// We don't want to display them in the View mode.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
|
-
import { useLocation } from 'react-router-dom';
|
|
3
2
|
import { Popup, Segment } from 'semantic-ui-react';
|
|
4
3
|
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
|
|
5
4
|
import {
|
|
@@ -13,10 +12,7 @@ import {
|
|
|
13
12
|
INDICATOR,
|
|
14
13
|
PUBLICATION_REPORT,
|
|
15
14
|
} from '@eeacms/volto-cca-policy/helpers/Constants';
|
|
16
|
-
import {
|
|
17
|
-
isObservatoryMetadataURL,
|
|
18
|
-
MetadataItemList,
|
|
19
|
-
} from '@eeacms/volto-cca-policy/helpers';
|
|
15
|
+
import { MetadataItemList } from '@eeacms/volto-cca-policy/helpers';
|
|
20
16
|
|
|
21
17
|
const messages = defineMessages({
|
|
22
18
|
default_info_tooltip: {
|
|
@@ -328,8 +324,6 @@ function ContentMetadata(props) {
|
|
|
328
324
|
funding_programme,
|
|
329
325
|
} = content;
|
|
330
326
|
const type = content['@type'];
|
|
331
|
-
const location = useLocation();
|
|
332
|
-
const isObservatoryItem = isObservatoryMetadataURL(location.pathname);
|
|
333
327
|
const hasGeoChars = geochars !== null || spatial_layer.length > 0;
|
|
334
328
|
|
|
335
329
|
const dateTitles = {
|
|
@@ -343,30 +337,14 @@ function ContentMetadata(props) {
|
|
|
343
337
|
const dateTitle = dateTitles[type] || dateTitles.default;
|
|
344
338
|
|
|
345
339
|
return (
|
|
346
|
-
|
|
347
|
-
<
|
|
340
|
+
<>
|
|
341
|
+
<Segment className="content-metadata">
|
|
348
342
|
<PublicationDateInfo
|
|
349
343
|
title={dateTitle}
|
|
350
344
|
value={content?.publication_date}
|
|
351
345
|
portaltype={type}
|
|
352
346
|
/>
|
|
353
347
|
|
|
354
|
-
{isObservatoryItem && (
|
|
355
|
-
<>
|
|
356
|
-
{health_impacts && health_impacts?.length > 0 && (
|
|
357
|
-
<>
|
|
358
|
-
<h5>
|
|
359
|
-
<FormattedMessage
|
|
360
|
-
id="Health impact:"
|
|
361
|
-
defaultMessage="Health impact:"
|
|
362
|
-
/>
|
|
363
|
-
</h5>
|
|
364
|
-
<MetadataItemList value={health_impacts} />
|
|
365
|
-
</>
|
|
366
|
-
)}
|
|
367
|
-
</>
|
|
368
|
-
)}
|
|
369
|
-
|
|
370
348
|
{keywords && keywords?.length > 0 && (
|
|
371
349
|
<>
|
|
372
350
|
<h5>
|
|
@@ -400,40 +378,36 @@ function ContentMetadata(props) {
|
|
|
400
378
|
</>
|
|
401
379
|
)}
|
|
402
380
|
|
|
403
|
-
{
|
|
381
|
+
{climate_impacts && climate_impacts?.length > 0 && (
|
|
382
|
+
<>
|
|
383
|
+
<h5>
|
|
384
|
+
<FormattedMessage
|
|
385
|
+
id="Climate impacts:"
|
|
386
|
+
defaultMessage="Climate impacts:"
|
|
387
|
+
/>
|
|
388
|
+
</h5>
|
|
389
|
+
<MetadataItemList value={climate_impacts} />
|
|
390
|
+
</>
|
|
391
|
+
)}
|
|
392
|
+
|
|
393
|
+
{elements && elements?.length > 0 && (
|
|
394
|
+
<>
|
|
395
|
+
<h5>
|
|
396
|
+
<FormattedMessage
|
|
397
|
+
id="Adaptation Approaches:"
|
|
398
|
+
defaultMessage="Adaptation Approaches:"
|
|
399
|
+
/>
|
|
400
|
+
</h5>
|
|
401
|
+
<MetadataItemList value={elements} />
|
|
402
|
+
</>
|
|
403
|
+
)}
|
|
404
|
+
|
|
405
|
+
{sectors && sectors?.length > 0 && (
|
|
404
406
|
<>
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
id="Climate impacts:"
|
|
410
|
-
defaultMessage="Climate impacts:"
|
|
411
|
-
/>
|
|
412
|
-
</h5>
|
|
413
|
-
<MetadataItemList value={climate_impacts} />
|
|
414
|
-
</>
|
|
415
|
-
)}
|
|
416
|
-
|
|
417
|
-
{elements && elements?.length > 0 && (
|
|
418
|
-
<>
|
|
419
|
-
<h5>
|
|
420
|
-
<FormattedMessage
|
|
421
|
-
id="Adaptation Approaches:"
|
|
422
|
-
defaultMessage="Adaptation Approaches:"
|
|
423
|
-
/>
|
|
424
|
-
</h5>
|
|
425
|
-
<MetadataItemList value={elements} />
|
|
426
|
-
</>
|
|
427
|
-
)}
|
|
428
|
-
|
|
429
|
-
{sectors && sectors?.length > 0 && (
|
|
430
|
-
<>
|
|
431
|
-
<h5>
|
|
432
|
-
<FormattedMessage id="Sectors:" defaultMessage="Sectors:" />
|
|
433
|
-
</h5>
|
|
434
|
-
<MetadataItemList value={sectors} />
|
|
435
|
-
</>
|
|
436
|
-
)}
|
|
407
|
+
<h5>
|
|
408
|
+
<FormattedMessage id="Sectors:" defaultMessage="Sectors:" />
|
|
409
|
+
</h5>
|
|
410
|
+
<MetadataItemList value={sectors} />
|
|
437
411
|
</>
|
|
438
412
|
)}
|
|
439
413
|
|
|
@@ -449,19 +423,15 @@ function ContentMetadata(props) {
|
|
|
449
423
|
</>
|
|
450
424
|
)}
|
|
451
425
|
|
|
452
|
-
{
|
|
426
|
+
{funding_programme && funding_programme?.title?.length > 0 && (
|
|
453
427
|
<>
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
</h5>
|
|
462
|
-
<span>{funding_programme.title}</span>
|
|
463
|
-
</>
|
|
464
|
-
)}
|
|
428
|
+
<h5>
|
|
429
|
+
<FormattedMessage
|
|
430
|
+
id="Funding Programme:"
|
|
431
|
+
defaultMessage="Funding Programme:"
|
|
432
|
+
/>
|
|
433
|
+
</h5>
|
|
434
|
+
<span>{funding_programme.title}</span>
|
|
465
435
|
</>
|
|
466
436
|
)}
|
|
467
437
|
|
|
@@ -485,8 +455,20 @@ function ContentMetadata(props) {
|
|
|
485
455
|
<GeoChar {...props} />
|
|
486
456
|
</>
|
|
487
457
|
)}
|
|
488
|
-
</
|
|
489
|
-
|
|
458
|
+
</Segment>
|
|
459
|
+
|
|
460
|
+
{health_impacts && health_impacts?.length > 0 && (
|
|
461
|
+
<Segment className="content-metadata">
|
|
462
|
+
<h5>
|
|
463
|
+
<FormattedMessage
|
|
464
|
+
id="Health impact:"
|
|
465
|
+
defaultMessage="Health impact:"
|
|
466
|
+
/>
|
|
467
|
+
</h5>
|
|
468
|
+
<MetadataItemList value={health_impacts} />
|
|
469
|
+
</Segment>
|
|
470
|
+
)}
|
|
471
|
+
</>
|
|
490
472
|
);
|
|
491
473
|
}
|
|
492
474
|
|
package/src/helpers/index.js
CHANGED
|
@@ -57,14 +57,6 @@ export const makeContributionsSearchQuery = (props) => {
|
|
|
57
57
|
return url;
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
export const isObservatoryMetadataURL = (url) => {
|
|
61
|
-
return url.indexOf('/observatory/++aq++metadata') > -1;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export const makeObservatoryMetadataURL = (url) => {
|
|
65
|
-
return url.replace('/metadata/', '/observatory/++aq++metadata/');
|
|
66
|
-
};
|
|
67
|
-
|
|
68
60
|
export const fixEmbedURL = (url, is_cmshare_video) => {
|
|
69
61
|
const suffix = '/download';
|
|
70
62
|
if (is_cmshare_video && !url.includes(suffix)) {
|
|
@@ -85,11 +85,11 @@ export default function installMainSearch(config) {
|
|
|
85
85
|
cca_include_in_mission: 'true',
|
|
86
86
|
},
|
|
87
87
|
},
|
|
88
|
-
{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
},
|
|
88
|
+
// {
|
|
89
|
+
// prefix: {
|
|
90
|
+
// 'id.keyword': 'https://climate-adapt.eea.europa.eu/en/mission',
|
|
91
|
+
// },
|
|
92
|
+
// },
|
|
93
93
|
],
|
|
94
94
|
minimum_should_match: 1,
|
|
95
95
|
},
|
package/theme/globals/views.less
CHANGED
|
@@ -96,6 +96,15 @@ hr {
|
|
|
96
96
|
.db-item-view {
|
|
97
97
|
position: relative;
|
|
98
98
|
|
|
99
|
+
&.case-study-view {
|
|
100
|
+
div {
|
|
101
|
+
img.db-logo {
|
|
102
|
+
padding-left: 5px;
|
|
103
|
+
float: right !important;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
99
108
|
.privacy-protection-wrapper {
|
|
100
109
|
margin-top: 1.5em;
|
|
101
110
|
margin-bottom: 1.5em;
|