@eeacms/volto-cca-policy 0.2.43 → 0.2.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/package.json +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters.jsx +25 -25
- package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsEdit.jsx +1 -1
- package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsView.jsx +24 -14
- package/src/components/manage/Blocks/CollectionStatistics/schema.js +30 -2
- package/src/components/manage/Blocks/RASTBlock/RASTMap.jsx +21 -7
- package/src/components/manage/Blocks/RASTBlock/styles.less +83 -31
- package/src/components/theme/Views/EventView.jsx +1 -46
- package/src/helpers/Utils.jsx +52 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ 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.45](https://github.com/eea/volto-cca-policy/compare/0.2.44...0.2.45) - 24 June 2024
|
|
8
|
+
|
|
9
|
+
### [0.2.44](https://github.com/eea/volto-cca-policy/compare/0.2.43...0.2.44) - 20 June 2024
|
|
10
|
+
|
|
11
|
+
#### :nail_care: Enhancements
|
|
12
|
+
|
|
13
|
+
- change(block): RAST svg styling [kreafox - [`da47397`](https://github.com/eea/volto-cca-policy/commit/da47397a0513b8ff55a3796712b7f70c64ec2966)]
|
|
14
|
+
|
|
15
|
+
#### :house: Internal changes
|
|
16
|
+
|
|
17
|
+
- style: Automated code fix [eea-jenkins - [`b41cc24`](https://github.com/eea/volto-cca-policy/commit/b41cc24fcaf25a32af2fed778af7183b942c2dbd)]
|
|
18
|
+
|
|
19
|
+
#### :hammer_and_wrench: Others
|
|
20
|
+
|
|
21
|
+
- Fix bugs [Tiberiu Ichim - [`9585833`](https://github.com/eea/volto-cca-policy/commit/9585833739e2e951bff24c5a33c2d99ab36fb0c1)]
|
|
22
|
+
- Update snapshots [Tiberiu Ichim - [`15a62cf`](https://github.com/eea/volto-cca-policy/commit/15a62cf96d5b112e1d3cf1df44c6758ce0e2d73c)]
|
|
7
23
|
### [0.2.43](https://github.com/eea/volto-cca-policy/compare/0.2.42...0.2.43) - 13 June 2024
|
|
8
24
|
|
|
9
25
|
#### :rocket: New Features
|
|
@@ -1393,10 +1409,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1393
1409
|
- Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
|
|
1394
1410
|
- Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
|
|
1395
1411
|
- Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
|
|
1412
|
+
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
|
|
1413
|
+
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
|
|
1396
1414
|
### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
|
|
1397
1415
|
|
|
1398
1416
|
#### :house: Internal changes
|
|
1399
1417
|
|
|
1418
|
+
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
|
|
1400
1419
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
|
|
1401
1420
|
|
|
1402
1421
|
#### :hammer_and_wrench: Others
|
|
@@ -1413,6 +1432,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1413
1432
|
- Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
|
|
1414
1433
|
- Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
|
|
1415
1434
|
- Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
|
|
1435
|
+
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
|
|
1436
|
+
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
|
|
1437
|
+
- test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
|
|
1416
1438
|
- Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
|
|
1417
1439
|
- 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)]
|
|
1418
1440
|
- Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
|
|
@@ -1629,6 +1651,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1629
1651
|
|
|
1630
1652
|
#### :house: Internal changes
|
|
1631
1653
|
|
|
1654
|
+
- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
|
|
1632
1655
|
|
|
1633
1656
|
#### :hammer_and_wrench: Others
|
|
1634
1657
|
|
|
@@ -2109,6 +2132,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
2109
2132
|
#### :hammer_and_wrench: Others
|
|
2110
2133
|
|
|
2111
2134
|
- Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
|
|
2135
|
+
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
|
|
2112
2136
|
### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
|
|
2113
2137
|
|
|
2114
2138
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -84,31 +84,6 @@ export default function CaseStudyFilters(props) {
|
|
|
84
84
|
),
|
|
85
85
|
)}
|
|
86
86
|
</Accordion.Content>
|
|
87
|
-
<Accordion.Title
|
|
88
|
-
active={activeIndex.includes(3)}
|
|
89
|
-
index={3}
|
|
90
|
-
onClick={handleClick}
|
|
91
|
-
>
|
|
92
|
-
<AccordionIcon active={activeIndex.includes(3)} />
|
|
93
|
-
<FormattedMessage
|
|
94
|
-
id="Adaptation elements"
|
|
95
|
-
defaultMessage="Adaptation elements"
|
|
96
|
-
/>
|
|
97
|
-
</Accordion.Title>
|
|
98
|
-
<Accordion.Content active={activeIndex.includes(3)}>
|
|
99
|
-
{Object.entries(filters?.elements || {}).map(
|
|
100
|
-
([value, label], index) => (
|
|
101
|
-
<Checkbox
|
|
102
|
-
label={intl.formatMessage({ id: label })}
|
|
103
|
-
value={value}
|
|
104
|
-
checked={activeFilters.elements.includes(value)}
|
|
105
|
-
name="elements"
|
|
106
|
-
onChange={checkboxChangeHandler}
|
|
107
|
-
key={'element' + index}
|
|
108
|
-
/>
|
|
109
|
-
),
|
|
110
|
-
)}
|
|
111
|
-
</Accordion.Content>
|
|
112
87
|
<Accordion.Title
|
|
113
88
|
active={activeIndex.includes(1)}
|
|
114
89
|
index={1}
|
|
@@ -166,6 +141,31 @@ export default function CaseStudyFilters(props) {
|
|
|
166
141
|
),
|
|
167
142
|
)}
|
|
168
143
|
</Accordion.Content>
|
|
144
|
+
<Accordion.Title
|
|
145
|
+
active={activeIndex.includes(3)}
|
|
146
|
+
index={3}
|
|
147
|
+
onClick={handleClick}
|
|
148
|
+
>
|
|
149
|
+
<AccordionIcon active={activeIndex.includes(3)} />
|
|
150
|
+
<FormattedMessage
|
|
151
|
+
id="Adaptation elements"
|
|
152
|
+
defaultMessage="Adaptation elements"
|
|
153
|
+
/>
|
|
154
|
+
</Accordion.Title>
|
|
155
|
+
<Accordion.Content active={activeIndex.includes(3)}>
|
|
156
|
+
{Object.entries(filters?.elements || {}).map(
|
|
157
|
+
([value, label], index) => (
|
|
158
|
+
<Checkbox
|
|
159
|
+
label={intl.formatMessage({ id: label })}
|
|
160
|
+
value={value}
|
|
161
|
+
checked={activeFilters.elements.includes(value)}
|
|
162
|
+
name="elements"
|
|
163
|
+
onChange={checkboxChangeHandler}
|
|
164
|
+
key={'element' + index}
|
|
165
|
+
/>
|
|
166
|
+
),
|
|
167
|
+
)}
|
|
168
|
+
</Accordion.Content>
|
|
169
169
|
</Accordion>
|
|
170
170
|
{nrActiveFilters ? (
|
|
171
171
|
<button
|
|
@@ -66,21 +66,29 @@ const makeSearchBlockQuery = ({ base, query, field, value }) => {
|
|
|
66
66
|
return `${base}?${params}`;
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
const makeEEASearchQuery = ({ base, field, value }) => {
|
|
69
|
+
const makeEEASearchQuery = ({ base, field, value, extraFilters }) => {
|
|
70
70
|
// TODO: don't hardcode the language
|
|
71
|
-
const
|
|
72
|
-
'
|
|
73
|
-
'
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
71
|
+
const allFields = [
|
|
72
|
+
['issued.date', 'Last 5 years'],
|
|
73
|
+
['language', 'en'],
|
|
74
|
+
[field, value],
|
|
75
|
+
...(extraFilters?.map(({ id, value }) => [id, value]) || []),
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
const rest = '&sort-field=issued.date&sort-direction=desc';
|
|
79
|
+
|
|
80
|
+
// See FilterAceContentView
|
|
81
|
+
const filters = allFields
|
|
82
|
+
.map(([name, anyValue], index) =>
|
|
83
|
+
[
|
|
84
|
+
`filters[${index}][field]=${name}`,
|
|
85
|
+
`filters[${index}][type]=any`,
|
|
86
|
+
`filters[${index}][values][0]=${anyValue}`,
|
|
87
|
+
].join('&'),
|
|
88
|
+
)
|
|
89
|
+
.join('&');
|
|
90
|
+
|
|
91
|
+
return `${base}?size=n_10_n&${filters}&${rest}`;
|
|
84
92
|
};
|
|
85
93
|
|
|
86
94
|
const urlBuilders = {
|
|
@@ -116,6 +124,7 @@ export default function CollectionStatsView(props) {
|
|
|
116
124
|
|
|
117
125
|
const keys = Object.keys(stats);
|
|
118
126
|
const urlHandler = urlBuilders[queryParameterStyle] || nop;
|
|
127
|
+
const extraFilters = data?.extraFilters || [];
|
|
119
128
|
|
|
120
129
|
return (
|
|
121
130
|
(field && keys.length > 0 && (
|
|
@@ -133,6 +142,7 @@ export default function CollectionStatsView(props) {
|
|
|
133
142
|
query: query.query,
|
|
134
143
|
field: groupDefinition.searchFieldName || field,
|
|
135
144
|
value: kV,
|
|
145
|
+
extraFilters,
|
|
136
146
|
})}
|
|
137
147
|
>
|
|
138
148
|
<IconComponent
|
|
@@ -3,14 +3,36 @@ import {
|
|
|
3
3
|
hasDateOperation,
|
|
4
4
|
} from '@plone/volto/components/manage/Blocks/Search/utils';
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const ExtraFilter = (_) => ({
|
|
7
|
+
title: 'Extra Filters',
|
|
8
|
+
fieldsets: [{ id: 'default', fields: ['id', 'value'], title: 'Default' }],
|
|
9
|
+
properties: {
|
|
10
|
+
id: {
|
|
11
|
+
title: 'Field ID',
|
|
12
|
+
},
|
|
13
|
+
value: {
|
|
14
|
+
title: 'Filter value',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
required: [],
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const Schema = (formData) => {
|
|
21
|
+
const isEEASearch = formData?.queryParameterStyle === 'EEASemanticSearch';
|
|
22
|
+
|
|
7
23
|
return {
|
|
8
24
|
title: 'Collection Statistics',
|
|
9
25
|
fieldsets: [
|
|
10
26
|
{
|
|
11
27
|
id: 'default',
|
|
12
28
|
title: 'Default',
|
|
13
|
-
fields: [
|
|
29
|
+
fields: [
|
|
30
|
+
'aggregateField',
|
|
31
|
+
'queryParameterStyle',
|
|
32
|
+
'href',
|
|
33
|
+
'showLabel',
|
|
34
|
+
...(isEEASearch ? ['extraFilters'] : []),
|
|
35
|
+
],
|
|
14
36
|
},
|
|
15
37
|
{
|
|
16
38
|
id: 'query',
|
|
@@ -68,6 +90,12 @@ const Schema = () => {
|
|
|
68
90
|
selectedItemAttrs: [],
|
|
69
91
|
allowExternals: true,
|
|
70
92
|
},
|
|
93
|
+
extraFilters: {
|
|
94
|
+
title: 'Extra filters',
|
|
95
|
+
widget: 'object_list',
|
|
96
|
+
schema: ExtraFilter({ formData }),
|
|
97
|
+
// schemaExtender: (schema) => schema,
|
|
98
|
+
},
|
|
71
99
|
},
|
|
72
100
|
required: [],
|
|
73
101
|
};
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UniversalLink } from '@plone/volto/components';
|
|
3
|
+
import cx from 'classnames';
|
|
3
4
|
import './styles.less';
|
|
4
5
|
|
|
5
|
-
const LinkWrap = ({ item,
|
|
6
|
+
const LinkWrap = ({ item, children, isActive, className }) => {
|
|
6
7
|
return item ? (
|
|
7
|
-
<UniversalLink
|
|
8
|
-
|
|
8
|
+
<UniversalLink
|
|
9
|
+
item={item}
|
|
10
|
+
className={cx('step-link', className, {
|
|
11
|
+
active: isActive,
|
|
12
|
+
})}
|
|
13
|
+
>
|
|
14
|
+
<g>
|
|
9
15
|
<title>{item.title}</title>
|
|
10
16
|
{children}
|
|
11
17
|
</g>
|
|
@@ -15,8 +21,6 @@ const LinkWrap = ({ item, pathname, children, isActive }) => {
|
|
|
15
21
|
);
|
|
16
22
|
};
|
|
17
23
|
|
|
18
|
-
// export default function RASTView(props) {
|
|
19
|
-
// const RASTView = (props) => {
|
|
20
24
|
export default function RASTMap(props) {
|
|
21
25
|
const { path, pathname, activeMenu, skip_items } = props;
|
|
22
26
|
const currentPath = path || pathname;
|
|
@@ -29,7 +33,7 @@ export default function RASTMap(props) {
|
|
|
29
33
|
|
|
30
34
|
if (activeMenu !== null) {
|
|
31
35
|
if (data.includes(activeMenu.toString())) {
|
|
32
|
-
currentMenu =
|
|
36
|
+
currentMenu = null;
|
|
33
37
|
} else {
|
|
34
38
|
let activeMenuMinus = 0;
|
|
35
39
|
for (let i = 0; i < data.length; i++) {
|
|
@@ -40,7 +44,11 @@ export default function RASTMap(props) {
|
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
return (
|
|
43
|
-
<div
|
|
47
|
+
<div
|
|
48
|
+
className={cx('rast-map-block', {
|
|
49
|
+
landing: currentMenu === null,
|
|
50
|
+
})}
|
|
51
|
+
>
|
|
44
52
|
<svg
|
|
45
53
|
width="290"
|
|
46
54
|
height="280"
|
|
@@ -337,6 +345,7 @@ export default function RASTMap(props) {
|
|
|
337
345
|
item={items[0]}
|
|
338
346
|
pathname={currentPath}
|
|
339
347
|
isActive={currentMenu === 0 ? true : false}
|
|
348
|
+
className="step-0"
|
|
340
349
|
>
|
|
341
350
|
<path
|
|
342
351
|
d="M210.5 32C222.4 32 232 41.6 232 53.5C232 65.4 222.4 75 210.5 75C198.6 75 189 65.4 189 53.5C189 41.6 198.6 32 210.5 32Z"
|
|
@@ -356,6 +365,7 @@ export default function RASTMap(props) {
|
|
|
356
365
|
item={items[1]}
|
|
357
366
|
pathname={currentPath}
|
|
358
367
|
isActive={currentMenu === 1 ? true : false}
|
|
368
|
+
className="step-1"
|
|
359
369
|
>
|
|
360
370
|
<path
|
|
361
371
|
d="M260.5 128C272.4 128 282 137.6 282 149.5C282 161.4 272.4 171 260.5 171C248.6 171 239 161.4 239 149.5C239 137.6 248.6 128 260.5 128Z"
|
|
@@ -375,6 +385,7 @@ export default function RASTMap(props) {
|
|
|
375
385
|
item={items[2]}
|
|
376
386
|
pathname={currentPath}
|
|
377
387
|
isActive={currentMenu === 2 ? true : false}
|
|
388
|
+
className="step-2"
|
|
378
389
|
>
|
|
379
390
|
<path
|
|
380
391
|
d="M210.5 228C222.4 228 232 237.6 232 249.5C232 261.4 222.4 271 210.5 271C198.6 271 189 261.4 189 249.5C189 237.6 198.6 228 210.5 228Z"
|
|
@@ -394,6 +405,7 @@ export default function RASTMap(props) {
|
|
|
394
405
|
item={items[3]}
|
|
395
406
|
pathname={currentPath}
|
|
396
407
|
isActive={currentMenu === 3 ? true : false}
|
|
408
|
+
className="step-3"
|
|
397
409
|
>
|
|
398
410
|
<path
|
|
399
411
|
d="M82.5 228C94.4 228 104 237.6 104 249.5C104 261.4 94.4 271 82.5 271C70.6 271 61 261.4 61 249.5C61 237.6 70.6 228 82.5 228Z"
|
|
@@ -413,6 +425,7 @@ export default function RASTMap(props) {
|
|
|
413
425
|
item={items[4]}
|
|
414
426
|
pathname={currentPath}
|
|
415
427
|
isActive={currentMenu === 4 ? true : false}
|
|
428
|
+
className="step-4"
|
|
416
429
|
>
|
|
417
430
|
<path
|
|
418
431
|
d="M29.5 128C41.4 128 51 137.6 51 149.5C51 161.4 41.4 171 29.5 171C17.6 171 8 161.4 8 149.5C8 137.6 17.6 128 29.5 128Z"
|
|
@@ -432,6 +445,7 @@ export default function RASTMap(props) {
|
|
|
432
445
|
item={items[5]}
|
|
433
446
|
pathname={currentPath}
|
|
434
447
|
isActive={currentMenu === 5 ? true : false}
|
|
448
|
+
className="step-5"
|
|
435
449
|
>
|
|
436
450
|
<path
|
|
437
451
|
d="M82.5 32C94.4 32 104 41.6 104 53.5C104 65.4 94.4 75 82.5 75C70.6 75 61 65.4 61 53.5C61 41.6 70.6 32 82.5 32Z"
|
|
@@ -3,52 +3,104 @@
|
|
|
3
3
|
|
|
4
4
|
@import (multiple, reference, optional) '../../theme.config';
|
|
5
5
|
|
|
6
|
-
.rast-block {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
.rast-map-block {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
margin-bottom: 2em;
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
&:not(.landing) {
|
|
13
|
+
.step-0:not(.active) g path:nth-of-type(1) {
|
|
14
|
+
fill: #0c3330;
|
|
15
|
+
}
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// }
|
|
17
|
+
.step-1:not(.active) g path:nth-of-type(1) {
|
|
18
|
+
fill: #031624;
|
|
19
|
+
}
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 1));
|
|
21
|
+
.step-2:not(.active) g path:nth-of-type(1) {
|
|
22
|
+
fill: #081936;
|
|
23
23
|
}
|
|
24
|
-
}
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 1));
|
|
25
|
+
.step-3:not(.active) g path:nth-of-type(1) {
|
|
26
|
+
fill: #262c4e;
|
|
29
27
|
}
|
|
28
|
+
|
|
29
|
+
.step-4:not(.active) g path:nth-of-type(1) {
|
|
30
|
+
fill: #534022;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.step-5:not(.active) g path:nth-of-type(1) {
|
|
34
|
+
fill: #39531f;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.step-link {
|
|
38
|
+
path:nth-of-type(2),
|
|
39
|
+
path:nth-of-type(3) {
|
|
40
|
+
fill: #929eaf;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.step-link {
|
|
46
|
+
transform-box: fill-box;
|
|
47
|
+
transform-origin: 50% 50%;
|
|
48
|
+
transition: 0.3s all;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.step-0.step-link:hover g path:nth-of-type(1),
|
|
52
|
+
.step-0.step-link.active g path:nth-of-type(1) {
|
|
53
|
+
fill: #155246;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.step-1.step-link:hover g path:nth-of-type(1),
|
|
57
|
+
.step-1.step-link.active g path:nth-of-type(1) {
|
|
58
|
+
fill: #062435;
|
|
30
59
|
}
|
|
31
60
|
|
|
32
|
-
.
|
|
33
|
-
|
|
61
|
+
.step-2.step-link:hover g path:nth-of-type(1),
|
|
62
|
+
.step-2.step-link.active g path:nth-of-type(1) {
|
|
63
|
+
fill: #0d284f;
|
|
34
64
|
}
|
|
35
65
|
|
|
36
|
-
.
|
|
37
|
-
|
|
66
|
+
.step-3.step-link:hover g path:nth-of-type(1),
|
|
67
|
+
.step-3.step-link.active g path:nth-of-type(1) {
|
|
68
|
+
fill: #434772;
|
|
38
69
|
}
|
|
39
70
|
|
|
40
|
-
.
|
|
41
|
-
|
|
71
|
+
.step-4.step-link:hover g path:nth-of-type(1),
|
|
72
|
+
.step-4.step-link.active g path:nth-of-type(1) {
|
|
73
|
+
fill: #926830;
|
|
42
74
|
}
|
|
43
75
|
|
|
44
|
-
.
|
|
45
|
-
|
|
76
|
+
.step-5.step-link:hover g path:nth-of-type(1),
|
|
77
|
+
.step-5.step-link.active g path:nth-of-type(1) {
|
|
78
|
+
fill: #64862c;
|
|
46
79
|
}
|
|
47
80
|
|
|
48
|
-
.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
81
|
+
.step-link:hover,
|
|
82
|
+
.step-link.active {
|
|
83
|
+
transform: scale(1.3, 1.3);
|
|
84
|
+
|
|
85
|
+
path:nth-of-type(2),
|
|
86
|
+
path:nth-of-type(3) {
|
|
87
|
+
fill: #fff;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.step-link .item.active a {
|
|
91
|
+
font-weight: bold;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.ui.accordion .active.content {
|
|
95
|
+
padding: 1rem 1rem !important;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.substep a {
|
|
99
|
+
color: inherit;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.substep:not(:last-child) {
|
|
103
|
+
padding-bottom: 0.8em;
|
|
104
|
+
}
|
|
53
105
|
}
|
|
54
106
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
|
|
4
|
-
import { Grid, Container, Segment, Button, Icon } from 'semantic-ui-react';
|
|
2
|
+
import { Grid, Container, Segment } from 'semantic-ui-react';
|
|
5
3
|
import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
|
|
6
4
|
import {
|
|
7
5
|
SubjectTags,
|
|
@@ -11,15 +9,7 @@ import {
|
|
|
11
9
|
import { filterBlocks } from '@eeacms/volto-cca-policy/utils';
|
|
12
10
|
import { PortalMessage } from '@eeacms/volto-cca-policy/components';
|
|
13
11
|
|
|
14
|
-
const messages = defineMessages({
|
|
15
|
-
downloadEvent: {
|
|
16
|
-
id: 'Download this event in iCal format',
|
|
17
|
-
defaultMessage: 'Download this event in iCal format',
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
|
|
21
12
|
function EventView(props) {
|
|
22
|
-
const intl = useIntl();
|
|
23
13
|
const { content } = props;
|
|
24
14
|
const {
|
|
25
15
|
blocks: filtered_blocks,
|
|
@@ -56,41 +46,6 @@ function EventView(props) {
|
|
|
56
46
|
<Grid.Column mobile={12} tablet={12} computer={4}>
|
|
57
47
|
<Segment>
|
|
58
48
|
<EventDetails {...props} />
|
|
59
|
-
{content?.event_url && (
|
|
60
|
-
<>
|
|
61
|
-
<h4>
|
|
62
|
-
<FormattedMessage id="Web" defaultMessage="Web" />
|
|
63
|
-
</h4>
|
|
64
|
-
<p>
|
|
65
|
-
<a href={content.event_url} target="_blank">
|
|
66
|
-
<FormattedMessage
|
|
67
|
-
id="Visit external website"
|
|
68
|
-
defaultMessage="Visit external website"
|
|
69
|
-
/>
|
|
70
|
-
</a>
|
|
71
|
-
</p>
|
|
72
|
-
</>
|
|
73
|
-
)}
|
|
74
|
-
|
|
75
|
-
<div className="download-event">
|
|
76
|
-
<a
|
|
77
|
-
className="ics-download"
|
|
78
|
-
target="_blank"
|
|
79
|
-
rel="noreferrer"
|
|
80
|
-
href={`${expandToBackendURL(content['@id'])}/ics_view`}
|
|
81
|
-
>
|
|
82
|
-
<Button
|
|
83
|
-
className="icon inverted primary labeled"
|
|
84
|
-
title={intl.formatMessage(messages.downloadEvent)}
|
|
85
|
-
>
|
|
86
|
-
<Icon name="calendar alternate outline" />
|
|
87
|
-
<FormattedMessage
|
|
88
|
-
id="Download Event"
|
|
89
|
-
defaultMessage="Download Event"
|
|
90
|
-
/>
|
|
91
|
-
</Button>
|
|
92
|
-
</a>
|
|
93
|
-
</div>
|
|
94
49
|
</Segment>
|
|
95
50
|
</Grid.Column>
|
|
96
51
|
</Grid.Row>
|
package/src/helpers/Utils.jsx
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
|
+
import { expandToBackendURL } from '@plone/volto/helpers';
|
|
2
3
|
import { Link } from 'react-router-dom';
|
|
3
|
-
import { FormattedMessage } from 'react-intl';
|
|
4
|
-
import { UniversalLink } from '@plone/volto/components';
|
|
5
|
-
import config from '@plone/volto/registry';
|
|
4
|
+
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
|
|
6
5
|
import {
|
|
7
6
|
Segment,
|
|
8
7
|
Image,
|
|
9
8
|
ListItem,
|
|
10
9
|
List,
|
|
11
|
-
Button,
|
|
12
10
|
Icon,
|
|
13
11
|
Label,
|
|
12
|
+
Button,
|
|
14
13
|
} from 'semantic-ui-react';
|
|
14
|
+
import { UniversalLink } from '@plone/volto/components';
|
|
15
|
+
import config from '@plone/volto/registry';
|
|
15
16
|
import {
|
|
16
17
|
CASE_STUDY,
|
|
17
18
|
PUBLICATION_REPORT,
|
|
@@ -22,9 +23,12 @@ import {
|
|
|
22
23
|
} from '@eeacms/volto-cca-policy/helpers/Constants';
|
|
23
24
|
import { When } from '@plone/volto/components/theme/View/EventDatesInfo';
|
|
24
25
|
import { makeContributionsSearchQuery } from '@eeacms/volto-cca-policy/helpers';
|
|
25
|
-
import { useIntl, defineMessages } from 'react-intl';
|
|
26
26
|
|
|
27
27
|
const messages = defineMessages({
|
|
28
|
+
downloadEvent: {
|
|
29
|
+
id: 'Download this event in iCal format',
|
|
30
|
+
defaultMessage: 'Download this event in iCal format',
|
|
31
|
+
},
|
|
28
32
|
documents: {
|
|
29
33
|
id: 'Documents',
|
|
30
34
|
defaultMessage: 'Documents',
|
|
@@ -449,8 +453,29 @@ export const SubjectTags = (props) => {
|
|
|
449
453
|
) : null;
|
|
450
454
|
};
|
|
451
455
|
|
|
456
|
+
export const WebDetails = (props) => {
|
|
457
|
+
const { content } = props;
|
|
458
|
+
const eventUrl = content?.event_url;
|
|
459
|
+
return eventUrl ? (
|
|
460
|
+
<>
|
|
461
|
+
<h4>
|
|
462
|
+
<FormattedMessage id="Web" defaultMessage="Web" />
|
|
463
|
+
</h4>
|
|
464
|
+
<p>
|
|
465
|
+
<a href={eventUrl} target="_blank">
|
|
466
|
+
<FormattedMessage
|
|
467
|
+
id="Visit external website"
|
|
468
|
+
defaultMessage="Visit external website"
|
|
469
|
+
/>
|
|
470
|
+
</a>
|
|
471
|
+
</p>
|
|
472
|
+
</>
|
|
473
|
+
) : null;
|
|
474
|
+
};
|
|
475
|
+
|
|
452
476
|
export const EventDetails = (props) => {
|
|
453
477
|
const { content } = props;
|
|
478
|
+
const intl = useIntl();
|
|
454
479
|
|
|
455
480
|
return (
|
|
456
481
|
<>
|
|
@@ -479,6 +504,28 @@ export const EventDetails = (props) => {
|
|
|
479
504
|
<p>{content.contact_email}</p>
|
|
480
505
|
</>
|
|
481
506
|
)}
|
|
507
|
+
|
|
508
|
+
<WebDetails {...props} />
|
|
509
|
+
|
|
510
|
+
<div className="download-event">
|
|
511
|
+
<a
|
|
512
|
+
className="ics-download"
|
|
513
|
+
target="_blank"
|
|
514
|
+
rel="noreferrer"
|
|
515
|
+
href={`${expandToBackendURL(content['@id'])}/ics_view`}
|
|
516
|
+
>
|
|
517
|
+
<Button
|
|
518
|
+
className="icon inverted primary labeled"
|
|
519
|
+
title={intl.formatMessage(messages.downloadEvent)}
|
|
520
|
+
>
|
|
521
|
+
<Icon name="calendar alternate outline" />
|
|
522
|
+
<FormattedMessage
|
|
523
|
+
id="Download Event"
|
|
524
|
+
defaultMessage="Download Event"
|
|
525
|
+
/>
|
|
526
|
+
</Button>
|
|
527
|
+
</a>
|
|
528
|
+
</div>
|
|
482
529
|
</>
|
|
483
530
|
);
|
|
484
531
|
};
|