@eeacms/volto-clms-theme 1.0.24 → 1.0.25
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/Blocks/CclButtonBlock/CclButtonBlockView.jsx +2 -2
- package/src/components/Blocks/CclCardContainerBlock/CclCardContainerBlockView.jsx +1 -1
- package/src/components/Blocks/CclHomeBgImageBlock/CclWhiteBgView.jsx +1 -1
- package/src/components/Blocks/CclHomeProductsBlock/CclHomeProductsBlockEdit.jsx +4 -1
- package/src/components/Blocks/CclHomeProductsBlock/CclHomeProductsBlockView.jsx +7 -2
- package/src/components/Blocks/CclHomeProductsBlock/HomeProductsSchema.js +5 -1
- package/src/components/Blocks/CclHomeUsersBlock/CclHomeUsersBlockView.jsx +1 -1
- package/src/components/Blocks/CclProductLeftMenu/CclProductLeftMenuEdit.jsx +5 -2
- package/src/components/Blocks/CclProductLeftMenu/CclProductLeftMenuView.jsx +4 -4
- package/src/components/Blocks/CclTechnicalLibrariesList/CclTechnicalLibrariesListView.jsx +7 -3
- package/src/components/Blocks/CustomTemplates/VoltoTabsBlock/CclTabsView.jsx +2 -1
- package/src/components/CLMSEventView/CLMSEventView.jsx +14 -8
- package/src/components/CLMSMeetingView/CLMSMeetingSubscribersView.jsx +3 -3
- package/src/components/CLMSNewsItemView/CLMSNewsItemView.jsx +14 -8
- package/src/components/CclCard/CclCard.jsx +2 -2
- package/src/components/CclDownloadTable/CclDownloadTable.jsx +1 -1
- package/src/customizations/volto/components/theme/Breadcrumbs/Breadcrumbs.jsx +1 -1
- package/src/customizations/volto/components/theme/Footer/Footer.jsx +3 -1
- package/src/customizations/volto/components/theme/Header/Header.jsx +2 -2
- package/src/customizations/volto/components/theme/Logo/Logo.jsx +1 -1
- package/src/customizations/volto/components/theme/Navigation/ContextNavigation.jsx +2 -2
- package/src/customizations/volto/components/theme/Navigation/Navigation.jsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,20 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [1.0.25](https://github.com/eea/volto-clms-theme/compare/1.0.24...1.0.25)
|
|
8
|
+
|
|
9
|
+
- Fixing feedback problems [`#80`](https://github.com/eea/volto-clms-theme/pull/80)
|
|
10
|
+
- empty libraries message [`134ee68`](https://github.com/eea/volto-clms-theme/commit/134ee687a1de7d31d4a62795324a9738e874e605)
|
|
11
|
+
- class to className [`e3bccef`](https://github.com/eea/volto-clms-theme/commit/e3bccefc307424e6508dd4280bb001b45313e8d4)
|
|
12
|
+
- some fixes [`02eddc4`](https://github.com/eea/volto-clms-theme/commit/02eddc4b359359d07e62a5317aaffa61a7a65555)
|
|
13
|
+
- carrousel and some paginations left [`cd0c86e`](https://github.com/eea/volto-clms-theme/commit/cd0c86e1b40c63fd258d5a54415b41c4dd4c4d40)
|
|
14
|
+
- some frontend fixes after eugenija feedback [`7ca4d30`](https://github.com/eea/volto-clms-theme/commit/7ca4d30a7c203a5aaf52b35f3a624d47327a08aa)
|
|
15
|
+
|
|
7
16
|
#### [1.0.24](https://github.com/eea/volto-clms-theme/compare/1.0.23...1.0.24)
|
|
8
17
|
|
|
18
|
+
> 16 September 2021
|
|
19
|
+
|
|
20
|
+
- Upgrade volto-tabs-block version and CclCard fix [`#79`](https://github.com/eea/volto-clms-theme/pull/79)
|
|
9
21
|
- volto-tabs-block upgrade version 1.2.7 [`4f4fd93`](https://github.com/eea/volto-clms-theme/commit/4f4fd931065bd86b368cc174620f8fcf7095a49c)
|
|
10
22
|
- card file field condition to avoid conflicts with old versions [`957bc0a`](https://github.com/eea/volto-clms-theme/commit/957bc0ae531730fea854c31854004b17b883c9f9)
|
|
11
23
|
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ const CclButtonBlockView = (props) => {
|
|
|
7
7
|
return (
|
|
8
8
|
<CclButton
|
|
9
9
|
url={
|
|
10
|
-
data
|
|
10
|
+
data?.download && data?.href?.[0]?.['@type'] === 'File'
|
|
11
11
|
? data?.href?.[0]?.['@id'] + '/@@download/file'
|
|
12
12
|
: data?.href?.[0]?.['@id']
|
|
13
13
|
}
|
|
@@ -15,7 +15,7 @@ const CclButtonBlockView = (props) => {
|
|
|
15
15
|
download={data?.download || data?.href?.[0]?.['@type'] === 'File'}
|
|
16
16
|
target={
|
|
17
17
|
data.target ||
|
|
18
|
-
(data
|
|
18
|
+
(data?.download && data.href[0]['@type'] === 'File' && '_blank')
|
|
19
19
|
}
|
|
20
20
|
mode={data.style}
|
|
21
21
|
>
|
|
@@ -17,7 +17,7 @@ const CclCardContainerBlockView = (props) => {
|
|
|
17
17
|
} else if (data.cardOrigin === 'selection') {
|
|
18
18
|
path = data.containerSelection ? data.containerSelection[0]['@id'] : '';
|
|
19
19
|
} else if ((data.cardOrigin = 'custom')) {
|
|
20
|
-
cards = data
|
|
20
|
+
cards = data?.customCards?.blocks_layout?.items.map(
|
|
21
21
|
(uid) => data.customCards.blocks[uid],
|
|
22
22
|
);
|
|
23
23
|
}
|
|
@@ -70,7 +70,10 @@ const CclHomeProductsBlockEdit = (props) => {
|
|
|
70
70
|
{panel.productIcon === 'iconless' ? (
|
|
71
71
|
<h3>{panel.title}</h3>
|
|
72
72
|
) : (
|
|
73
|
-
|
|
73
|
+
<>
|
|
74
|
+
<div className="home-product-title">{panel.title}</div>
|
|
75
|
+
<div class="home-product-description">{panel.description}</div>
|
|
76
|
+
</>
|
|
74
77
|
)}
|
|
75
78
|
</div>
|
|
76
79
|
))}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
const CclHomeProductsBlockView = (props) => {
|
|
4
4
|
const { data } = props;
|
|
5
|
-
let products = data
|
|
5
|
+
let products = data?.products?.blocks_layout?.items.map(
|
|
6
6
|
(uid) => data.products.blocks[uid],
|
|
7
7
|
);
|
|
8
8
|
return (
|
|
@@ -20,7 +20,12 @@ const CclHomeProductsBlockView = (props) => {
|
|
|
20
20
|
{product.productIcon === 'iconless' ? (
|
|
21
21
|
<h3>{product.title}</h3>
|
|
22
22
|
) : (
|
|
23
|
-
|
|
23
|
+
<>
|
|
24
|
+
<div className="home-product-title">{product.title}</div>
|
|
25
|
+
<div className="home-product-description">
|
|
26
|
+
{product.description}
|
|
27
|
+
</div>
|
|
28
|
+
</>
|
|
24
29
|
)}
|
|
25
30
|
</div>
|
|
26
31
|
))}
|
|
@@ -28,7 +28,7 @@ export const ProductSchema = () => ({
|
|
|
28
28
|
{
|
|
29
29
|
id: 'default',
|
|
30
30
|
title: 'Default',
|
|
31
|
-
fields: ['title', 'productIcon', 'linkSelector'],
|
|
31
|
+
fields: ['title', 'description', 'productIcon', 'linkSelector'],
|
|
32
32
|
},
|
|
33
33
|
],
|
|
34
34
|
properties: {
|
|
@@ -36,6 +36,10 @@ export const ProductSchema = () => ({
|
|
|
36
36
|
title: 'Title',
|
|
37
37
|
type: 'string',
|
|
38
38
|
},
|
|
39
|
+
description: {
|
|
40
|
+
title: 'Description',
|
|
41
|
+
type: 'string',
|
|
42
|
+
},
|
|
39
43
|
productIcon: {
|
|
40
44
|
title: 'Product icon',
|
|
41
45
|
choices: [
|
|
@@ -46,7 +46,10 @@ const CclProductLeftMenuEdit = (props) => {
|
|
|
46
46
|
<>
|
|
47
47
|
<nav className="left-menu-detail">
|
|
48
48
|
<div className="menu-detail-image">
|
|
49
|
-
<img
|
|
49
|
+
<img
|
|
50
|
+
src={metadata?.image?.download}
|
|
51
|
+
alt={metadata?.image?.filename}
|
|
52
|
+
/>
|
|
50
53
|
</div>
|
|
51
54
|
{panels.map(([uid, panel], index) => (
|
|
52
55
|
<div
|
|
@@ -68,7 +71,7 @@ const CclProductLeftMenuEdit = (props) => {
|
|
|
68
71
|
<CclButton
|
|
69
72
|
url="#"
|
|
70
73
|
disabled={data.buttons?.blocks[uid].disabled}
|
|
71
|
-
download={data.buttons?.blocks[uid]
|
|
74
|
+
download={data.buttons?.blocks[uid]?.download}
|
|
72
75
|
mode={data.buttons?.blocks[uid].style}
|
|
73
76
|
>
|
|
74
77
|
{data.buttons?.blocks[uid].title || 'Text example...'}
|
|
@@ -4,20 +4,20 @@ import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
|
|
|
4
4
|
|
|
5
5
|
const CclProductLeftMenuView = (props) => {
|
|
6
6
|
const { data, metadata } = props;
|
|
7
|
-
let buttons = data
|
|
7
|
+
let buttons = data?.buttons?.blocks_layout?.items.map(
|
|
8
8
|
(uid) => data.buttons.blocks[uid],
|
|
9
9
|
);
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<nav className="left-menu-detail">
|
|
13
13
|
<div className="menu-detail-image">
|
|
14
|
-
<img src={metadata
|
|
14
|
+
<img src={metadata?.image?.download} alt={metadata?.image?.filename} />
|
|
15
15
|
</div>
|
|
16
16
|
{buttons.map((button, index) => (
|
|
17
17
|
<div key={index} className={'menu-detail-button'}>
|
|
18
18
|
<CclButton
|
|
19
19
|
url={
|
|
20
|
-
button
|
|
20
|
+
button?.download && button?.href?.[0]?.['@type'] === 'File'
|
|
21
21
|
? button?.href?.[0]?.['@id'] + '/@@download/file'
|
|
22
22
|
: button?.href?.[0]?.['@id']
|
|
23
23
|
}
|
|
@@ -27,7 +27,7 @@ const CclProductLeftMenuView = (props) => {
|
|
|
27
27
|
}
|
|
28
28
|
target={
|
|
29
29
|
button.target ||
|
|
30
|
-
(button
|
|
30
|
+
(button?.download &&
|
|
31
31
|
button.href[0]['@type'] === 'File' &&
|
|
32
32
|
'_blank')
|
|
33
33
|
}
|
|
@@ -28,9 +28,13 @@ const CclTechnicalLibrariesListView = (props) => {
|
|
|
28
28
|
return (
|
|
29
29
|
<>
|
|
30
30
|
<div className="technical-libraries">
|
|
31
|
-
{libraries.
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
{libraries.length > 0 ? (
|
|
32
|
+
libraries.map((item, index) => (
|
|
33
|
+
<CclCard key={index} type="doc" card={item} />
|
|
34
|
+
))
|
|
35
|
+
) : (
|
|
36
|
+
<p>There are no technical libraries for this product.</p>
|
|
37
|
+
)}
|
|
34
38
|
</div>
|
|
35
39
|
</>
|
|
36
40
|
);
|
|
@@ -99,7 +99,8 @@ const CclTabsView = (props) => {
|
|
|
99
99
|
aria-controls={title || defaultTitle}
|
|
100
100
|
aria-selected={tab === activeTab}
|
|
101
101
|
active={(tab === activeTab).toString()}
|
|
102
|
-
|
|
102
|
+
/* classname hontan estiloa aldatu behar da aukeratutako tab-a urdin ikusteko */
|
|
103
|
+
className={cx('tab', tab !== activeTab && 'tab-selected')}
|
|
103
104
|
onClick={() => {
|
|
104
105
|
if (activeTab !== tab) {
|
|
105
106
|
setActiveTab(tab);
|
|
@@ -7,14 +7,20 @@ export const CLMSEventView = (props) => {
|
|
|
7
7
|
<div className="ccl-container">
|
|
8
8
|
<h1 className="page-title">{content.title}</h1>
|
|
9
9
|
<div className="event-detail">
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
<div class="event-detail-date">
|
|
11
|
+
{new Date(content?.effective).toLocaleDateString()}
|
|
12
|
+
</div>
|
|
13
|
+
<figure class="news-detail-image">
|
|
14
|
+
<img
|
|
15
|
+
src={
|
|
16
|
+
content?.image
|
|
17
|
+
? content?.image?.download
|
|
18
|
+
: 'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
|
|
19
|
+
}
|
|
20
|
+
alt={content?.image ? content?.image?.filename : 'Placeholder'}
|
|
21
|
+
/>
|
|
22
|
+
{/* <figcaption>Lorem ipsum dolor sit amet</figcaption> */}
|
|
23
|
+
</figure>
|
|
18
24
|
<div className="event-detail-content">
|
|
19
25
|
<StringToHTML string={content.text?.data || ''} />
|
|
20
26
|
</div>
|
|
@@ -46,7 +46,7 @@ export const CLMSMeetingSubscribersView = (props) => {
|
|
|
46
46
|
|
|
47
47
|
const selectAllSubscribers = (checked) => {
|
|
48
48
|
if (checked) {
|
|
49
|
-
setSubscriberSelection(subscribers
|
|
49
|
+
setSubscriberSelection(subscribers?.items.map((item, key) => item.id));
|
|
50
50
|
} else {
|
|
51
51
|
setSubscriberSelection([]);
|
|
52
52
|
}
|
|
@@ -82,7 +82,7 @@ export const CLMSMeetingSubscribersView = (props) => {
|
|
|
82
82
|
onChange={(e, data) =>
|
|
83
83
|
selectAllSubscribers(data.checked)
|
|
84
84
|
}
|
|
85
|
-
checked={subscribers
|
|
85
|
+
checked={subscribers?.items
|
|
86
86
|
.map((item, key) => item.id)
|
|
87
87
|
.every(function (val) {
|
|
88
88
|
return subscriberSelection.indexOf(val) !== -1;
|
|
@@ -96,7 +96,7 @@ export const CLMSMeetingSubscribersView = (props) => {
|
|
|
96
96
|
</tr>
|
|
97
97
|
</thead>
|
|
98
98
|
<tbody>
|
|
99
|
-
{subscribers
|
|
99
|
+
{subscribers?.items?.map((subscriber, index) => (
|
|
100
100
|
<tr key={index}>
|
|
101
101
|
<td>
|
|
102
102
|
<Checkbox
|
|
@@ -7,14 +7,20 @@ const CLMSNewsItemView = (props) => {
|
|
|
7
7
|
<div className="ccl-container">
|
|
8
8
|
<h1 className="page-title">{content.title}</h1>
|
|
9
9
|
<div className="news-detail">
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
<div class="news-detail-date">
|
|
11
|
+
{new Date(content?.effective).toLocaleDateString()}
|
|
12
|
+
</div>
|
|
13
|
+
<figure class="news-detail-image">
|
|
14
|
+
<img
|
|
15
|
+
src={
|
|
16
|
+
content?.image
|
|
17
|
+
? content?.image?.download
|
|
18
|
+
: 'https://eu-copernicus.github.io/copernicus-component-library/assets/images/image_placeholder.jpg'
|
|
19
|
+
}
|
|
20
|
+
alt={content?.image ? content?.image?.filename : 'Placeholder'}
|
|
21
|
+
/>
|
|
22
|
+
{/* <figcaption>Lorem ipsum dolor sit amet</figcaption> */}
|
|
23
|
+
</figure>
|
|
18
24
|
<div className="news-detail-content">
|
|
19
25
|
<StringToHTML string={content.text?.data || ''} />
|
|
20
26
|
</div>
|
|
@@ -66,7 +66,7 @@ function CclCard(props) {
|
|
|
66
66
|
<div className="card-event-image">
|
|
67
67
|
{card?.image?.scales ? (
|
|
68
68
|
<img
|
|
69
|
-
src={card
|
|
69
|
+
src={card?.image?.scales?.preview?.download}
|
|
70
70
|
alt={card.image.alt}
|
|
71
71
|
/>
|
|
72
72
|
) : (
|
|
@@ -107,7 +107,7 @@ function CclCard(props) {
|
|
|
107
107
|
<div className="card-image">
|
|
108
108
|
{card?.image?.scales ? (
|
|
109
109
|
<img
|
|
110
|
-
src={card
|
|
110
|
+
src={card?.image?.scales?.preview?.download}
|
|
111
111
|
alt={card.image.alt}
|
|
112
112
|
/>
|
|
113
113
|
) : (
|
|
@@ -9,7 +9,7 @@ function CclDownloadTable(props) {
|
|
|
9
9
|
const { addCartItem, Toast, isLoggedIn, removeAllCart } = useCartState();
|
|
10
10
|
const [cartSelection, setCartSelection] = useState([]);
|
|
11
11
|
// complete the selected file with dataset UID, title and a concat of dataset.UID and block id to get unique id for the whole web
|
|
12
|
-
const prePackagedCollection = dataset
|
|
12
|
+
const prePackagedCollection = dataset?.downloadable_files?.items.map(
|
|
13
13
|
(element) => {
|
|
14
14
|
return {
|
|
15
15
|
...element,
|
|
@@ -100,7 +100,7 @@ class Breadcrumbs extends Component {
|
|
|
100
100
|
{this.props.intl.formatMessage(messages.home)}
|
|
101
101
|
</Link>
|
|
102
102
|
</li>
|
|
103
|
-
{this
|
|
103
|
+
{this?.props?.items?.map((item, index, items) => [
|
|
104
104
|
index < items.length - 1 ? (
|
|
105
105
|
<li key={index} className="ccl-breadcrumb__segment">
|
|
106
106
|
<Link
|
|
@@ -217,7 +217,9 @@ const Footer = () => {
|
|
|
217
217
|
</div>
|
|
218
218
|
</CclFooterColumn>
|
|
219
219
|
<div className="ccl-footer-col">
|
|
220
|
-
<div className="ccl-footer-form-title">
|
|
220
|
+
<div className="ccl-footer-form-title">
|
|
221
|
+
Sign up to our newsletter
|
|
222
|
+
</div>
|
|
221
223
|
<form action="" className="ccl-footer-form">
|
|
222
224
|
<div className="ccl-footer-newsletter">
|
|
223
225
|
<input placeholder="Enter an email adress" type="text" />
|
|
@@ -189,7 +189,7 @@ class Header extends Component {
|
|
|
189
189
|
>
|
|
190
190
|
<FormattedMessage
|
|
191
191
|
id="loginRegister"
|
|
192
|
-
defaultMessage="Login
|
|
192
|
+
defaultMessage="Register/Login"
|
|
193
193
|
/>
|
|
194
194
|
</a>
|
|
195
195
|
)}
|
|
@@ -272,7 +272,7 @@ class Header extends Component {
|
|
|
272
272
|
>
|
|
273
273
|
<FormattedMessage
|
|
274
274
|
id="loginRegister"
|
|
275
|
-
defaultMessage="Login
|
|
275
|
+
defaultMessage="Register/Login"
|
|
276
276
|
/>
|
|
277
277
|
</a>
|
|
278
278
|
</li>
|
|
@@ -46,7 +46,7 @@ const Logo = () => {
|
|
|
46
46
|
<div className="ccl-header-logos-container">
|
|
47
47
|
<div className="ccl-header-logo-container">
|
|
48
48
|
<Link
|
|
49
|
-
to={
|
|
49
|
+
to={'https://www.copernicus.eu/en'}
|
|
50
50
|
title={intl.formatMessage(messages.copernicussite)}
|
|
51
51
|
className="ccl-header-logo ccl-service-button"
|
|
52
52
|
>
|
|
@@ -22,8 +22,8 @@ function renderNode(node, level) {
|
|
|
22
22
|
{node.thumb ? <Image src={flattenToAppURL(node.thumb)} /> : ''}
|
|
23
23
|
{node.title}
|
|
24
24
|
</RouterLink>
|
|
25
|
-
{(node
|
|
26
|
-
<List.List>{node
|
|
25
|
+
{(node?.items?.length && (
|
|
26
|
+
<List.List>{node?.items?.map(renderNode)}</List.List>
|
|
27
27
|
)) ||
|
|
28
28
|
''}
|
|
29
29
|
</div>
|
|
@@ -110,7 +110,7 @@ class Navigation extends Component {
|
|
|
110
110
|
|
|
111
111
|
return (
|
|
112
112
|
<ul className="ccl-header-main-menu">
|
|
113
|
-
{this
|
|
113
|
+
{this?.props?.items?.map((item) => (
|
|
114
114
|
<li key={item.url}>
|
|
115
115
|
<NavLink
|
|
116
116
|
to={item.url === '' ? '/' : item.url}
|