@eeacms/volto-cca-policy 0.1.75 → 0.1.76
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 +12 -0
- package/package.json +1 -1
- package/src/components/manage/Blocks/Listing/IndicatorCardsListingView.jsx +2 -1
- package/src/components/manage/Blocks/Listing/OrganisationCardsListingView.jsx +8 -9
- package/src/components/manage/Blocks/Listing/common.js +3 -0
- package/src/components/manage/Blocks/Listing/styles.less +22 -6
- package/src/components/theme/Views/PublicationReportView.jsx +3 -35
- package/src/components/theme/Views/ToolView.jsx +2 -31
- package/src/helpers/Utils.jsx +39 -0
- package/src/helpers/index.js +1 -0
- package/src/search/mission_projects/config-projects.js +1 -1
- package/src/search/mission_stories/config-stories.js +5 -0
- package/src/search/mission_stories/facets-stories.js +16 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ 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.76](https://github.com/eea/volto-cca-policy/compare/0.1.75...0.1.76) - 16 February 2024
|
|
8
|
+
|
|
9
|
+
#### :nail_care: Enhancements
|
|
10
|
+
|
|
11
|
+
- change: update mission search fields [kreafox - [`011be24`](https://github.com/eea/volto-cca-policy/commit/011be24eed371196ce8180a6ca058fc4b254e2e6)]
|
|
12
|
+
- change: update mission stories search [kreafox - [`d077a11`](https://github.com/eea/volto-cca-policy/commit/d077a115001f8b8038531bcecb3306fb5b454da5)]
|
|
13
|
+
|
|
14
|
+
#### :hammer_and_wrench: Others
|
|
15
|
+
|
|
16
|
+
- Refs #265319 - Improve design for organisation cards. [GhitaB - [`da31fc1`](https://github.com/eea/volto-cca-policy/commit/da31fc1f1fa3b025be689cc77bb3cc0cb690b407)]
|
|
17
|
+
- Refs #265325 - Use observatory url format for indicators listing, too. [GhitaB - [`0557783`](https://github.com/eea/volto-cca-policy/commit/0557783ef325bf1786e3c59ef85bf2a5c94e1f06)]
|
|
18
|
+
- test: fix duplicated code issue [kreafox - [`0104638`](https://github.com/eea/volto-cca-policy/commit/01046385f54e58cc792ea06542c24b0bb4446c0f)]
|
|
7
19
|
### [0.1.75](https://github.com/eea/volto-cca-policy/compare/0.1.74...0.1.75) - 15 February 2024
|
|
8
20
|
|
|
9
21
|
#### :rocket: New Features
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ 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 { observatoryURL } from './common';
|
|
8
9
|
import './styles.less';
|
|
9
10
|
|
|
10
11
|
const fixedTitles = {
|
|
@@ -27,7 +28,7 @@ const IndicatorCardsListingView = ({ items, isEditMode, token }) => {
|
|
|
27
28
|
<div className="wrapper">
|
|
28
29
|
<div className="slot-top">
|
|
29
30
|
<ConditionalLink
|
|
30
|
-
to={flattenToAppURL(getBaseUrl(item
|
|
31
|
+
to={flattenToAppURL(getBaseUrl(observatoryURL(item)))}
|
|
31
32
|
condition={!isEditMode}
|
|
32
33
|
>
|
|
33
34
|
<div className="listing-body">
|
|
@@ -2,13 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { connect } from 'react-redux';
|
|
4
4
|
import { compose } from 'redux';
|
|
5
|
+
import { observatoryURL } from './common';
|
|
5
6
|
import './styles.less';
|
|
6
7
|
|
|
7
8
|
const OrganisationCardsListingView = ({ items, isEditMode, token }) => {
|
|
8
|
-
const observatoryURL = (item) => {
|
|
9
|
-
return item['@id'].replace('/metadata/', '/observatory/++aq++metadata/');
|
|
10
|
-
};
|
|
11
|
-
|
|
12
9
|
const contributionsURL = (item) => {
|
|
13
10
|
const mapContributorValues = {
|
|
14
11
|
'copernicus-climate-change-service-ecmw':
|
|
@@ -51,11 +48,13 @@ const OrganisationCardsListingView = ({ items, isEditMode, token }) => {
|
|
|
51
48
|
<div className="content">
|
|
52
49
|
<div className="header">
|
|
53
50
|
<a className="image" href={observatoryURL(item)}>
|
|
54
|
-
<img
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
<div className="img-container">
|
|
52
|
+
<img
|
|
53
|
+
src={item['@id'] + '/@@images/logo/preview'}
|
|
54
|
+
alt={item.title}
|
|
55
|
+
className="ui image"
|
|
56
|
+
></img>
|
|
57
|
+
</div>
|
|
59
58
|
</a>
|
|
60
59
|
<a className="header-link org-name" href={observatoryURL(item)}>
|
|
61
60
|
{item.title}
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
// Organisation Cards Listing
|
|
2
2
|
div.organisationCards {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
div.card.u-card {
|
|
4
|
+
border: 1px solid #ccc;
|
|
5
|
+
margin: 10px;
|
|
6
|
+
|
|
7
|
+
div.img-container {
|
|
8
|
+
min-height: 120px;
|
|
9
|
+
text-align: center;
|
|
10
|
+
|
|
11
|
+
img {
|
|
12
|
+
width: auto;
|
|
13
|
+
max-height: 100px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
a.org-name {
|
|
18
|
+
margin-top: 0.5em;
|
|
19
|
+
margin-bottom: 0.5em;
|
|
20
|
+
font-size: 1em;
|
|
21
|
+
}
|
|
7
22
|
|
|
8
|
-
|
|
9
|
-
|
|
23
|
+
a.org-site {
|
|
24
|
+
font-size: 0.7em;
|
|
25
|
+
}
|
|
10
26
|
}
|
|
11
27
|
}
|
|
12
28
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
|
-
HTMLField,
|
|
4
3
|
ContentMetadata,
|
|
5
|
-
LinksList,
|
|
6
4
|
PublishedModifiedInfo,
|
|
7
5
|
DocumentsList,
|
|
8
6
|
ShareInfo,
|
|
7
|
+
ReferenceInfo,
|
|
9
8
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
10
9
|
import { Grid } from 'semantic-ui-react';
|
|
11
10
|
|
|
12
11
|
function PublicationReportView(props) {
|
|
13
12
|
const { content } = props;
|
|
13
|
+
|
|
14
14
|
return (
|
|
15
15
|
<div className="publication-report-view">
|
|
16
16
|
<div className="ui container">
|
|
@@ -23,40 +23,8 @@ function PublicationReportView(props) {
|
|
|
23
23
|
className="col-left"
|
|
24
24
|
>
|
|
25
25
|
<div className="ui label">Publications and Reports</div>
|
|
26
|
-
<h1>{content.title}</h1>
|
|
27
|
-
<h4>Description</h4>
|
|
28
|
-
<HTMLField
|
|
29
|
-
value={content.long_description}
|
|
30
|
-
className="long_description"
|
|
31
|
-
/>
|
|
32
|
-
<hr />
|
|
33
|
-
|
|
34
|
-
<h4>Reference information</h4>
|
|
35
|
-
|
|
36
|
-
{content?.websites?.length > 0 && (
|
|
37
|
-
<LinksList title="Websites:" value={content.websites} />
|
|
38
|
-
)}
|
|
39
|
-
|
|
40
|
-
{content.source && (
|
|
41
|
-
<>
|
|
42
|
-
<h4>Source:</h4>
|
|
43
|
-
<HTMLField value={content.source} className="source" />
|
|
44
|
-
</>
|
|
45
|
-
)}
|
|
46
|
-
{content?.contributor_list?.length > 0 && (
|
|
47
|
-
<>
|
|
48
|
-
<h4>Contributor:</h4>
|
|
49
|
-
{content.contributor_list
|
|
50
|
-
.map((item) => (
|
|
51
|
-
<>
|
|
52
|
-
{item.title}
|
|
53
|
-
<br />
|
|
54
|
-
</>
|
|
55
|
-
))
|
|
56
|
-
.sort()}
|
|
57
|
-
</>
|
|
58
|
-
)}
|
|
59
26
|
|
|
27
|
+
<ReferenceInfo content={content} />
|
|
60
28
|
<PublishedModifiedInfo {...props} />
|
|
61
29
|
<ShareInfo {...props} />
|
|
62
30
|
</Grid.Column>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
|
-
HTMLField,
|
|
4
3
|
ContentMetadata,
|
|
5
|
-
LinksList,
|
|
6
4
|
PublishedModifiedInfo,
|
|
5
|
+
ReferenceInfo,
|
|
7
6
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
8
7
|
import { Grid } from 'semantic-ui-react';
|
|
9
8
|
|
|
@@ -21,36 +20,8 @@ function ToolView(props) {
|
|
|
21
20
|
className="col-left"
|
|
22
21
|
>
|
|
23
22
|
<div className="ui label">Tools</div>
|
|
24
|
-
<h1>{content.title}</h1>
|
|
25
|
-
<h4>Description</h4>
|
|
26
|
-
<HTMLField
|
|
27
|
-
value={content.long_description}
|
|
28
|
-
className="long_description"
|
|
29
|
-
/>
|
|
30
|
-
<hr />
|
|
31
|
-
<h4>Reference information</h4>
|
|
32
23
|
|
|
33
|
-
{content
|
|
34
|
-
<LinksList title="Websites:" value={content.websites} />
|
|
35
|
-
)}
|
|
36
|
-
|
|
37
|
-
{content.source && (
|
|
38
|
-
<>
|
|
39
|
-
<h4>Source:</h4>
|
|
40
|
-
<HTMLField value={content.source} className="source" />
|
|
41
|
-
</>
|
|
42
|
-
)}
|
|
43
|
-
{content?.contributor_list?.length > 0 && (
|
|
44
|
-
<>
|
|
45
|
-
<h4>Contributor</h4>
|
|
46
|
-
{content.contributor_list.sort().map((item) => (
|
|
47
|
-
<>
|
|
48
|
-
{item.title}
|
|
49
|
-
<br />
|
|
50
|
-
</>
|
|
51
|
-
))}
|
|
52
|
-
</>
|
|
53
|
-
)}
|
|
24
|
+
<ReferenceInfo content={content} />
|
|
54
25
|
|
|
55
26
|
<PublishedModifiedInfo {...props} />
|
|
56
27
|
</Grid.Column>
|
package/src/helpers/Utils.jsx
CHANGED
|
@@ -68,6 +68,45 @@ export const LinksList = (props) => {
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
+
export const ReferenceInfo = (props) => {
|
|
72
|
+
const { content } = props;
|
|
73
|
+
return (
|
|
74
|
+
<>
|
|
75
|
+
<h1>{content.title}</h1>
|
|
76
|
+
<h4>Description</h4>
|
|
77
|
+
<HTMLField
|
|
78
|
+
value={content.long_description}
|
|
79
|
+
className="long_description"
|
|
80
|
+
/>
|
|
81
|
+
<hr />
|
|
82
|
+
<h4>Reference information</h4>
|
|
83
|
+
|
|
84
|
+
{content?.websites?.length > 0 && (
|
|
85
|
+
<LinksList title="Websites:" value={content.websites} />
|
|
86
|
+
)}
|
|
87
|
+
|
|
88
|
+
{content.source && (
|
|
89
|
+
<>
|
|
90
|
+
<h4>Source:</h4>
|
|
91
|
+
<HTMLField value={content.source} className="source" />
|
|
92
|
+
</>
|
|
93
|
+
)}
|
|
94
|
+
|
|
95
|
+
{content?.contributor_list?.length > 0 && (
|
|
96
|
+
<>
|
|
97
|
+
<h4>Contributor</h4>
|
|
98
|
+
{content.contributor_list.sort().map((item) => (
|
|
99
|
+
<>
|
|
100
|
+
{item.title}
|
|
101
|
+
<br />
|
|
102
|
+
</>
|
|
103
|
+
))}
|
|
104
|
+
</>
|
|
105
|
+
)}
|
|
106
|
+
</>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
71
110
|
export const PublishedModifiedInfo = (props) => {
|
|
72
111
|
const { content } = props;
|
|
73
112
|
|
package/src/helpers/index.js
CHANGED
|
@@ -38,7 +38,7 @@ export default function installMainSearch(config) {
|
|
|
38
38
|
host: process.env.RAZZLE_ES_PROXY_ADDR || 'http://localhost:3000',
|
|
39
39
|
vocab: {
|
|
40
40
|
cluster_name: {
|
|
41
|
-
cca: '
|
|
41
|
+
cca: 'Mission Portal',
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
runtime_mappings: build_runtime_mappings(clusters),
|
|
@@ -21,6 +21,11 @@ export default function installMissionStoriesSearch(config) {
|
|
|
21
21
|
elastic_index: '_es/missionStoriesSearch',
|
|
22
22
|
index_name: 'ccatest_searchui',
|
|
23
23
|
host: process.env.RAZZLE_ES_PROXY_ADDR || 'http://localhost:3000',
|
|
24
|
+
vocab: {
|
|
25
|
+
cluster_name: {
|
|
26
|
+
cca: 'Mission Portal',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
24
29
|
};
|
|
25
30
|
|
|
26
31
|
const { missionStoriesSearch } = config.searchui;
|
|
@@ -36,6 +36,22 @@ const facets = [
|
|
|
36
36
|
iconsFamily: 'Hazard Type',
|
|
37
37
|
alwaysVisible: false,
|
|
38
38
|
}),
|
|
39
|
+
multiTermFacet({
|
|
40
|
+
field: 'cca_climate_impacts.keyword',
|
|
41
|
+
isFilterable: false,
|
|
42
|
+
isMulti: true,
|
|
43
|
+
label: 'Climate Impacts',
|
|
44
|
+
iconsFamily: 'Climate Impacts',
|
|
45
|
+
alwaysVisible: false,
|
|
46
|
+
}),
|
|
47
|
+
multiTermFacet({
|
|
48
|
+
field: 'cca_funding_programme.keyword',
|
|
49
|
+
isFilterable: false,
|
|
50
|
+
isMulti: true,
|
|
51
|
+
label: 'Funding Programme',
|
|
52
|
+
iconsFamily: 'Funding Programme',
|
|
53
|
+
alwaysVisible: false,
|
|
54
|
+
}),
|
|
39
55
|
];
|
|
40
56
|
|
|
41
57
|
export default facets;
|