@eeacms/volto-clms-theme 1.0.108 → 1.0.111

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.
Files changed (25) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/package.json +5 -3
  3. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/CheckboxTreeParentFacet.jsx +168 -0
  4. package/src/components/Blocks/CustomTemplates/VoltoSearchBlock/index.js +2 -0
  5. package/src/components/Blocks/customBlocks.js +11 -0
  6. package/src/components/CLMSDatasetDetailView/CLMSDatasetDetailView.jsx +4 -0
  7. package/src/components/CLMSDatasetDetailView/DataSetInfoContent.jsx +5 -2
  8. package/src/components/CLMSDatasetDetailView/RelatedNews.jsx +51 -0
  9. package/src/components/CLMSDatasetDetailView/RelatedUseCases.jsx +51 -0
  10. package/src/components/CLMSDatasetDetailView/index.js +2 -0
  11. package/src/components/CLMSDownloadableFileView/CLMSDownloadableFileView.jsx +23 -29
  12. package/src/components/CLMSMeetingView/CLMSMeetingView.jsx +51 -47
  13. package/src/components/CLMSMeetingView/CclLightGallery.jsx +2 -4
  14. package/src/components/CLMSProfileView/CLMSProfileView.jsx +3 -0
  15. package/src/components/CLMSUseCasesView/CLMSUseCasesView.jsx +177 -0
  16. package/src/components/CclModal/modal.less +5 -0
  17. package/src/components/Widgets/ImageSizeWidget.jsx +93 -0
  18. package/src/components/Widgets/ImageSizeWidget.test.jsx +30 -0
  19. package/src/components/Widgets/taxonomyUtils.js +22 -21
  20. package/src/customizations/volto/components/manage/Widgets/EmailWidget.jsx +19 -18
  21. package/src/customizations/volto/components/manage/Widgets/TextWidget.jsx +133 -0
  22. package/src/customizations/volto/components/manage/Widgets/TextareaWidget.jsx +98 -0
  23. package/src/customizations/volto/components/theme/Footer/Footer.jsx +1 -3
  24. package/src/index.js +5 -0
  25. package/theme/clms/css/styles.less +18 -0
