@eeacms/volto-clms-theme 1.0.102 → 1.0.105
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 +43 -0
- package/package.json +1 -1
- package/src/components/Blocks/CclHomeProductsBlock/CclHomeProductsBlockView.jsx +11 -4
- package/src/components/Blocks/CclHomeProductsBlock/HomeProductsSchema.js +5 -5
- package/src/components/Blocks/CustomTemplates/VoltoFormBlock/VocabularyWidget.jsx +67 -0
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/CheckboxTreeFacet.jsx +44 -8
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/FilterList.jsx +10 -2
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/RightModalFacets.jsx +11 -3
- package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/SearchInput.jsx +59 -0
- package/src/components/Blocks/customBlocks.js +13 -0
- package/src/components/CLMSDownloadCartView/CLMSCartContent.jsx +23 -5
- package/src/components/CLMSDownloadsView/CLMSDownloadTasks.jsx +1 -1
- package/src/components/CLMSDownloadsView/FileCard.jsx +27 -27
- package/src/components/CLMSLoginView/CLMSLogin.css +17 -0
- package/src/components/CLMSLoginView/CLMSLogin.jsx +64 -0
- package/src/components/CLMSMeetingView/CLMSMeetingView.jsx +149 -1
- package/src/components/CLMSNewsItemView/CLMSNewsItemView.jsx +147 -0
- package/src/components/CLMSWorkOpportunityView/WorkOpportunityView.jsx +57 -0
- package/src/components/CclCard/CclCard.jsx +9 -19
- package/src/components/CclCard/cards.less +10 -1
- package/src/components/CclDownloadTable/CclDownloadTable.jsx +12 -3
- package/src/components/CclLoginModal/CclLoginModal.jsx +3 -2
- package/src/components/CclLoginModal/ccl-login-modal.css +5 -0
- package/src/components/Widgets/DatasetDownloadInformationWidget.jsx +1 -1
- package/src/components/Widgets/taxonomyUtils.js +24 -1
- package/src/customizations/volto/components/manage/Blocks/Search/components/Facets.jsx +100 -0
- package/src/customizations/volto/components/theme/Footer/Footer.jsx +27 -5
- package/src/customizations/volto/components/theme/Login/Login.jsx +325 -0
- package/src/customizations/volto/components/theme/Logout/Logout.jsx +2 -15
- package/src/customizations/volto/components/theme/Unauthorized/Unauthorized.jsx +59 -0
- package/src/customizations/volto/components/theme/Unauthorized/Unauthorized.test.jsx +32 -0
- package/src/index.js +22 -1
- package/theme/clms/css/header.css +1 -0
- package/theme/clms/css/maps.less +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,51 @@ 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.105](https://github.com/eea/volto-clms-theme/compare/1.0.104...1.0.105)
|
|
8
|
+
|
|
9
|
+
- File card [`#274`](https://github.com/eea/volto-clms-theme/pull/274)
|
|
10
|
+
- sort items taxonomy items [`#272`](https://github.com/eea/volto-clms-theme/pull/272)
|
|
11
|
+
- Changes in download cart [`#271`](https://github.com/eea/volto-clms-theme/pull/271)
|
|
12
|
+
- related products and datasets added to news and meeting views and login-plone route created [`5704a1a`](https://github.com/eea/volto-clms-theme/commit/5704a1a766148746162b60efaf232ea90dc20cf4)
|
|
13
|
+
- sort items according to the lowercased label and put those with special meaning at the end [`6410abe`](https://github.com/eea/volto-clms-theme/commit/6410abe096f60dcad54dced2026c9df9b7946d68)
|
|
14
|
+
- lint fix [`1264a7a`](https://github.com/eea/volto-clms-theme/commit/1264a7adfe8d679fea1bd821ad087add20f4271d)
|
|
15
|
+
- footer newsletter subscription change, global search maxLength change from 8000 to 200 and /login design change [`a09d24a`](https://github.com/eea/volto-clms-theme/commit/a09d24adbb6fa053fb2a2cc0071506b906593b42)
|
|
16
|
+
- show Collection on download cart, add dropdown selection to it and remove from Type [`3a13417`](https://github.com/eea/volto-clms-theme/commit/3a13417b92c15187fe0e91ca891ccf9f8b0ed3f1)
|
|
17
|
+
- change form label [`c512a2e`](https://github.com/eea/volto-clms-theme/commit/c512a2e1048c977847cedc8379f58f42adebba18)
|
|
18
|
+
|
|
19
|
+
#### [1.0.104](https://github.com/eea/volto-clms-theme/compare/1.0.103...1.0.104)
|
|
20
|
+
|
|
21
|
+
> 30 June 2022
|
|
22
|
+
|
|
23
|
+
- Develop [`#270`](https://github.com/eea/volto-clms-theme/pull/270)
|
|
24
|
+
- use a combined vocabulary of Products and Datasets [`9f9d0c6`](https://github.com/eea/volto-clms-theme/commit/9f9d0c693a1e870614eb8adc07c58657d9d72a06)
|
|
25
|
+
- allow multiple values [`1edb5dd`](https://github.com/eea/volto-clms-theme/commit/1edb5dd166f31ade19bdcae0b7fa92836dbad420)
|
|
26
|
+
- Products Vocabulary for volto-form-block CLMS-747 [`3f48358`](https://github.com/eea/volto-clms-theme/commit/3f48358dab6a3c20a8367bf4be93c94af6c86350)
|
|
27
|
+
- CLMS-935 and input limitation at 8000 [`9971910`](https://github.com/eea/volto-clms-theme/commit/9971910fbe3c291faed7c0c7d458ae34597e7dc4)
|
|
28
|
+
|
|
29
|
+
#### [1.0.103](https://github.com/eea/volto-clms-theme/compare/1.0.102...1.0.103)
|
|
30
|
+
|
|
31
|
+
> 29 June 2022
|
|
32
|
+
|
|
33
|
+
- Develop [`#269`](https://github.com/eea/volto-clms-theme/pull/269)
|
|
34
|
+
- footer button disabled if email is not valid and privacy check is not clicked [`ab6a061`](https://github.com/eea/volto-clms-theme/commit/ab6a06174dd3cd5fb38bd5ae35cc530a7d3baf4e)
|
|
35
|
+
- download table change and home product block fix [`480d83f`](https://github.com/eea/volto-clms-theme/commit/480d83f1772b3cdfe9b2906edfc7505dac420c8e)
|
|
36
|
+
- rename Sort on selection texts CLMS-745 [`2e2f8c6`](https://github.com/eea/volto-clms-theme/commit/2e2f8c60bce7c09844f4e8f17d79f91de47d134b)
|
|
37
|
+
- remove Searched for text CLMS-746 [`ac36c64`](https://github.com/eea/volto-clms-theme/commit/ac36c6461464e52e214989e56c8b7c3b2df83190)
|
|
38
|
+
- remove Search Facets ordering CLMS-743 [`ee9a138`](https://github.com/eea/volto-clms-theme/commit/ee9a138b55517350e5566d54d0946a8ceefd2f90)
|
|
39
|
+
- remove base filter from currentFilters list CLMS-755 [`38c2b8e`](https://github.com/eea/volto-clms-theme/commit/38c2b8e65fed847470aebaed3f2ad141f17e1fd8)
|
|
40
|
+
- Checkbox tree facet selection CLMS-761 [`46e03b5`](https://github.com/eea/volto-clms-theme/commit/46e03b51e193381bf6d899f4a85334801ec969f6)
|
|
41
|
+
- styling differences fixed [`ec7558d`](https://github.com/eea/volto-clms-theme/commit/ec7558d7b7532226722c64da29ec56a1f5da493f)
|
|
42
|
+
- popup unification CLMS-938 [`2757b51`](https://github.com/eea/volto-clms-theme/commit/2757b519d44dc44a8db341c834578438affea124)
|
|
43
|
+
- ESLint fix [`427d34c`](https://github.com/eea/volto-clms-theme/commit/427d34ca20f5a0b8dca5da13a4eb36fdc17dac0f)
|
|
44
|
+
- unautorized page change and log out redirection [`737b53f`](https://github.com/eea/volto-clms-theme/commit/737b53ff09c8ef595c71c92a270b7c6ddc394e55)
|
|
45
|
+
- doubling DownloadTask card CLMS-939 [`86dd1e7`](https://github.com/eea/volto-clms-theme/commit/86dd1e777f927dd33b0835da7483271ab4d0d71b)
|
|
46
|
+
|
|
7
47
|
#### [1.0.102](https://github.com/eea/volto-clms-theme/compare/1.0.101...1.0.102)
|
|
8
48
|
|
|
49
|
+
> 23 June 2022
|
|
50
|
+
|
|
51
|
+
- Develop [`#268`](https://github.com/eea/volto-clms-theme/pull/268)
|
|
9
52
|
- minor improvements to file listing in Event and News Items [`f67f15b`](https://github.com/eea/volto-clms-theme/commit/f67f15b95a96d6104f016ea26a4d2dcfd9ad9610)
|
|
10
53
|
- polish the downloads list: remove the Finished Not OK tasks, and extract the 'no tasks' message to the component. Extract also the filtering function [`d31b94f`](https://github.com/eea/volto-clms-theme/commit/d31b94f20775d1947545f0618b005db594806e95)
|
|
11
54
|
- improve messages [`f7df892`](https://github.com/eea/volto-clms-theme/commit/f7df892e5f1562e55705f3e1a5960d3013e72b28)
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { isUrl } from '@plone/volto/helpers';
|
|
2
3
|
|
|
3
4
|
const CclHomeProductsBlockView = (props) => {
|
|
4
5
|
const { data } = props;
|
|
@@ -18,12 +19,18 @@ const CclHomeProductsBlockView = (props) => {
|
|
|
18
19
|
}
|
|
19
20
|
tabIndex={0}
|
|
20
21
|
onClick={() => {
|
|
21
|
-
window.location.href =
|
|
22
|
-
product
|
|
22
|
+
window.location.href = isUrl(product?.linkSelector)
|
|
23
|
+
? product.linkSelector
|
|
24
|
+
: isUrl('http://' + product?.linkSelector)
|
|
25
|
+
? 'http://' + product.linkSelector
|
|
26
|
+
: '#';
|
|
23
27
|
}}
|
|
24
28
|
onKeyDown={() => {
|
|
25
|
-
window.location.href =
|
|
26
|
-
product
|
|
29
|
+
window.location.href = isUrl(product?.linkSelector)
|
|
30
|
+
? product.linkSelector
|
|
31
|
+
: isUrl('http://' + product?.linkSelector)
|
|
32
|
+
? 'http://' + product.linkSelector
|
|
33
|
+
: '#';
|
|
27
34
|
}}
|
|
28
35
|
id={product.productIcon === 'iconless' ? '' : product.productIcon}
|
|
29
36
|
>
|
|
@@ -52,12 +52,12 @@ export const ProductSchema = () => ({
|
|
|
52
52
|
],
|
|
53
53
|
},
|
|
54
54
|
linkSelector: {
|
|
55
|
-
title: '
|
|
56
|
-
description: '
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
title: 'Url',
|
|
56
|
+
description: 'Paste external url',
|
|
57
|
+
/* mode: 'link',
|
|
58
|
+
widget: 'url',
|
|
59
59
|
selectedItemAttrs: ['Title', 'Description', '@type', '@id'],
|
|
60
|
-
allowExternals: true,
|
|
60
|
+
allowExternals: true, */
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
63
|
required: [],
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import SelectWidget from '@plone/volto/components/manage/Widgets/SelectWidget';
|
|
3
|
+
import { useIntl, defineMessages } from 'react-intl';
|
|
4
|
+
import { getVocabulary } from '@plone/volto/actions';
|
|
5
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
6
|
+
|
|
7
|
+
const messages = defineMessages({
|
|
8
|
+
select_a_value: {
|
|
9
|
+
id: 'form_select_a_value',
|
|
10
|
+
defaultMessage: 'Select a value',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const VocabularyWidget = ({
|
|
15
|
+
name,
|
|
16
|
+
label,
|
|
17
|
+
description,
|
|
18
|
+
value,
|
|
19
|
+
onChange,
|
|
20
|
+
disabled,
|
|
21
|
+
invalid,
|
|
22
|
+
title,
|
|
23
|
+
required,
|
|
24
|
+
vocabulary,
|
|
25
|
+
isMulti,
|
|
26
|
+
}) => {
|
|
27
|
+
const intl = useIntl();
|
|
28
|
+
const dispatch = useDispatch();
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
dispatch(
|
|
31
|
+
getVocabulary({
|
|
32
|
+
vocabNameOrURL: vocabulary,
|
|
33
|
+
size: -1,
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
36
|
+
}, [dispatch, vocabulary]);
|
|
37
|
+
const vocabItems = useSelector((state) => state.vocabularies[vocabulary]);
|
|
38
|
+
return (
|
|
39
|
+
<SelectWidget
|
|
40
|
+
id={name}
|
|
41
|
+
name={name}
|
|
42
|
+
title={title}
|
|
43
|
+
required={required}
|
|
44
|
+
description={description}
|
|
45
|
+
getVocabulary={() => {}}
|
|
46
|
+
getVocabularyTokenTitle={() => {}}
|
|
47
|
+
choices={
|
|
48
|
+
vocabItems?.loaded && [
|
|
49
|
+
...vocabItems.items.map((item) => {
|
|
50
|
+
return [item.label, item.label];
|
|
51
|
+
}),
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
value={value}
|
|
55
|
+
onChange={onChange}
|
|
56
|
+
placeholder={intl.formatMessage(messages.select_a_value)}
|
|
57
|
+
aria-label={intl.formatMessage(messages.select_a_value)}
|
|
58
|
+
classNamePrefix="react-select"
|
|
59
|
+
isDisabled={disabled}
|
|
60
|
+
invalid={invalid}
|
|
61
|
+
isMulti={isMulti}
|
|
62
|
+
{...(invalid === 'true' ? { className: 'is-invalid' } : {})}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default VocabularyWidget;
|
|
@@ -11,6 +11,31 @@ import {
|
|
|
11
11
|
selectFacetValueToQuery,
|
|
12
12
|
} from '@plone/volto/components/manage/Blocks/Search/components/base';
|
|
13
13
|
|
|
14
|
+
const hasAllChildrensSelected = (value, childrens) => {
|
|
15
|
+
var result = true;
|
|
16
|
+
if (!childrens || childrens.length === 0) {
|
|
17
|
+
result = false;
|
|
18
|
+
}
|
|
19
|
+
childrens.forEach((ch) => {
|
|
20
|
+
if (value.filter((v) => v.value === ch.value).length === 0) {
|
|
21
|
+
result = false;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const checkAllChildren = (value, childrens) => {
|
|
28
|
+
if (!childrens || childrens.length === 0) {
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
childrens.forEach((ch) => {
|
|
32
|
+
if (value.filter((v) => v.value === ch.value).length === 0) {
|
|
33
|
+
value.push(ch);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return value;
|
|
37
|
+
};
|
|
38
|
+
|
|
14
39
|
const CheckboxTreeFacet = (props) => {
|
|
15
40
|
const { facet, choices, onChange, value } = props;
|
|
16
41
|
const facetValue = value;
|
|
@@ -62,20 +87,31 @@ const CheckboxListParent = ({ option, key, onChange, value, id }) => {
|
|
|
62
87
|
onChange={(event, { checked }) => {
|
|
63
88
|
checked
|
|
64
89
|
? onChange(id, [
|
|
90
|
+
// if this option has children, check them all
|
|
91
|
+
...checkAllChildren(value, option.childrens).map(
|
|
92
|
+
(f) => f.value,
|
|
93
|
+
),
|
|
94
|
+
])
|
|
95
|
+
: onChange(id, [
|
|
65
96
|
...value
|
|
66
|
-
.filter((
|
|
97
|
+
.filter((item) => item.value !== option.value)
|
|
98
|
+
.filter(
|
|
99
|
+
(item) =>
|
|
100
|
+
option.childrens?.length > 0 &&
|
|
101
|
+
!option.childrens
|
|
102
|
+
.map((ch) => ch.value)
|
|
103
|
+
.includes(item.value),
|
|
104
|
+
)
|
|
67
105
|
.map((f) => f.value),
|
|
68
|
-
|
|
69
|
-
])
|
|
70
|
-
: onChange(
|
|
71
|
-
id,
|
|
72
|
-
value.filter((item) => item.value !== option.value),
|
|
73
|
-
);
|
|
106
|
+
]);
|
|
74
107
|
}}
|
|
75
108
|
label={
|
|
76
109
|
<label htmlFor={`field-${option.value}`}>{option.label}</label>
|
|
77
110
|
}
|
|
78
|
-
checked={
|
|
111
|
+
checked={
|
|
112
|
+
value.some((item) => item.value === option.value) ||
|
|
113
|
+
hasAllChildrensSelected(value, option.childrens)
|
|
114
|
+
}
|
|
79
115
|
value={option.value}
|
|
80
116
|
/>
|
|
81
117
|
</List.Header>
|
|
@@ -14,11 +14,19 @@ const messages = defineMessages({
|
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
const FilterList = (props) => {
|
|
17
|
-
const { facets, setFacets, isEditMode } = props;
|
|
17
|
+
const { facets, setFacets, isEditMode, data } = props;
|
|
18
18
|
const showFilterList = !Object.values(facets).every((facet) => !facet.length);
|
|
19
19
|
|
|
20
|
+
const baseFacets = data.facets;
|
|
20
21
|
const currentFilters = Object.fromEntries(
|
|
21
|
-
Object.entries(facets)
|
|
22
|
+
Object.entries(facets)
|
|
23
|
+
.filter((v) => v[1] && v[0] !== 'SearchableText')
|
|
24
|
+
.filter(
|
|
25
|
+
(v) =>
|
|
26
|
+
v[1] &&
|
|
27
|
+
baseFacets.length > 0 &&
|
|
28
|
+
!baseFacets.map((bf) => bf.field?.value).includes(v[0]),
|
|
29
|
+
),
|
|
22
30
|
);
|
|
23
31
|
|
|
24
32
|
const totalFilters = [].concat.apply([], Object.values(currentFilters))
|
|
@@ -2,11 +2,10 @@ import { Button, Grid, Segment } from 'semantic-ui-react';
|
|
|
2
2
|
import {
|
|
3
3
|
Facets,
|
|
4
4
|
SearchDetails,
|
|
5
|
-
SearchInput,
|
|
6
5
|
SortOn,
|
|
7
6
|
} from '@plone/volto/components/manage/Blocks/Search/components';
|
|
8
7
|
import { defineMessages, useIntl } from 'react-intl';
|
|
9
|
-
|
|
8
|
+
import SearchInput from './SearchInput';
|
|
10
9
|
import FilterList from './FilterList';
|
|
11
10
|
import CclFiltersModal from '@eeacms/volto-clms-theme/components/CclFiltersModal/CclFiltersModal';
|
|
12
11
|
import { Icon } from '@plone/volto/components';
|
|
@@ -59,6 +58,15 @@ const RightModalFacets = (props) => {
|
|
|
59
58
|
const { showSearchButton } = data;
|
|
60
59
|
const isLive = !showSearchButton;
|
|
61
60
|
const intl = useIntl();
|
|
61
|
+
if (querystring?.sortable_indexes?.effective?.title) {
|
|
62
|
+
querystring.sortable_indexes.effective.title = 'Publication date';
|
|
63
|
+
}
|
|
64
|
+
if (querystring?.sortable_indexes?.sortable_title?.title) {
|
|
65
|
+
querystring.sortable_indexes.sortable_title.title = 'Sort by title';
|
|
66
|
+
}
|
|
67
|
+
if (querystring?.sortable_indexes?.modified?.title) {
|
|
68
|
+
querystring.sortable_indexes.modified.title = 'Last edited';
|
|
69
|
+
}
|
|
62
70
|
return (
|
|
63
71
|
<Grid className="searchBlock-facets right-column-facets" stackable>
|
|
64
72
|
{data?.headline && (
|
|
@@ -104,7 +112,7 @@ const RightModalFacets = (props) => {
|
|
|
104
112
|
</div>
|
|
105
113
|
|
|
106
114
|
<div className="search-results-count-sort search-filters">
|
|
107
|
-
<SearchDetails
|
|
115
|
+
<SearchDetails total={totalItems} />
|
|
108
116
|
<div className="filters-container">
|
|
109
117
|
{data.showSortOn && (
|
|
110
118
|
<SortOn
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { Button, Input } from 'semantic-ui-react';
|
|
3
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
4
|
+
import { Icon } from '@plone/volto/components';
|
|
5
|
+
import loupeSVG from '@plone/volto/icons/zoom.svg';
|
|
6
|
+
|
|
7
|
+
const messages = defineMessages({
|
|
8
|
+
search: {
|
|
9
|
+
id: 'Search',
|
|
10
|
+
defaultMessage: 'Search',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const SearchInput = (props) => {
|
|
15
|
+
const {
|
|
16
|
+
data,
|
|
17
|
+
searchText,
|
|
18
|
+
setSearchText,
|
|
19
|
+
isLive,
|
|
20
|
+
onTriggerSearch,
|
|
21
|
+
...rest
|
|
22
|
+
} = props;
|
|
23
|
+
const intl = useIntl();
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
onTriggerSearch(rest.searchedText);
|
|
27
|
+
setSearchText(rest.searchedText);
|
|
28
|
+
}, [rest.searchedText, onTriggerSearch, setSearchText]);
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div className="search-input">
|
|
32
|
+
<Input
|
|
33
|
+
maxLength="200"
|
|
34
|
+
id={`${props.id}-searchtext`}
|
|
35
|
+
value={searchText}
|
|
36
|
+
placeholder={
|
|
37
|
+
data.searchInputPrompt || intl.formatMessage(messages.search)
|
|
38
|
+
}
|
|
39
|
+
fluid
|
|
40
|
+
onKeyPress={(event) => {
|
|
41
|
+
if (isLive || event.key === 'Enter') onTriggerSearch(searchText);
|
|
42
|
+
}}
|
|
43
|
+
onChange={(event, { value }) => {
|
|
44
|
+
setSearchText(value);
|
|
45
|
+
if (isLive) {
|
|
46
|
+
onTriggerSearch(searchText);
|
|
47
|
+
}
|
|
48
|
+
}}
|
|
49
|
+
/>
|
|
50
|
+
{isLive && (
|
|
51
|
+
<Button basic icon className="search-input-live-icon-button">
|
|
52
|
+
<Icon name={loupeSVG} />
|
|
53
|
+
</Button>
|
|
54
|
+
)}
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default SearchInput;
|
|
@@ -59,6 +59,7 @@ import SubscriptionBlockView from '@eeacms/volto-clms-theme/components/Blocks/Cc
|
|
|
59
59
|
import SubscriptionBlockEdit from '@eeacms/volto-clms-theme/components/Blocks/CclSubscriptionBlock/SubscriptionEdit';
|
|
60
60
|
import containerSVG from '@plone/volto/icons/apps.svg';
|
|
61
61
|
import customIdFieldSchema from '@eeacms/volto-clms-theme/components/Blocks/CustomTemplates/VoltoFormBlock/customIdFieldSchema';
|
|
62
|
+
import VocabularyWidget from '@eeacms/volto-clms-theme/components/Blocks/CustomTemplates/VoltoFormBlock/VocabularyWidget';
|
|
62
63
|
import downSVG from '@plone/volto/icons/down-key.svg';
|
|
63
64
|
import homeBand from '@plone/volto/icons/image-wide.svg';
|
|
64
65
|
import linkSVG from '@plone/volto/icons/link.svg';
|
|
@@ -462,6 +463,18 @@ const customBlocks = (config) => ({
|
|
|
462
463
|
form: {
|
|
463
464
|
...config.blocks.blocksConfig.form,
|
|
464
465
|
fieldSchema: customIdFieldSchema,
|
|
466
|
+
additionalFields: [
|
|
467
|
+
{
|
|
468
|
+
id: 'product_vocabulary',
|
|
469
|
+
label: 'Products Vocabulary',
|
|
470
|
+
component: (props) =>
|
|
471
|
+
VocabularyWidget({
|
|
472
|
+
...props,
|
|
473
|
+
vocabulary: 'clms.types.ProductsAndDatasetsVocabulary',
|
|
474
|
+
isMulti: true,
|
|
475
|
+
}),
|
|
476
|
+
},
|
|
477
|
+
],
|
|
465
478
|
},
|
|
466
479
|
});
|
|
467
480
|
|
|
@@ -214,6 +214,24 @@ const CLMSCartContent = (props) => {
|
|
|
214
214
|
};
|
|
215
215
|
|
|
216
216
|
const TypeNaming = (typeProps) => {
|
|
217
|
+
const { item } = typeProps;
|
|
218
|
+
if (item.file_id) {
|
|
219
|
+
return (
|
|
220
|
+
<span className={'tag tag-' + item?.type?.toLowerCase()}>
|
|
221
|
+
{contentOrDash(item.type)}
|
|
222
|
+
</span>
|
|
223
|
+
);
|
|
224
|
+
} else if (!item.type) {
|
|
225
|
+
return '-';
|
|
226
|
+
} else {
|
|
227
|
+
let values = item.type_options.filter((myitem) => {
|
|
228
|
+
return myitem['id'] === item.type;
|
|
229
|
+
});
|
|
230
|
+
return values.length > 0 ? values[0].name : '.';
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
const CollectionNaming = (typeProps) => {
|
|
217
235
|
const { item } = typeProps;
|
|
218
236
|
if (item.file_id) {
|
|
219
237
|
return (
|
|
@@ -237,11 +255,7 @@ const CLMSCartContent = (props) => {
|
|
|
237
255
|
return {
|
|
238
256
|
key: option.id,
|
|
239
257
|
value: option.id,
|
|
240
|
-
text:
|
|
241
|
-
option.name +
|
|
242
|
-
((option.collection !== undefined &&
|
|
243
|
-
' (' + option.collection + ')') ||
|
|
244
|
-
''),
|
|
258
|
+
text: (option.collection === undefined && '-') || option.collection,
|
|
245
259
|
};
|
|
246
260
|
})}
|
|
247
261
|
onChange={(e, data) => {
|
|
@@ -290,6 +304,7 @@ const CLMSCartContent = (props) => {
|
|
|
290
304
|
<th>Source</th>
|
|
291
305
|
<th>Area</th>
|
|
292
306
|
<th>Type</th>
|
|
307
|
+
<th>Collection</th>
|
|
293
308
|
<th>Format</th>
|
|
294
309
|
<th>Projection</th>
|
|
295
310
|
<th></th>
|
|
@@ -346,6 +361,9 @@ const CLMSCartContent = (props) => {
|
|
|
346
361
|
<td>
|
|
347
362
|
<TypeNaming item={item} />
|
|
348
363
|
</td>
|
|
364
|
+
<td>
|
|
365
|
+
<CollectionNaming item={item} />
|
|
366
|
+
</td>
|
|
349
367
|
<td className="table-td-format">
|
|
350
368
|
{!item.file_id ? (
|
|
351
369
|
<Select
|
|
@@ -227,33 +227,33 @@ const FileCard = (props) => {
|
|
|
227
227
|
className="red-loader"
|
|
228
228
|
/>
|
|
229
229
|
) : (
|
|
230
|
-
<
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
230
|
+
<span
|
|
231
|
+
className="info-icon"
|
|
232
|
+
tooltip="Remove task"
|
|
233
|
+
direction="up"
|
|
234
|
+
>
|
|
235
|
+
<button
|
|
236
|
+
onClick={() => {
|
|
237
|
+
deleteTaskInProgress(item?.TaskID);
|
|
238
|
+
}}
|
|
239
|
+
style={{
|
|
240
|
+
backgroundColor: 'transparent',
|
|
241
|
+
color: 'inherit',
|
|
242
|
+
border: 'none',
|
|
243
|
+
padding: 0,
|
|
244
|
+
font: 'inherit',
|
|
245
|
+
cursor: 'pointer',
|
|
246
|
+
outline: 'inherit',
|
|
247
|
+
}}
|
|
248
|
+
>
|
|
249
|
+
<Icon
|
|
250
|
+
name={removeSVG}
|
|
251
|
+
size={30}
|
|
252
|
+
color="#e40166"
|
|
253
|
+
title={'Remove task'}
|
|
254
|
+
/>
|
|
255
|
+
</button>
|
|
256
|
+
</span>
|
|
257
257
|
)}
|
|
258
258
|
</Grid.Column>
|
|
259
259
|
)}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { useSelector } from 'react-redux';
|
|
3
|
+
import config from '@plone/volto/registry';
|
|
4
|
+
import { toPublicURL } from '@plone/volto/helpers/Url/Url';
|
|
5
|
+
import './CLMSLogin.css';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Login Modal component doc.
|
|
9
|
+
* @function CclLoginModal
|
|
10
|
+
* @example <CclLoginModal />
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
function CLMSLoginView(props) {
|
|
14
|
+
const registryRecords = useSelector((state) => state.registry.records);
|
|
15
|
+
const [loginUrl, setLoginUrl] = React.useState('');
|
|
16
|
+
const registry_key = config.settings?.registry?.login_url || null;
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (registryRecords && registry_key in registryRecords) {
|
|
20
|
+
setLoginUrl(
|
|
21
|
+
registryRecords[registry_key] + '?came_from=' + window.location.href,
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
}, [registryRecords, registry_key]);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<>
|
|
28
|
+
<div className="ccl-container login">
|
|
29
|
+
<h1 className="page-title">Registration / Login</h1>
|
|
30
|
+
<div className="modal-login-text">
|
|
31
|
+
<p>
|
|
32
|
+
This site uses EU Login to handle user registration and login. You
|
|
33
|
+
can read more about this service in the{' '}
|
|
34
|
+
<a href="https://ecas.ec.europa.eu/cas/about.html">
|
|
35
|
+
EU Login site help
|
|
36
|
+
</a>
|
|
37
|
+
.
|
|
38
|
+
</p>
|
|
39
|
+
<p>
|
|
40
|
+
{' '}
|
|
41
|
+
When you clik on the following link, you will be sent to EU Login
|
|
42
|
+
and after a successful login there you will be redirected back to
|
|
43
|
+
this site.
|
|
44
|
+
</p>
|
|
45
|
+
<p>
|
|
46
|
+
If you have any issues or questions, please contact us using the
|
|
47
|
+
<a href="/en/contact-service-helpdesk"> helpdesk</a>.
|
|
48
|
+
</p>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div className="login-button">
|
|
52
|
+
<div className="modal-buttons">
|
|
53
|
+
<a
|
|
54
|
+
href={toPublicURL(loginUrl) || '#'}
|
|
55
|
+
className="ccl-button ccl-button-green"
|
|
56
|
+
>
|
|
57
|
+
Login using EU Login
|
|
58
|
+
</a>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
export default CLMSLoginView;
|