@eeacms/volto-cca-policy 0.1.76 → 0.1.78
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 +46 -0
- package/package.json +1 -1
- package/src/components/theme/Header.jsx +4 -3
- package/src/components/theme/Views/AdaptationOptionView.jsx +40 -50
- package/src/components/theme/Views/AdaptationOptionView.test.jsx +9 -0
- package/src/components/theme/Views/CaseStudyView.jsx +3 -2
- package/src/components/theme/Views/CaseStudyView.test.jsx +9 -0
- package/src/components/theme/Views/GuidanceView.jsx +2 -3
- package/src/components/theme/Views/GuidanceView.test.jsx +9 -0
- package/src/components/theme/Views/IndicatorView.jsx +3 -2
- package/src/components/theme/Views/IndicatorView.test.jsx +9 -0
- package/src/components/theme/Views/InformationPortalView.jsx +4 -3
- package/src/components/theme/Views/InformationPortalView.test.jsx +9 -0
- package/src/components/theme/Views/OrganisationView.jsx +13 -11
- package/src/components/theme/Views/OrganisationView.test.jsx +9 -0
- package/src/components/theme/Views/ProjectView.jsx +23 -4
- package/src/components/theme/Views/ProjectView.test.jsx +9 -0
- package/src/components/theme/Views/PublicationReportView.jsx +3 -2
- package/src/components/theme/Views/PublicationReportView.test.jsx +9 -0
- package/src/components/theme/Views/ToolView.jsx +4 -2
- package/src/components/theme/Views/ToolView.test.jsx +9 -0
- package/src/components/theme/Views/VideoView.jsx +4 -2
- package/src/components/theme/Views/VideoView.test.jsx +9 -0
- package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderMenuPopUp.js +4 -3
- package/src/customizations/volto/components/theme/Widgets/RichTextWidget.jsx +20 -0
- package/src/customizations/volto/reducers/navigation/README.md +1 -0
- package/src/customizations/volto/reducers/navigation/navigation.js +102 -0
- package/src/helpers/Utils.jsx +28 -1
- package/src/helpers/index.js +1 -0
- package/src/search/mission_projects/facets-projects.js +23 -6
- package/src/search/mission_stories/facets-stories.js +16 -24
- package/theme/extras/header.overrides +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,44 @@ 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.78](https://github.com/eea/volto-cca-policy/compare/0.1.77...0.1.78) - 20 February 2024
|
|
8
|
+
|
|
9
|
+
#### :house: Internal changes
|
|
10
|
+
|
|
11
|
+
- style: Automated code fix [eea-jenkins - [`0b35fb5`](https://github.com/eea/volto-cca-policy/commit/0b35fb51fd604bdf18a05d687c795d1d2d8e161f)]
|
|
12
|
+
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
|
+
|
|
15
|
+
- Why did Jenkins become a gardener? Because he wanted to see if his plants could pass the green build! [GhitaB - [`4bf6c95`](https://github.com/eea/volto-cca-policy/commit/4bf6c9595563d24ea6a48363ec715d69fbca888f)]
|
|
16
|
+
- prettier ternary [Tiberiu Ichim - [`015e96a`](https://github.com/eea/volto-cca-policy/commit/015e96a9f38b2fe5cbc49e254227bb1243747250)]
|
|
17
|
+
- oops [Tiberiu Ichim - [`f3b9a55`](https://github.com/eea/volto-cca-policy/commit/f3b9a55009857148b26f2f74064c3ea3869e024a)]
|
|
18
|
+
- Code cleanup [Tiberiu Ichim - [`988c8d9`](https://github.com/eea/volto-cca-policy/commit/988c8d9f310cf9abdf62e588facc1c5693a3e7f6)]
|
|
19
|
+
- Styling for nonclickable menus [Tiberiu Ichim - [`1c33068`](https://github.com/eea/volto-cca-policy/commit/1c33068a85de60adc33d39c3ecf14496ed73d1fb)]
|
|
20
|
+
- Nonclickable menu WIP [Tiberiu Ichim - [`06bfa16`](https://github.com/eea/volto-cca-policy/commit/06bfa16362d0e1be40ed17cb6007814fafd2fe21)]
|
|
21
|
+
### [0.1.77](https://github.com/eea/volto-cca-policy/compare/0.1.76...0.1.77) - 19 February 2024
|
|
22
|
+
|
|
23
|
+
#### :bug: Bug Fixes
|
|
24
|
+
|
|
25
|
+
- fix: typo [kreafox - [`b5dc1fe`](https://github.com/eea/volto-cca-policy/commit/b5dc1fe0fa28ff05dc2482d23fa7b0c4b27941de)]
|
|
26
|
+
- fix: add RichTextWidget override - refs: #265406 [kreafox - [`e25f6f0`](https://github.com/eea/volto-cca-policy/commit/e25f6f092cc15495ec2d6f3bc4a29caeda68b3eb)]
|
|
27
|
+
|
|
28
|
+
#### :nail_care: Enhancements
|
|
29
|
+
|
|
30
|
+
- change: update search facets [kreafox - [`41c9e3b`](https://github.com/eea/volto-cca-policy/commit/41c9e3bf18d033334c43ebdaad015bed8304890b)]
|
|
31
|
+
- change: update search facets [kreafox - [`fee246b`](https://github.com/eea/volto-cca-policy/commit/fee246b38965baaf38f0c9b7da5c0d48d91f1af8)]
|
|
32
|
+
- change: update mission projects facets [kreafox - [`10bbb14`](https://github.com/eea/volto-cca-policy/commit/10bbb14a12d8450295470536170979874bf5d0f5)]
|
|
33
|
+
- change: facets order [kreafox - [`ad7a023`](https://github.com/eea/volto-cca-policy/commit/ad7a023c05933d855329dbe9c1638ec24aaab2ab)]
|
|
34
|
+
- change: update mission stories search [kreafox - [`6bf68a6`](https://github.com/eea/volto-cca-policy/commit/6bf68a6ddc19ba13ea205c18dc84e5fd009f8267)]
|
|
35
|
+
- change: add Title block on database items view [kreafox - [`a59c677`](https://github.com/eea/volto-cca-policy/commit/a59c677143d2817f4d258c855f3adab8b4fb5ca2)]
|
|
36
|
+
|
|
37
|
+
#### :hammer_and_wrench: Others
|
|
38
|
+
|
|
39
|
+
- test: increase coverage [kreafox - [`d32e592`](https://github.com/eea/volto-cca-policy/commit/d32e592a1274748cae3b3b39ba23c2a51e93a4f9)]
|
|
40
|
+
- test: reduce duplicated code [kreafox - [`97319a4`](https://github.com/eea/volto-cca-policy/commit/97319a45b87afe2d35f01f8618b8746c37718f88)]
|
|
41
|
+
- test: remove unused import [kreafox - [`f393b42`](https://github.com/eea/volto-cca-policy/commit/f393b42bfbda103c290be658abf510fd5902f226)]
|
|
42
|
+
- test: reduce duplicated code [kreafox - [`037c3cb`](https://github.com/eea/volto-cca-policy/commit/037c3cbd5f82acec32959af96a374707b4e1bf02)]
|
|
43
|
+
- test: update volto version in Jenkinsfile [kreafox - [`43e8b76`](https://github.com/eea/volto-cca-policy/commit/43e8b7628e85cdf1965b8c88b90660e585811db4)]
|
|
44
|
+
- test: update tests for Database items view [kreafox - [`b611f0f`](https://github.com/eea/volto-cca-policy/commit/b611f0fea373f041ed196bad096fe7ac48df65c7)]
|
|
7
45
|
### [0.1.76](https://github.com/eea/volto-cca-policy/compare/0.1.75...0.1.76) - 16 February 2024
|
|
8
46
|
|
|
9
47
|
#### :nail_care: Enhancements
|
|
@@ -323,10 +361,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
323
361
|
- Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
|
|
324
362
|
- Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
|
|
325
363
|
- Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
|
|
364
|
+
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
|
|
365
|
+
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
|
|
326
366
|
### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
|
|
327
367
|
|
|
328
368
|
#### :house: Internal changes
|
|
329
369
|
|
|
370
|
+
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
|
|
330
371
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
|
|
331
372
|
|
|
332
373
|
#### :hammer_and_wrench: Others
|
|
@@ -343,6 +384,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
343
384
|
- Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
|
|
344
385
|
- Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
|
|
345
386
|
- Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
|
|
387
|
+
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
|
|
388
|
+
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
|
|
389
|
+
- test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
|
|
346
390
|
- Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
|
|
347
391
|
- Refs #256681 - Fix error in CCA Event view menu. ([React Intl] An id must be provided to format a message.) [GhitaB - [`517eeb8`](https://github.com/eea/volto-cca-policy/commit/517eeb817264a47bbfd6b9b7d22aaf22d44ed224)]
|
|
348
392
|
- Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
|
|
@@ -559,6 +603,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
559
603
|
|
|
560
604
|
#### :house: Internal changes
|
|
561
605
|
|
|
606
|
+
- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
|
|
562
607
|
|
|
563
608
|
#### :hammer_and_wrench: Others
|
|
564
609
|
|
|
@@ -1039,6 +1084,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1039
1084
|
#### :hammer_and_wrench: Others
|
|
1040
1085
|
|
|
1041
1086
|
- Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
|
|
1087
|
+
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
|
|
1042
1088
|
### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
|
|
1043
1089
|
|
|
1044
1090
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -108,9 +108,9 @@ const EEAHeader = (props) => {
|
|
|
108
108
|
}
|
|
109
109
|
}, [token, dispatch, pathname, previousToken]);
|
|
110
110
|
|
|
111
|
+
const download = subsite?.subsite_logo.scales?.preview?.download;
|
|
111
112
|
const subsiteLogo = subsite?.subsite_logo
|
|
112
|
-
?
|
|
113
|
-
toPublicURL(`${subsite['@id']}/@@images/subsite_logo`)
|
|
113
|
+
? download || toPublicURL(`${subsite['@id']}/@@images/subsite_logo`)
|
|
114
114
|
: null;
|
|
115
115
|
|
|
116
116
|
return (
|
|
@@ -233,11 +233,12 @@ const EEAHeader = (props) => {
|
|
|
233
233
|
renderMenuItem={(item, options, props) => (
|
|
234
234
|
<UniversalLink
|
|
235
235
|
openLinkInNewTab={false}
|
|
236
|
-
href={item.url || '/'}
|
|
236
|
+
href={item.nonclickable ? null : item.url || '/'}
|
|
237
237
|
title={item.nav_title || item.title}
|
|
238
238
|
{...(options || {})}
|
|
239
239
|
className={cx(options?.className, {
|
|
240
240
|
active: item.url === router_pathname,
|
|
241
|
+
'item-nonclickable': item.nonclickable,
|
|
241
242
|
})}
|
|
242
243
|
>
|
|
243
244
|
{props?.iconPosition !== 'right' && props?.children}
|
|
@@ -5,58 +5,48 @@ import {
|
|
|
5
5
|
LinksList,
|
|
6
6
|
PublishedModifiedInfo,
|
|
7
7
|
ShareInfo,
|
|
8
|
+
BannerTitle,
|
|
8
9
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
9
10
|
import { Grid } from 'semantic-ui-react';
|
|
10
11
|
|
|
12
|
+
function createDataField(type, field, section, title) {
|
|
13
|
+
return {
|
|
14
|
+
type,
|
|
15
|
+
field,
|
|
16
|
+
section,
|
|
17
|
+
title,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
11
21
|
const dataDisplay = [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
title: 'Costs and Benefits',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
type: 'HTMLField',
|
|
44
|
-
field: 'legal_aspects',
|
|
45
|
-
section: 'legal',
|
|
46
|
-
title: 'Legal Aspects',
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
type: 'HTMLField',
|
|
50
|
-
field: 'implementation_time',
|
|
51
|
-
section: 'implementation',
|
|
52
|
-
title: 'Implementation Time',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
type: 'HTMLField',
|
|
56
|
-
field: 'lifetime',
|
|
57
|
-
section: 'life_time',
|
|
58
|
-
title: 'Life Time',
|
|
59
|
-
},
|
|
22
|
+
createDataField('other', 'category', 'ao_category', 'Category'),
|
|
23
|
+
createDataField('other', 'ipcc_category', 'ipcc_category', 'IPCC categories'),
|
|
24
|
+
createDataField(
|
|
25
|
+
'HTMLField',
|
|
26
|
+
'stakeholder_participation',
|
|
27
|
+
'stakeholder_participation',
|
|
28
|
+
'Stakeholder participation',
|
|
29
|
+
),
|
|
30
|
+
createDataField(
|
|
31
|
+
'HTMLField',
|
|
32
|
+
'success_limitations',
|
|
33
|
+
'success_factors',
|
|
34
|
+
'Success and Limiting Factors',
|
|
35
|
+
),
|
|
36
|
+
createDataField(
|
|
37
|
+
'HTMLField',
|
|
38
|
+
'cost_benefit',
|
|
39
|
+
'costs_benefits',
|
|
40
|
+
'Costs and Benefits',
|
|
41
|
+
),
|
|
42
|
+
createDataField('HTMLField', 'legal_aspects', 'legal', 'Legal Aspects'),
|
|
43
|
+
createDataField(
|
|
44
|
+
'HTMLField',
|
|
45
|
+
'implementation_time',
|
|
46
|
+
'implementation',
|
|
47
|
+
'Implementation Time',
|
|
48
|
+
),
|
|
49
|
+
createDataField('HTMLField', 'lifetime', 'life_time', 'Life Time'),
|
|
60
50
|
];
|
|
61
51
|
|
|
62
52
|
const findSection = (title) => {
|
|
@@ -117,6 +107,8 @@ function AdaptationOptionView(props) {
|
|
|
117
107
|
|
|
118
108
|
return (
|
|
119
109
|
<div className="adaptation-option-view">
|
|
110
|
+
<BannerTitle content={content} type="Adaptation Option" />
|
|
111
|
+
|
|
120
112
|
<div className="ui container">
|
|
121
113
|
<Grid columns="12">
|
|
122
114
|
<div className="row">
|
|
@@ -126,8 +118,6 @@ function AdaptationOptionView(props) {
|
|
|
126
118
|
computer={9}
|
|
127
119
|
className="col-left"
|
|
128
120
|
>
|
|
129
|
-
<div className="ui label">Adaptation option</div>
|
|
130
|
-
<h1>{content.title}</h1>
|
|
131
121
|
<HTMLField
|
|
132
122
|
value={content.long_description}
|
|
133
123
|
className="long_description"
|
|
@@ -5,6 +5,15 @@ import '@testing-library/jest-dom/extend-expect';
|
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import AdaptationOptionView from './AdaptationOptionView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
8
|
+
import config from '@plone/volto/registry';
|
|
9
|
+
|
|
10
|
+
config.blocks = {
|
|
11
|
+
blocksConfig: {
|
|
12
|
+
title: {
|
|
13
|
+
view: () => <div>Title Block Component</div>,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
8
17
|
|
|
9
18
|
const mockStore = configureStore();
|
|
10
19
|
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
PublishedModifiedInfo,
|
|
7
7
|
DocumentsList,
|
|
8
8
|
ShareInfo,
|
|
9
|
+
BannerTitle,
|
|
9
10
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
10
11
|
import { Grid } from 'semantic-ui-react';
|
|
11
12
|
|
|
@@ -250,6 +251,8 @@ function CaseStudyView(props) {
|
|
|
250
251
|
|
|
251
252
|
return (
|
|
252
253
|
<div className="case-study-view">
|
|
254
|
+
<BannerTitle content={content} type="Case Studies" />
|
|
255
|
+
|
|
253
256
|
<div className="ui container">
|
|
254
257
|
<Grid columns="12">
|
|
255
258
|
<div className="row">
|
|
@@ -259,8 +262,6 @@ function CaseStudyView(props) {
|
|
|
259
262
|
computer={9}
|
|
260
263
|
className="col-left"
|
|
261
264
|
>
|
|
262
|
-
<div className="ui label">Case studies</div>
|
|
263
|
-
<h1>{content.title}</h1>
|
|
264
265
|
<PrimaryPhoto {...props} />
|
|
265
266
|
|
|
266
267
|
<HTMLField
|
|
@@ -5,6 +5,15 @@ import '@testing-library/jest-dom/extend-expect';
|
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import CaseStudyView from './CaseStudyView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
8
|
+
import config from '@plone/volto/registry';
|
|
9
|
+
|
|
10
|
+
config.blocks = {
|
|
11
|
+
blocksConfig: {
|
|
12
|
+
title: {
|
|
13
|
+
view: () => <div>Title Block Component</div>,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
8
17
|
|
|
9
18
|
const mockStore = configureStore();
|
|
10
19
|
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
LinksList,
|
|
6
6
|
PublishedModifiedInfo,
|
|
7
7
|
ShareInfo,
|
|
8
|
+
BannerTitle,
|
|
8
9
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
9
10
|
import { Grid } from 'semantic-ui-react';
|
|
10
11
|
|
|
@@ -35,6 +36,7 @@ function GuidanceView(props) {
|
|
|
35
36
|
|
|
36
37
|
return (
|
|
37
38
|
<div className="guidance-view">
|
|
39
|
+
<BannerTitle content={content} type="Guidance Document" />
|
|
38
40
|
<div className="ui container">
|
|
39
41
|
<Grid columns="12">
|
|
40
42
|
<div className="row">
|
|
@@ -44,9 +46,6 @@ function GuidanceView(props) {
|
|
|
44
46
|
computer={9}
|
|
45
47
|
className="col-left"
|
|
46
48
|
>
|
|
47
|
-
<div className="ui label">Guidance Document</div>
|
|
48
|
-
<h1>{content.title}</h1>
|
|
49
|
-
<hr />
|
|
50
49
|
<h4>Description:</h4>
|
|
51
50
|
<HTMLField
|
|
52
51
|
value={content.long_description}
|
|
@@ -5,6 +5,15 @@ import '@testing-library/jest-dom/extend-expect';
|
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import GuidanceView from './GuidanceView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
8
|
+
import config from '@plone/volto/registry';
|
|
9
|
+
|
|
10
|
+
config.blocks = {
|
|
11
|
+
blocksConfig: {
|
|
12
|
+
title: {
|
|
13
|
+
view: () => <div>Title Block Component</div>,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
8
17
|
|
|
9
18
|
const mockStore = configureStore();
|
|
10
19
|
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
LinksList,
|
|
6
6
|
PublishedModifiedInfo,
|
|
7
7
|
ShareInfo,
|
|
8
|
+
BannerTitle,
|
|
8
9
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
9
10
|
import { Grid } from 'semantic-ui-react';
|
|
10
11
|
|
|
@@ -13,6 +14,8 @@ function IndicatorView(props) {
|
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
16
|
<div className="indicator-view">
|
|
17
|
+
<BannerTitle content={content} type="Indicator" />
|
|
18
|
+
|
|
16
19
|
<div className="ui container">
|
|
17
20
|
<Grid columns="12">
|
|
18
21
|
<div className="row">
|
|
@@ -22,8 +25,6 @@ function IndicatorView(props) {
|
|
|
22
25
|
computer={9}
|
|
23
26
|
className="col-left"
|
|
24
27
|
>
|
|
25
|
-
<div className="ui label">Indicator</div>
|
|
26
|
-
<h1>{content.title}</h1>
|
|
27
28
|
<h4>Description</h4>
|
|
28
29
|
<HTMLField
|
|
29
30
|
value={content.long_description}
|
|
@@ -5,6 +5,15 @@ import '@testing-library/jest-dom/extend-expect';
|
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import IndicatorView from './IndicatorView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
8
|
+
import config from '@plone/volto/registry';
|
|
9
|
+
|
|
10
|
+
config.blocks = {
|
|
11
|
+
blocksConfig: {
|
|
12
|
+
title: {
|
|
13
|
+
view: () => <div>Title Block Component</div>,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
8
17
|
|
|
9
18
|
const mockStore = configureStore();
|
|
10
19
|
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
LinksList,
|
|
6
6
|
PublishedModifiedInfo,
|
|
7
7
|
ShareInfo,
|
|
8
|
+
BannerTitle,
|
|
8
9
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
9
10
|
import { Grid } from 'semantic-ui-react';
|
|
10
11
|
|
|
@@ -13,6 +14,8 @@ function InformationPortalView(props) {
|
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
16
|
<div className="information-portal-view">
|
|
17
|
+
<BannerTitle content={content} type="Information Portal" />
|
|
18
|
+
|
|
16
19
|
<div className="ui container">
|
|
17
20
|
<Grid columns="12">
|
|
18
21
|
<div className="row">
|
|
@@ -22,9 +25,7 @@ function InformationPortalView(props) {
|
|
|
22
25
|
computer={9}
|
|
23
26
|
className="col-left"
|
|
24
27
|
>
|
|
25
|
-
<
|
|
26
|
-
<h1>{content.title}</h1>
|
|
27
|
-
<h4>Description</h4>
|
|
28
|
+
<h4>Description:</h4>
|
|
28
29
|
<HTMLField
|
|
29
30
|
value={content.long_description}
|
|
30
31
|
className="long_description"
|
|
@@ -5,6 +5,15 @@ import '@testing-library/jest-dom/extend-expect';
|
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import InformationPortalView from './InformationPortalView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
8
|
+
import config from '@plone/volto/registry';
|
|
9
|
+
|
|
10
|
+
config.blocks = {
|
|
11
|
+
blocksConfig: {
|
|
12
|
+
title: {
|
|
13
|
+
view: () => <div>Title Block Component</div>,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
8
17
|
|
|
9
18
|
const mockStore = configureStore();
|
|
10
19
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Fragment } from 'react';
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
3
2
|
import { UniversalLink } from '@plone/volto/components';
|
|
4
3
|
import {
|
|
5
4
|
HTMLField,
|
|
@@ -7,6 +6,7 @@ import {
|
|
|
7
6
|
LinksList,
|
|
8
7
|
PublishedModifiedInfo,
|
|
9
8
|
ShareInfo,
|
|
9
|
+
BannerTitle,
|
|
10
10
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
11
11
|
import { Grid } from 'semantic-ui-react';
|
|
12
12
|
|
|
@@ -27,6 +27,8 @@ function OrganisationView(props) {
|
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
29
|
<div className="organisation-view">
|
|
30
|
+
<BannerTitle content={content} type="Organisation" />
|
|
31
|
+
|
|
30
32
|
<div className="ui container">
|
|
31
33
|
<Grid columns="12">
|
|
32
34
|
<div className="row">
|
|
@@ -36,15 +38,15 @@ function OrganisationView(props) {
|
|
|
36
38
|
computer={9}
|
|
37
39
|
className="col-left"
|
|
38
40
|
>
|
|
39
|
-
<div
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
<div>
|
|
42
|
+
<h4>Description:</h4>
|
|
43
|
+
<HTMLField
|
|
44
|
+
value={content.long_description}
|
|
45
|
+
className="long_description"
|
|
46
|
+
/>
|
|
47
|
+
<hr />
|
|
48
|
+
<h4>Reference information</h4>
|
|
49
|
+
</div>
|
|
48
50
|
|
|
49
51
|
{content?.websites?.length > 0 && (
|
|
50
52
|
<LinksList title="Websites:" value={content.websites} />
|
|
@@ -5,6 +5,15 @@ import '@testing-library/jest-dom/extend-expect';
|
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import OrganisationView from './OrganisationView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
8
|
+
import config from '@plone/volto/registry';
|
|
9
|
+
|
|
10
|
+
config.blocks = {
|
|
11
|
+
blocksConfig: {
|
|
12
|
+
title: {
|
|
13
|
+
view: () => <div>Title Block Component</div>,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
8
17
|
|
|
9
18
|
const mockStore = configureStore();
|
|
10
19
|
|
|
@@ -7,11 +7,34 @@ import {
|
|
|
7
7
|
ShareInfo,
|
|
8
8
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
9
9
|
import { Grid } from 'semantic-ui-react';
|
|
10
|
+
import config from '@plone/volto/registry';
|
|
10
11
|
|
|
11
12
|
function ProjectView(props) {
|
|
12
13
|
const { content } = props;
|
|
14
|
+
const {
|
|
15
|
+
blocks: { blocksConfig },
|
|
16
|
+
} = config;
|
|
17
|
+
const TitleBlockView = blocksConfig?.title?.view;
|
|
18
|
+
|
|
13
19
|
return (
|
|
14
20
|
<div className="project-view">
|
|
21
|
+
<TitleBlockView
|
|
22
|
+
{...props}
|
|
23
|
+
data={{
|
|
24
|
+
info: [{ description: '' }],
|
|
25
|
+
hideContentType: true,
|
|
26
|
+
hideCreationDate: true,
|
|
27
|
+
hideModificationDate: true,
|
|
28
|
+
hidePublishingDate: true,
|
|
29
|
+
hideDownloadButton: true,
|
|
30
|
+
hideShareButton: false,
|
|
31
|
+
subtitle: 'Project',
|
|
32
|
+
}}
|
|
33
|
+
metadata={{
|
|
34
|
+
...content,
|
|
35
|
+
title: content.title + ' (' + content.acronym + ')',
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
15
38
|
<div className="ui container">
|
|
16
39
|
<Grid columns="12">
|
|
17
40
|
<div className="row">
|
|
@@ -21,10 +44,6 @@ function ProjectView(props) {
|
|
|
21
44
|
computer={9}
|
|
22
45
|
className="col-left"
|
|
23
46
|
>
|
|
24
|
-
<div className="ui label">Project</div>
|
|
25
|
-
<h1>
|
|
26
|
-
{content.title} ({content.acronym})
|
|
27
|
-
</h1>
|
|
28
47
|
<h4>Description:</h4>
|
|
29
48
|
<HTMLField
|
|
30
49
|
value={content.long_description}
|
|
@@ -5,6 +5,15 @@ import '@testing-library/jest-dom/extend-expect';
|
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import ProjectView from './ProjectView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
8
|
+
import config from '@plone/volto/registry';
|
|
9
|
+
|
|
10
|
+
config.blocks = {
|
|
11
|
+
blocksConfig: {
|
|
12
|
+
title: {
|
|
13
|
+
view: () => <div>Title Block Component</div>,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
8
17
|
|
|
9
18
|
const mockStore = configureStore();
|
|
10
19
|
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
DocumentsList,
|
|
6
6
|
ShareInfo,
|
|
7
7
|
ReferenceInfo,
|
|
8
|
+
BannerTitle,
|
|
8
9
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
9
10
|
import { Grid } from 'semantic-ui-react';
|
|
10
11
|
|
|
@@ -13,6 +14,8 @@ function PublicationReportView(props) {
|
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
16
|
<div className="publication-report-view">
|
|
17
|
+
<BannerTitle content={content} type="Publications and Report" />
|
|
18
|
+
|
|
16
19
|
<div className="ui container">
|
|
17
20
|
<Grid columns="12">
|
|
18
21
|
<div className="row">
|
|
@@ -22,8 +25,6 @@ function PublicationReportView(props) {
|
|
|
22
25
|
computer={9}
|
|
23
26
|
className="col-left"
|
|
24
27
|
>
|
|
25
|
-
<div className="ui label">Publications and Reports</div>
|
|
26
|
-
|
|
27
28
|
<ReferenceInfo content={content} />
|
|
28
29
|
<PublishedModifiedInfo {...props} />
|
|
29
30
|
<ShareInfo {...props} />
|
|
@@ -5,6 +5,15 @@ import '@testing-library/jest-dom/extend-expect';
|
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import PublicationReportView from './PublicationReportView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
8
|
+
import config from '@plone/volto/registry';
|
|
9
|
+
|
|
10
|
+
config.blocks = {
|
|
11
|
+
blocksConfig: {
|
|
12
|
+
title: {
|
|
13
|
+
view: () => <div>Title Block Component</div>,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
8
17
|
|
|
9
18
|
const mockStore = configureStore();
|
|
10
19
|
|
|
@@ -3,13 +3,17 @@ import {
|
|
|
3
3
|
ContentMetadata,
|
|
4
4
|
PublishedModifiedInfo,
|
|
5
5
|
ReferenceInfo,
|
|
6
|
+
BannerTitle,
|
|
6
7
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
7
8
|
import { Grid } from 'semantic-ui-react';
|
|
8
9
|
|
|
9
10
|
function ToolView(props) {
|
|
10
11
|
const { content } = props;
|
|
12
|
+
|
|
11
13
|
return (
|
|
12
14
|
<div className="tool-view">
|
|
15
|
+
<BannerTitle content={content} type="Tools" />
|
|
16
|
+
|
|
13
17
|
<div className="ui container">
|
|
14
18
|
<Grid columns="12">
|
|
15
19
|
<div className="row">
|
|
@@ -19,8 +23,6 @@ function ToolView(props) {
|
|
|
19
23
|
computer={9}
|
|
20
24
|
className="col-left"
|
|
21
25
|
>
|
|
22
|
-
<div className="ui label">Tools</div>
|
|
23
|
-
|
|
24
26
|
<ReferenceInfo content={content} />
|
|
25
27
|
|
|
26
28
|
<PublishedModifiedInfo {...props} />
|
|
@@ -5,6 +5,15 @@ import '@testing-library/jest-dom/extend-expect';
|
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import ToolView from './ToolView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
8
|
+
import config from '@plone/volto/registry';
|
|
9
|
+
|
|
10
|
+
config.blocks = {
|
|
11
|
+
blocksConfig: {
|
|
12
|
+
title: {
|
|
13
|
+
view: () => <div>Title Block Component</div>,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
8
17
|
|
|
9
18
|
const mockStore = configureStore();
|
|
10
19
|
|
|
@@ -5,11 +5,13 @@ import {
|
|
|
5
5
|
ExternalLink,
|
|
6
6
|
LinksList,
|
|
7
7
|
ShareInfo,
|
|
8
|
+
BannerTitle,
|
|
8
9
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
9
10
|
import { Grid } from 'semantic-ui-react';
|
|
10
11
|
|
|
11
12
|
function VideoView(props) {
|
|
12
13
|
const { content } = props;
|
|
14
|
+
|
|
13
15
|
const share_eea = ['https://cmshare.eea.eu', 'shareit.eea.europa.eu'];
|
|
14
16
|
const is_cmshare_video = share_eea.some((domain) =>
|
|
15
17
|
content.embed_url.includes(domain),
|
|
@@ -25,6 +27,8 @@ function VideoView(props) {
|
|
|
25
27
|
|
|
26
28
|
return (
|
|
27
29
|
<div className="video-view">
|
|
30
|
+
<BannerTitle content={content} type="Video" />
|
|
31
|
+
|
|
28
32
|
<div className="ui container">
|
|
29
33
|
<Grid columns="12">
|
|
30
34
|
<div className="row">
|
|
@@ -34,8 +38,6 @@ function VideoView(props) {
|
|
|
34
38
|
computer={9}
|
|
35
39
|
className="col-left"
|
|
36
40
|
>
|
|
37
|
-
<div className="ui label">Video</div>
|
|
38
|
-
<h1>{content.title}</h1>
|
|
39
41
|
<HTMLField
|
|
40
42
|
value={content.long_description}
|
|
41
43
|
className="long_description"
|
|
@@ -5,6 +5,15 @@ import '@testing-library/jest-dom/extend-expect';
|
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import VideoView from './ToolView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
8
|
+
import config from '@plone/volto/registry';
|
|
9
|
+
|
|
10
|
+
config.blocks = {
|
|
11
|
+
blocksConfig: {
|
|
12
|
+
title: {
|
|
13
|
+
view: () => <div>Title Block Component</div>,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
8
17
|
|
|
9
18
|
const mockStore = configureStore();
|
|
10
19
|
|
|
@@ -187,9 +187,10 @@ const FirstLevelContent = ({ element, renderMenuItem, pathName }) => {
|
|
|
187
187
|
overflow_item.title = 'See all';
|
|
188
188
|
x.content = (
|
|
189
189
|
<Accordion.Content>
|
|
190
|
-
{
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
{!item.nonclickable &&
|
|
191
|
+
renderMenuItem(overflow_item, {
|
|
192
|
+
className: 'item title-item',
|
|
193
|
+
})}
|
|
193
194
|
<SecondLevelContent
|
|
194
195
|
element={item}
|
|
195
196
|
renderMenuItem={renderMenuItem}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Original: https://github.com/plone/volto/blob/16.x.x/src/components/theme/Widgets/RichTextWidget.jsx
|
|
2
|
+
// Fixed 'dangerouslySetInnerHTML' did not match. Server: "" Client: "<p>This is my paragraph.</p>" error
|
|
3
|
+
// replaced <p> to <div>, the value can already be wrapped in <p> and nested <p> is invalid HTML
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import cx from 'classnames';
|
|
7
|
+
|
|
8
|
+
const RichTextWidget = ({ value, className }) =>
|
|
9
|
+
value ? (
|
|
10
|
+
<div
|
|
11
|
+
className={cx(className, 'richtext', 'widget')}
|
|
12
|
+
dangerouslySetInnerHTML={{
|
|
13
|
+
__html: value.data,
|
|
14
|
+
}}
|
|
15
|
+
/>
|
|
16
|
+
) : (
|
|
17
|
+
''
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export default RichTextWidget;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
customized the `getRecursiveItems` to pass the entire object to the navigation component
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Navigation reducer.
|
|
3
|
+
* @module reducers/navigation/navigation
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { map } from 'lodash';
|
|
7
|
+
import {
|
|
8
|
+
flattenToAppURL,
|
|
9
|
+
getBaseUrl,
|
|
10
|
+
hasApiExpander,
|
|
11
|
+
} from '@plone/volto/helpers';
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
GET_CONTENT,
|
|
15
|
+
GET_NAVIGATION,
|
|
16
|
+
} from '@plone/volto/constants/ActionTypes';
|
|
17
|
+
|
|
18
|
+
const initialState = {
|
|
19
|
+
error: null,
|
|
20
|
+
items: [],
|
|
21
|
+
loaded: false,
|
|
22
|
+
loading: false,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Recursive function that process the items returned by the navigation
|
|
27
|
+
* endpoint
|
|
28
|
+
* @function getRecursiveItems
|
|
29
|
+
* @param {array} items The items inside a navigation response.
|
|
30
|
+
* @returns {*} The navigation items object (recursive)
|
|
31
|
+
*/
|
|
32
|
+
function getRecursiveItems(items) {
|
|
33
|
+
return map(items, (item) => ({
|
|
34
|
+
title: item.title,
|
|
35
|
+
description: item.description,
|
|
36
|
+
url: flattenToAppURL(item['@id']),
|
|
37
|
+
...item,
|
|
38
|
+
...(item.items && { items: getRecursiveItems(item.items) }),
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Navigation reducer.
|
|
44
|
+
* @function navigation
|
|
45
|
+
* @param {Object} state Current state.
|
|
46
|
+
* @param {Object} action Action to be handled.
|
|
47
|
+
* @returns {Object} New state.
|
|
48
|
+
*/
|
|
49
|
+
export default function navigation(state = initialState, action = {}) {
|
|
50
|
+
let hasExpander;
|
|
51
|
+
switch (action.type) {
|
|
52
|
+
case `${GET_NAVIGATION}_PENDING`:
|
|
53
|
+
return {
|
|
54
|
+
...state,
|
|
55
|
+
error: null,
|
|
56
|
+
loaded: false,
|
|
57
|
+
loading: true,
|
|
58
|
+
};
|
|
59
|
+
case `${GET_CONTENT}_SUCCESS`:
|
|
60
|
+
hasExpander = hasApiExpander(
|
|
61
|
+
'navigation',
|
|
62
|
+
getBaseUrl(flattenToAppURL(action.result['@id'])),
|
|
63
|
+
);
|
|
64
|
+
if (hasExpander && !action.subrequest) {
|
|
65
|
+
return {
|
|
66
|
+
...state,
|
|
67
|
+
error: null,
|
|
68
|
+
items: getRecursiveItems(
|
|
69
|
+
action.result['@components'].navigation.items,
|
|
70
|
+
),
|
|
71
|
+
loaded: true,
|
|
72
|
+
loading: false,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return state;
|
|
76
|
+
case `${GET_NAVIGATION}_SUCCESS`:
|
|
77
|
+
// Even if the expander is set or not, if the GET_NAVIGATION is
|
|
78
|
+
// called, we want it to store the data if the actions data is
|
|
79
|
+
// not set in the expander data (['@components']) but in the "normal"
|
|
80
|
+
// action result (we look for the object property returned by the endpoint)
|
|
81
|
+
if (!action.result?.['@components'] && action.result?.items) {
|
|
82
|
+
return {
|
|
83
|
+
...state,
|
|
84
|
+
error: null,
|
|
85
|
+
items: getRecursiveItems(action.result.items),
|
|
86
|
+
loaded: true,
|
|
87
|
+
loading: false,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return state;
|
|
91
|
+
case `${GET_NAVIGATION}_FAIL`:
|
|
92
|
+
return {
|
|
93
|
+
...state,
|
|
94
|
+
error: action.error,
|
|
95
|
+
items: [],
|
|
96
|
+
loaded: false,
|
|
97
|
+
loading: false,
|
|
98
|
+
};
|
|
99
|
+
default:
|
|
100
|
+
return state;
|
|
101
|
+
}
|
|
102
|
+
}
|
package/src/helpers/Utils.jsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UniversalLink } from '@plone/volto/components';
|
|
2
|
+
import config from '@plone/volto/registry';
|
|
2
3
|
|
|
3
4
|
export const HTMLField = ({ value, className }) => {
|
|
4
5
|
if (value === null) {
|
|
@@ -68,11 +69,37 @@ export const LinksList = (props) => {
|
|
|
68
69
|
}
|
|
69
70
|
};
|
|
70
71
|
|
|
72
|
+
export const BannerTitle = (props) => {
|
|
73
|
+
const { content, type } = props;
|
|
74
|
+
const {
|
|
75
|
+
blocks: { blocksConfig },
|
|
76
|
+
} = config;
|
|
77
|
+
const TitleBlockView = blocksConfig?.title?.view;
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<>
|
|
81
|
+
<TitleBlockView
|
|
82
|
+
{...props}
|
|
83
|
+
data={{
|
|
84
|
+
info: [{ description: '' }],
|
|
85
|
+
hideContentType: true,
|
|
86
|
+
hideCreationDate: true,
|
|
87
|
+
hideModificationDate: true,
|
|
88
|
+
hidePublishingDate: true,
|
|
89
|
+
hideDownloadButton: true,
|
|
90
|
+
hideShareButton: false,
|
|
91
|
+
subtitle: type,
|
|
92
|
+
}}
|
|
93
|
+
metadata={content}
|
|
94
|
+
/>
|
|
95
|
+
</>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
71
99
|
export const ReferenceInfo = (props) => {
|
|
72
100
|
const { content } = props;
|
|
73
101
|
return (
|
|
74
102
|
<>
|
|
75
|
-
<h1>{content.title}</h1>
|
|
76
103
|
<h4>Description</h4>
|
|
77
104
|
<HTMLField
|
|
78
105
|
value={content.long_description}
|
package/src/helpers/index.js
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
import { multiTermFacet } from '@eeacms/search';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
include_archived,
|
|
4
|
+
objectProvides,
|
|
5
|
+
language,
|
|
6
|
+
issued_date,
|
|
7
|
+
geographic_countries,
|
|
8
|
+
} from './../common';
|
|
4
9
|
|
|
5
10
|
const facets = [
|
|
6
|
-
...globalSearchBaseConfig.facets,
|
|
7
11
|
multiTermFacet({
|
|
8
|
-
field: '
|
|
12
|
+
field: 'cca_funding_programme.keyword',
|
|
9
13
|
isFilterable: false,
|
|
10
14
|
isMulti: true,
|
|
11
|
-
label: '
|
|
15
|
+
label: 'Funding Programme',
|
|
16
|
+
iconsFamily: 'Funding Programme',
|
|
12
17
|
alwaysVisible: false,
|
|
13
18
|
}),
|
|
14
19
|
multiTermFacet({
|
|
15
20
|
field: 'cca_climate_impacts.keyword',
|
|
16
21
|
isFilterable: false,
|
|
17
22
|
isMulti: true,
|
|
18
|
-
label: 'Climate
|
|
23
|
+
label: 'Climate Impacts',
|
|
24
|
+
alwaysVisible: false,
|
|
25
|
+
}),
|
|
26
|
+
multiTermFacet({
|
|
27
|
+
field: 'cca_adaptation_sectors.keyword',
|
|
28
|
+
isFilterable: false,
|
|
29
|
+
isMulti: true,
|
|
30
|
+
label: 'Adaptation Sectors',
|
|
19
31
|
alwaysVisible: false,
|
|
20
32
|
}),
|
|
21
33
|
multiTermFacet({
|
|
@@ -25,6 +37,11 @@ const facets = [
|
|
|
25
37
|
label: 'Adaptation Elements',
|
|
26
38
|
alwaysVisible: false,
|
|
27
39
|
}),
|
|
40
|
+
geographic_countries,
|
|
41
|
+
include_archived,
|
|
42
|
+
issued_date,
|
|
43
|
+
language,
|
|
44
|
+
objectProvides,
|
|
28
45
|
];
|
|
29
46
|
|
|
30
47
|
export default facets;
|
|
@@ -3,53 +3,45 @@ import { multiTermFacet } from '@eeacms/search';
|
|
|
3
3
|
import globalSearchBaseConfig from '@eeacms/volto-globalsearch/config/global-search-base-config.js';
|
|
4
4
|
|
|
5
5
|
const facets = [
|
|
6
|
-
...globalSearchBaseConfig.facets,
|
|
7
|
-
// multiTermFacet({
|
|
8
|
-
// field: 'spatial',
|
|
9
|
-
// isFilterable: false,
|
|
10
|
-
// isMulti: true,
|
|
11
|
-
// label: 'Country',
|
|
12
|
-
// iconsFamily: 'Country',
|
|
13
|
-
// alwaysVisible: false,
|
|
14
|
-
// }),
|
|
15
6
|
multiTermFacet({
|
|
16
|
-
field: '
|
|
7
|
+
field: 'cca_climate_impacts.keyword',
|
|
17
8
|
isFilterable: false,
|
|
18
9
|
isMulti: true,
|
|
19
|
-
label: '
|
|
20
|
-
iconsFamily: '
|
|
10
|
+
label: 'Climate Impacts',
|
|
11
|
+
iconsFamily: 'Climate Impacts',
|
|
21
12
|
alwaysVisible: false,
|
|
22
13
|
}),
|
|
23
14
|
multiTermFacet({
|
|
24
|
-
field: '
|
|
15
|
+
field: 'cca_adaptation_sectors.keyword',
|
|
25
16
|
isFilterable: false,
|
|
26
17
|
isMulti: true,
|
|
27
|
-
label: '
|
|
28
|
-
iconsFamily: '
|
|
18
|
+
label: 'Adaptation Sectors',
|
|
19
|
+
iconsFamily: 'Adaptation Sectors',
|
|
29
20
|
alwaysVisible: false,
|
|
30
21
|
}),
|
|
31
22
|
multiTermFacet({
|
|
32
|
-
field: '
|
|
23
|
+
field: 'key_system.keyword',
|
|
33
24
|
isFilterable: false,
|
|
34
25
|
isMulti: true,
|
|
35
|
-
label: '
|
|
36
|
-
iconsFamily: '
|
|
26
|
+
label: 'Key Community Systems',
|
|
27
|
+
iconsFamily: 'Key Community Systems',
|
|
37
28
|
alwaysVisible: false,
|
|
38
29
|
}),
|
|
30
|
+
...globalSearchBaseConfig.facets,
|
|
39
31
|
multiTermFacet({
|
|
40
|
-
field: '
|
|
32
|
+
field: 'cca_funding_programme.keyword',
|
|
41
33
|
isFilterable: false,
|
|
42
34
|
isMulti: true,
|
|
43
|
-
label: '
|
|
44
|
-
iconsFamily: '
|
|
35
|
+
label: 'Funding Programme',
|
|
36
|
+
iconsFamily: 'Funding Programme',
|
|
45
37
|
alwaysVisible: false,
|
|
46
38
|
}),
|
|
47
39
|
multiTermFacet({
|
|
48
|
-
field: '
|
|
40
|
+
field: 'climate_threats.keyword',
|
|
49
41
|
isFilterable: false,
|
|
50
42
|
isMulti: true,
|
|
51
|
-
label: '
|
|
52
|
-
iconsFamily: '
|
|
43
|
+
label: 'Hazard Type',
|
|
44
|
+
iconsFamily: 'Hazard Type',
|
|
53
45
|
alwaysVisible: false,
|
|
54
46
|
}),
|
|
55
47
|
];
|