package/CHANGELOG.md CHANGED
@@ -4,9 +4,40 @@ 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.111](https://github.com/eea/volto-clms-theme/compare/1.0.110...1.0.111)
8
+
9
+ - bump accordion block [`f64f037`](https://github.com/eea/volto-clms-theme/commit/f64f037cbcb1200f15d70590beaf4131f7bf464d)
10
+ - Use Case view [`c60b74f`](https://github.com/eea/volto-clms-theme/commit/c60b74f110f98faff7d15a42167e45e410efeec1)
11
+ - textWidget limit to 1000 characters and textAreaWidget show error with more than 8000 characters [`662f035`](https://github.com/eea/volto-clms-theme/commit/662f035fa9ecd7b61b7bb8aa17acb0ce89718df8)
12
+ - relationship between Datasets Use Cases/News [`b1f1848`](https://github.com/eea/volto-clms-theme/commit/b1f184858685783b3ea408930b9e3b1884b381a8)
13
+
14
+ #### [1.0.110](https://github.com/eea/volto-clms-theme/compare/1.0.109...1.0.110)
15
+
16
+ > 28 July 2022
17
+
18
+ - Develop [`#282`](https://github.com/eea/volto-clms-theme/pull/282)
19
+ - Subscription header [`#281`](https://github.com/eea/volto-clms-theme/pull/281)
20
+ - eea.meeting editor box condition [`1cb1361`](https://github.com/eea/volto-clms-theme/commit/1cb13611bee071293875e5425a4e63fa689ae640)
21
+ - fix contents invalid time error [`87dc051`](https://github.com/eea/volto-clms-theme/commit/87dc051c8f8eb0278c0372685adf7a0e3ee2fc09)
22
+ - add volto-tableau [`8d182ef`](https://github.com/eea/volto-clms-theme/commit/8d182ef1f9bce724097630731010df5ed62809cd)
23
+ - checkbox tree parents [`2d7432b`](https://github.com/eea/volto-clms-theme/commit/2d7432b39c5b91d160267f2de3791afef55a2310)
24
+ - add Helmet title to User profile page [`cbca5b3`](https://github.com/eea/volto-clms-theme/commit/cbca5b39f8a8b5ba8b40414561036eb27346e36f)
25
+
26
+ #### [1.0.109](https://github.com/eea/volto-clms-theme/compare/1.0.108...1.0.109)
27
+
28
+ > 26 July 2022
29
+
30
+ - Develop [`#280`](https://github.com/eea/volto-clms-theme/pull/280)
31
+ - add ImageSizeWidget to fix volto-style-block incompatibility with Volto 15 [`15e4d97`](https://github.com/eea/volto-clms-theme/commit/15e4d9785aa3d34787ca151319aeaf8a4d8930b4)
32
+ - breadcrumbs on file views [`03ff26a`](https://github.com/eea/volto-clms-theme/commit/03ff26acf75090ebe61a71fb6f9c144548df1615)
33
+ - prettier [`b1f7295`](https://github.com/eea/volto-clms-theme/commit/b1f72954e990a789c84c6a4cc0764bbf98fcb6a2)
34
+ - email field style login popup and footer subscribe [`0561cb5`](https://github.com/eea/volto-clms-theme/commit/0561cb51cacb93f83c448ce82ef4079947942922)
35
+
7
36
  #### [1.0.108](https://github.com/eea/volto-clms-theme/compare/1.0.107...1.0.108)
8
37
 
9
- - EmailWidget fix [`cd56839`](https://github.com/eea/volto-clms-theme/commit/cd5683951ae27f7ceb51703593e898e33928bf0e)
38
+ > 18 July 2022
39
+
40
+ - EmailWidget fix [`#279`](https://github.com/eea/volto-clms-theme/pull/279)
10
41
 
11
42
  #### [1.0.107](https://github.com/eea/volto-clms-theme/compare/1.0.106...1.0.107)
12
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.0.108",
3
+ "version": "1.0.111",
4
4
  "description": "volto-clms-theme: Volto theme for CLMS site",
5
5
  "main": "src/index.js",
6
6
  "author": "CodeSyntax for the European Environment Agency",
@@ -29,11 +29,12 @@
29
29
  "@eeacms/volto-react-table-widget",
30
30
  "volto-form-block",
31
31
  "@eeacms/volto-taxonomy",
32
- "volto-cookie-banner"
32
+ "volto-cookie-banner",
33
+ "@eeacms/volto-tableau"
33
34
  ],
34
35
  "dependencies": {
35
36
  "volto-cookie-banner": "2.1.0",
36
- "@eeacms/volto-accordion-block": "3.4.13",
37
+ "@eeacms/volto-accordion-block": "3.5.0",
37
38
  "@eeacms/volto-arcgis-block": "*",
38
39
  "@eeacms/volto-clms-utils": "0.1.6",
39
40
  "@eeacms/volto-columns-block": "4.4.3",
@@ -42,6 +43,7 @@
42
43
  "@eeacms/volto-resize-helper": "0.2.1",
43
44
  "@eeacms/volto-tabs-block": "1.2.7",
44
45
  "@eeacms/volto-taxonomy": "^1.0.0",
46
+ "@eeacms/volto-tableau": "1.2.4",
45
47
  "@fortawesome/fontawesome-svg-core": "1.2.35",
46
48
  "@fortawesome/free-regular-svg-icons": "5.15.3",
47
49
  "@fortawesome/free-solid-svg-icons": "5.15.3",
@@ -0,0 +1,168 @@
1
+ import 'react-input-range/lib/css/index.css';
2
+ import './range.css';
3
+
4
+ import React, { useState } from 'react';
5
+ import { Checkbox, List } from 'semantic-ui-react';
6
+ import { structure_taxonomy_terms } from '@eeacms/volto-clms-theme/components';
7
+
8
+ import {
9
+ selectFacetSchemaEnhancer,
10
+ selectFacetStateToValue,
11
+ selectFacetValueToQuery,
12
+ } from '@plone/volto/components/manage/Blocks/Search/components/base';
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
+
39
+ const CheckboxTreeParentFacet = (props) => {
40
+ const { facet, choices, onChange, value } = props;
41
+ const facetValue = value;
42
+ var [open, setOpen] = useState(false);
43
+ let options = [];
44
+ if (choices?.length > 0) {
45
+ options = structure_taxonomy_terms(choices);
46
+ }
47
+ return (
48
+ <fieldset className="ccl-fieldset">
49
+ <div
50
+ className="ccl-expandable__button"
51
+ aria-expanded={open}
52
+ onClick={() => setOpen(!open)}
53
+ onKeyDown={() => setOpen(!open)}
54
+ tabIndex={0}
55
+ role={'button'}
56
+ >
57
+ <legend className="ccl-form-legend">{facet.title}</legend>
58
+ </div>
59
+ <div>
60
+ <List>
61
+ {options.map((option) => (
62
+ <CheckboxListParent
63
+ option={option}
64
+ key={option.value}
65
+ onChange={onChange}
66
+ value={facetValue}
67
+ id={facet.field.value}
68
+ />
69
+ ))}
70
+ </List>
71
+ </div>
72
+ </fieldset>
73
+ );
74
+ };
75
+
76
+ const CheckboxListParent = ({ option, key, onChange, value, id }) => {
77
+ return (
78
+ <List.Item
79
+ key={key}
80
+ style={{ paddingLeft: '15px', paddingBottom: '15px', paddingTop: '10px' }}
81
+ >
82
+ <List.Content>
83
+ <List.Header>
84
+ <Checkbox
85
+ key={option.value}
86
+ name={`field-${option.value}`}
87
+ onChange={(event, { checked }) => {
88
+ checked
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, [
96
+ ...value
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
+ )
105
+ .map((f) => f.value),
106
+ ]);
107
+ }}
108
+ label={
109
+ <label htmlFor={`field-${option.value}`}>{option.label}</label>
110
+ }
111
+ checked={
112
+ value.some((item) => item.value === option.value) ||
113
+ hasAllChildrensSelected(value, option.childrens)
114
+ }
115
+ value={option.value}
116
+ />
117
+ </List.Header>
118
+ {/* {option.childrens.length > 0 && (
119
+ <List.Item>
120
+ <List.List style={{ paddingLeft: '25px' }}>
121
+ {option.childrens.map((child) => (
122
+ <List.Item>
123
+ <List.Content>
124
+ <List.Header>
125
+ <Checkbox
126
+ key={child.value}
127
+ name={`field-${child.value}`}
128
+ disabled={false}
129
+ onChange={(event, { checked }) => {
130
+ checked
131
+ ? onChange(id, [
132
+ ...value
133
+ .filter((f) => f.value !== child.value)
134
+ .map((f) => f.value),
135
+ ...(checked ? [child.value] : []),
136
+ ])
137
+ : onChange(id, [
138
+ ...value
139
+ .filter((item) => item.value !== child.value)
140
+ .map((f) => f.value),
141
+ ]);
142
+ }}
143
+ label={
144
+ <label htmlFor={`field-${child.value}`}>
145
+ {child.label}
146
+ </label>
147
+ }
148
+ checked={value.some(
149
+ (item) => item.value === child.value,
150
+ )}
151
+ value={child.value}
152
+ />
153
+ </List.Header>
154
+ </List.Content>
155
+ </List.Item>
156
+ ))}
157
+ </List.List>
158
+ </List.Item>
159
+ )} */}
160
+ </List.Content>
161
+ </List.Item>
162
+ );
163
+ };
164
+
165
+ CheckboxTreeParentFacet.schemaEnhancer = selectFacetSchemaEnhancer;
166
+ CheckboxTreeParentFacet.stateToValue = selectFacetStateToValue;
167
+ CheckboxTreeParentFacet.valueToQuery = selectFacetValueToQuery;
168
+ export default CheckboxTreeParentFacet;
@@ -2,6 +2,7 @@ import DoubleRangeFacet from './DoubleRangeFacet';
2
2
  import AccordionFacet from './AccordionFacet';
3
3
  import RightModalFacets from './RightModalFacets';
4
4
  import CheckboxTreeFacet from './CheckboxTreeFacet';
5
+ import CheckboxTreeParentFacet from './CheckboxTreeParentFacet';
5
6
  import WithType from './WithType';
6
7
  import rewriteOptions, { portal_types_labels } from './rewriteOptions';
7
8
 
@@ -11,6 +12,7 @@ export {
11
12
  WithType,
12
13
  DoubleRangeFacet,
13
14
  CheckboxTreeFacet,
15
+ CheckboxTreeParentFacet,
14
16
  rewriteOptions,
15
17
  portal_types_labels,
16
18
  };
@@ -4,6 +4,7 @@ import {
4
4
  WithType,
5
5
  DoubleRangeFacet,
6
6
  CheckboxTreeFacet,
7
+ CheckboxTreeParentFacet,
7
8
  rewriteOptions,
8
9
  } from '@eeacms/volto-clms-theme/components/Blocks/CustomTemplates/VoltoSearchBlock';
9
10
  import { SelectFacetFilterListEntry } from '@plone/volto/components/manage/Blocks/Search/components';
@@ -344,6 +345,16 @@ const customBlocks = (config) => ({
344
345
  valueToQuery: CheckboxTreeFacet.valueToQuery,
345
346
  filterListComponent: SelectFacetFilterListEntry,
346
347
  },
348
+ {
349
+ id: 'checkboxTreeParentFacet',
350
+ title: 'Checkbox Tree Parents',
351
+ view: CheckboxTreeParentFacet,
352
+ isDefault: false,
353
+ schemaEnhancer: CheckboxTreeParentFacet.schemaEnhancer,
354
+ stateToValue: CheckboxTreeParentFacet.stateToValue,
355
+ valueToQuery: CheckboxTreeParentFacet.valueToQuery,
356
+ filterListComponent: SelectFacetFilterListEntry,
357
+ },
347
358
 
348
359
  ...config.blocks.blocksConfig.search.extensions.facetWidgets.types,
349
360
  ],
@@ -6,6 +6,8 @@
6
6
  import {
7
7
  DataSetInfoContent,
8
8
  DownloadDataSetContent,
9
+ RelatedNews,
10
+ RelatedUseCases,
9
11
  } from '@eeacms/volto-clms-theme/components/CLMSDatasetDetailView';
10
12
  import { Modal, Segment } from 'semantic-ui-react';
11
13
  import { connect, useDispatch, useSelector } from 'react-redux';
@@ -282,6 +284,8 @@ const CLMSDatasetDetailView = ({ content, token }) => {
282
284
 
283
285
  <CclTabs routing={true}>
284
286
  <div tabTitle="General Info">{DataSetInfoContent(content)}</div>
287
+ <div tabTitle="Use cases">{RelatedUseCases(content)}</div>
288
+ <div tabTitle="News">{RelatedNews(content)}</div>
285
289
  {content?.downloadable_dataset &&
286
290
  content?.downloadable_files?.items?.length > 0 && (
287
291
  <div tabTitle="Download">{DownloadDataSetContent(content)}</div>
@@ -10,6 +10,7 @@ import React from 'react';
10
10
  import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
11
11
  import config from '@plone/volto/registry';
12
12
  import { searchContent } from '@plone/volto/actions';
13
+ import { useLocation } from 'react-router-dom';
13
14
 
14
15
  const DataSetInfoContent = (props) => {
15
16
  const dispatch = useDispatch();
@@ -22,12 +23,13 @@ const DataSetInfoContent = (props) => {
22
23
  geonetwork_identifiers,
23
24
  citation,
24
25
  } = props;
26
+ const location = useLocation();
25
27
  const searchSubrequests = useSelector((state) => state.search.subrequests);
26
28
  let libraries = searchSubrequests?.[id]?.items || [];
27
29
  let librariesPending = searchSubrequests?.[id]?.loading;
28
30
  const user = useSelector((state) => state.users.user);
29
31
  React.useEffect(() => {
30
- UID &&
32
+ if (location.hash === '#GeneralInfo' && UID) {
31
33
  dispatch(
32
34
  searchContent(
33
35
  '',
@@ -40,7 +42,8 @@ const DataSetInfoContent = (props) => {
40
42
  id,
41
43
  ),
42
44
  );
43
- }, [id, UID, dispatch]);
45
+ }
46
+ }, [id, UID, dispatch, location]);
44
47
 
45
48
  const [activeIndex, setActiveIndex] = React.useState([99]);
46
49
 
@@ -0,0 +1,51 @@
1
+ import { Loader } from 'semantic-ui-react';
2
+ import { useDispatch, useSelector } from 'react-redux';
3
+
4
+ import CclCard from '@eeacms/volto-clms-theme/components/CclCard/CclCard';
5
+ import React from 'react';
6
+ import { searchContent } from '@plone/volto/actions';
7
+ import { useLocation } from 'react-router-dom';
8
+
9
+ const RelatedNews = (props) => {
10
+ const dispatch = useDispatch();
11
+ const { UID, id } = props;
12
+ const searchSubrequests = useSelector((state) => state.search.subrequests);
13
+ let libraries = searchSubrequests?.[id]?.items || [];
14
+ let librariesPending = searchSubrequests?.[id]?.loading;
15
+ const location = useLocation();
16
+ React.useEffect(() => {
17
+ if (location.hash === '#News' && UID) {
18
+ dispatch(
19
+ searchContent(
20
+ '',
21
+ {
22
+ fullobjects: 1,
23
+ portal_type: 'News Item',
24
+ path: '/',
25
+ associated_datasets: UID,
26
+ },
27
+ id,
28
+ ),
29
+ );
30
+ }
31
+ }, [id, UID, dispatch, location]);
32
+
33
+ return (
34
+ <div>
35
+ {librariesPending && <Loader active inline="centered" />}
36
+ {libraries.length > 0 ? (
37
+ libraries.map((item, index) => (
38
+ <CclCard
39
+ key={index}
40
+ type={null}
41
+ card={{ Type: item['@type'], ...item }}
42
+ />
43
+ ))
44
+ ) : (
45
+ <p>There are no related items.</p>
46
+ )}
47
+ </div>
48
+ );
49
+ };
50
+
51
+ export default RelatedNews;
@@ -0,0 +1,51 @@
1
+ import { Loader } from 'semantic-ui-react';
2
+ import { useDispatch, useSelector } from 'react-redux';
3
+
4
+ import CclCard from '@eeacms/volto-clms-theme/components/CclCard/CclCard';
5
+ import React from 'react';
6
+ import { searchContent } from '@plone/volto/actions';
7
+ import { useLocation } from 'react-router-dom';
8
+
9
+ const RelatedUseCases = (props) => {
10
+ const dispatch = useDispatch();
11
+ const { UID, id } = props;
12
+ const searchSubrequests = useSelector((state) => state.search.subrequests);
13
+ let libraries = searchSubrequests?.[id]?.items || [];
14
+ let librariesPending = searchSubrequests?.[id]?.loading;
15
+ const location = useLocation();
16
+ React.useEffect(() => {
17
+ if (location.hash === '#Usecases' && UID) {
18
+ dispatch(
19
+ searchContent(
20
+ '',
21
+ {
22
+ fullobjects: 1,
23
+ portal_type: 'UseCase',
24
+ path: '/',
25
+ associated_datasets: UID,
26
+ },
27
+ id,
28
+ ),
29
+ );
30
+ }
31
+ }, [id, UID, dispatch, location]);
32
+
33
+ return (
34
+ <div>
35
+ {librariesPending && <Loader active inline="centered" />}
36
+ {libraries.length > 0 ? (
37
+ libraries.map((item, index) => (
38
+ <CclCard
39
+ key={index}
40
+ type={null}
41
+ card={{ Type: item['@type'], ...item }}
42
+ />
43
+ ))
44
+ ) : (
45
+ <p>There are no related items.</p>
46
+ )}
47
+ </div>
48
+ );
49
+ };
50
+
51
+ export default RelatedUseCases;
@@ -1,2 +1,4 @@
1
1
  export DataSetInfoContent from './DataSetInfoContent';
2
2
  export DownloadDataSetContent from './DownloadDataSetContent';
3
+ export RelatedNews from './RelatedNews';
4
+ export RelatedUseCases from './RelatedUseCases';
@@ -1,18 +1,10 @@
1
- import React, { useEffect } from 'react';
2
-
1
+ import React from 'react';
3
2
  import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
4
- import { getBreadcrumbs } from '@plone/volto/actions';
5
- import { useDispatch } from 'react-redux';
6
- import { Label } from 'semantic-ui-react';
3
+ import { Label, Container } from 'semantic-ui-react';
7
4
 
8
5
  export const CLMSDownloadableFileView = (props) => {
9
- const dispatch = useDispatch();
10
6
  const { content } = props;
11
7
 
12
- useEffect(() => {
13
- dispatch(getBreadcrumbs([]));
14
- }, [dispatch]);
15
-
16
8
  const options = content.taxonomy_technical_library_categorization?.map(
17
9
  (cat) => {
18
10
  return {
@@ -26,26 +18,28 @@ export const CLMSDownloadableFileView = (props) => {
26
18
 
27
19
  return (
28
20
  <>
29
- <div id="page-document" className="ui container">
30
- <h1 className="page-title">{content.title}</h1>
31
- <div>
32
- <p>{content.description}</p>
21
+ <Container className="view-wrapper">
22
+ <div id="page-document" className="ui container">
23
+ <h1 className="page-title">{content.title}</h1>
24
+ <div>
25
+ <p>{content.description}</p>
26
+ </div>
27
+ {options?.length > 0 && (
28
+ <Label.Group>
29
+ {options.map((cat, key) => {
30
+ return (
31
+ <Label key={key} color="olive">
32
+ {cat.title}
33
+ </Label>
34
+ );
35
+ })}
36
+ </Label.Group>
37
+ )}{' '}
38
+ <CclButton download={true} url={content?.file?.download}>
39
+ Download file
40
+ </CclButton>
33
41
  </div>
34
- {options?.length > 0 && (
35
- <Label.Group>
36
- {options.map((cat, key) => {
37
- return (
38
- <Label key={key} color="olive">
39
- {cat.title}
40
- </Label>
41
- );
42
- })}
43
- </Label.Group>
44
- )}{' '}
45
- <CclButton download={true} url={content?.file?.download}>
46
- Download file
47
- </CclButton>
48
- </div>
42
+ </Container>
49
43
  </>
50
44
  );
51
45
  };
@@ -213,54 +213,59 @@ export const CLMSMeetingView = (props) => {
213
213
  return (
214
214
  <div className="ccl-container">
215
215
  <h1 className="page-title">{content.title}</h1>
216
- {user.roles && user.roles.includes('Manager') && (
217
- <Segment.Group compact horizontal>
218
- {content.allow_anonymous_registration && (
219
- <Segment padded={'very'} color={'olive'} circular>
220
- <strong>
221
- <FormattedMessage
222
- id="Anonymous registration form"
223
- defaultMessage="Anonymous registration form"
224
- />
225
- </strong>
226
- <br />
227
- <br />
228
- {content.anonymous_registration_form ? (
229
- <CclButton
230
- url={content.anonymous_registration_form?.url + '/edit'}
231
- >
232
- <FormattedMessage id="Edit form" defaultMessage="Edit form" />
233
- </CclButton>
234
- ) : (
235
- content.allow_anonymous_registration && (
236
- <CclButton onClick={createForm} isButton={true}>
216
+ {user.roles &&
217
+ user.roles.includes('Manager') &&
218
+ (content.allow_anonymous_registration ||
219
+ (content.allow_register && content.subscribers_link)) && (
220
+ <Segment.Group compact horizontal>
221
+ {content.allow_anonymous_registration && (
222
+ <Segment padded={'very'} color={'olive'} circular>
223
+ <strong>
224
+ <FormattedMessage
225
+ id="Anonymous registration form"
226
+ defaultMessage="Anonymous registration form"
227
+ />
228
+ </strong>
229
+ <br />
230
+ <br />
231
+ {content.anonymous_registration_form ? (
232
+ <CclButton
233
+ url={content.anonymous_registration_form?.url + '/edit'}
234
+ >
237
235
  <FormattedMessage
238
- id="Create form"
239
- defaultMessage="Create form"
236
+ id="Edit form"
237
+ defaultMessage="Edit form"
240
238
  />
241
239
  </CclButton>
242
- )
243
- )}
244
- {content.anonymous_registration_form &&
245
- (!content.anonymous_registration_form?.email ||
246
- !content.anonymous_registration_form?.fullname ||
247
- !content.anonymous_registration_form?.published) && (
248
- <p>
249
- <br />
250
- <Message
251
- negative
252
- compact
253
- size="large"
254
- header={intl.formatMessage(messages.form_not_ready)}
255
- list={formErrorMessagesList}
256
- ></Message>
257
- </p>
240
+ ) : (
241
+ content.allow_anonymous_registration && (
242
+ <CclButton onClick={createForm} isButton={true}>
243
+ <FormattedMessage
244
+ id="Create form"
245
+ defaultMessage="Create form"
246
+ />
247
+ </CclButton>
248
+ )
258
249
  )}
259
- </Segment>
260
- )}
261
- <Segment padded={'very'} color={'olive'} circular>
250
+ {content.anonymous_registration_form &&
251
+ (!content.anonymous_registration_form?.email ||
252
+ !content.anonymous_registration_form?.fullname ||
253
+ !content.anonymous_registration_form?.published) && (
254
+ <p>
255
+ <br />
256
+ <Message
257
+ negative
258
+ compact
259
+ size="large"
260
+ header={intl.formatMessage(messages.form_not_ready)}
261
+ list={formErrorMessagesList}
262
+ ></Message>
263
+ </p>
264
+ )}
265
+ </Segment>
266
+ )}
262
267
  {content.allow_register && content.subscribers_link && (
263
- <>
268
+ <Segment padded={'very'} color={'olive'} circular>
264
269
  <strong>
265
270
  <FormattedMessage
266
271
  id="Meeting register information"
@@ -281,11 +286,10 @@ export const CLMSMeetingView = (props) => {
281
286
  defaultMessage="Mail archive"
282
287
  />
283
288
  </CclButton>
284
- </>
289
+ </Segment>
285
290
  )}
286
- </Segment>
287
- </Segment.Group>
288
- )}
291
+ </Segment.Group>
292
+ )}
289
293
  {content.description}
290
294
  <Segment compact padded={'very'} color={'olive'} floated="left">
291
295
  <div className="dataset-info-field">
@@ -28,10 +28,8 @@ export const LightGalleryListing = () => {
28
28
  'images',
29
29
  ),
30
30
  );
31
- return () => {
32
- dispatch(searchContent([]));
33
- };
34
- }, [dispatch]);
31
+ // eslint-disable-next-line react-hooks/exhaustive-deps
32
+ }, []);
35
33
  return (
36
34
  <>
37
35
  <div>
@@ -21,6 +21,8 @@ import { connect } from 'react-redux';
21
21
  import { getExtraBreadcrumbItems } from '../../actions';
22
22
  import jwtDecode from 'jwt-decode';
23
23
  import { Unauthorized } from '@plone/volto/components';
24
+ import { Helmet } from '@plone/volto/helpers';
25
+
24
26
  /**
25
27
  * CLMSProfileView class.
26
28
  * @class CLMSProfileView
@@ -53,6 +55,7 @@ class CLMSProfileView extends Component {
53
55
 
54
56
  return (
55
57
  <div className="ccl-container ">
58
+ <Helmet title="User profile"></Helmet>
56
59
  {loggedIn ? (
57
60
  <CclTabs>
58
61
  <div tabTitle="User profile">