design-comuni-plone-theme 11.15.0 → 11.17.0
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/.github/workflows/main.yml +1 -1
- package/.github/workflows/performance.yml +1 -1
- package/.github/workflows/prs.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/.yarn/cache/{volto-form-block-npm-3.8.7-d78dca483b-8c014bdf2d.zip → volto-form-block-npm-3.9.2-cb78fb6cd0-a47c5241be.zip} +0 -0
- package/.yarn/cache/volto-site-settings-npm-0.4.3-7926886a97-690d1c03a0.zip +0 -0
- package/.yarn/cache/{volto-subsites-npm-4.0.1-97a0109675-0796a9f77c.zip → volto-subsites-npm-4.0.2-715672140c-77408b4ea1.zip} +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +44 -0
- package/Makefile +1 -1
- package/RELEASE.md +20 -0
- package/locales/de/LC_MESSAGES/volto.po +3 -1
- package/locales/en/LC_MESSAGES/volto.po +3 -1
- package/locales/es/LC_MESSAGES/volto.po +3 -1
- package/locales/fr/LC_MESSAGES/volto.po +3 -1
- package/locales/it/LC_MESSAGES/volto.po +3 -1
- package/locales/volto.pot +4 -2
- package/package.json +7 -5
- package/publiccode.yml +2 -2
- package/src/components/ItaliaTheme/AppExtras/GenericAppExtras.jsx +1 -6
- package/src/components/ItaliaTheme/AppExtras/SiteSettingsExtras.jsx +35 -0
- package/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js +3 -1
- package/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +3 -2
- package/src/components/ItaliaTheme/BrandText/BrandText.jsx +39 -7
- package/src/components/ItaliaTheme/BrandTextFooter/BrandTextFooter.jsx +1 -1
- package/src/components/ItaliaTheme/Breadcrumbs/Breadcrumbs.jsx +3 -1
- package/src/components/ItaliaTheme/Footer/FooterInfos.jsx +4 -2
- package/src/components/ItaliaTheme/Footer/FooterMain.jsx +4 -4
- package/src/components/ItaliaTheme/Footer/FooterSmall.jsx +10 -5
- package/src/components/ItaliaTheme/Header/HeaderCenter.jsx +5 -6
- package/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +25 -7
- package/src/components/ItaliaTheme/Header/ParentSiteMenu.jsx +3 -1
- package/src/components/ItaliaTheme/Logo/Logo.jsx +15 -7
- package/src/components/ItaliaTheme/LogoFooter/LogoFooter.jsx +11 -3
- package/src/components/ItaliaTheme/Slider/NextArrow.jsx +1 -1
- package/src/components/ItaliaTheme/Slider/PrevArrow.jsx +1 -1
- package/src/components/ItaliaTheme/View/Commons/Actions.jsx +2 -2
- package/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx +1 -1
- package/src/components/ItaliaTheme/View/Commons/Attachment.jsx +1 -1
- package/src/components/ItaliaTheme/View/Commons/HelpBox.jsx +1 -1
- package/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx +5 -2
- package/src/components/ItaliaTheme/View/Commons/Sharing.jsx +1 -1
- package/src/components/ItaliaTheme/View/Commons/__tests__/Dates.test.jsx +1 -1
- package/src/components/ItaliaTheme/View/IncaricoView/IncaricoView.jsx +50 -8
- package/src/components/ItaliaTheme/View/PersonaView/PersonaRuolo.jsx +4 -6
- package/src/components/ItaliaTheme/View/ServizioView/ServizioMetatag.jsx +13 -1
- package/src/components/ItaliaTheme/View/__tests__/ServizioTempiScadenze.test.jsx +0 -1
- package/src/config/italiaConfig.js +10 -0
- package/src/customizations/volto/components/theme/Navigation/Navigation.jsx +6 -5
- package/src/customizations/volto/helpers/Html/Html.jsx +2 -2
- package/src/helpers/index.js +1 -0
- package/src/helpers/url.js +15 -0
- package/src/theme/_cms-ui.scss +6 -0
- /package/src/components/ItaliaTheme/View/{__tests__/IncaricoView.test.jsx → __disabled_tests__/IncaricoView.test__disabled.jsx} +0 -0
|
@@ -5,15 +5,18 @@
|
|
|
5
5
|
|
|
6
6
|
import React, { useEffect } from 'react';
|
|
7
7
|
import cx from 'classnames';
|
|
8
|
-
import { UniversalLink } from '@plone/volto/components';
|
|
9
8
|
import { defineMessages, useIntl } from 'react-intl';
|
|
10
9
|
import { Container } from 'design-react-kit';
|
|
11
|
-
import { getSiteProperty } from 'design-comuni-plone-theme/helpers';
|
|
12
10
|
import { useLocation } from 'react-router-dom';
|
|
13
11
|
import { useDispatch, useSelector } from 'react-redux';
|
|
14
12
|
import { getSubFooter, getItemsByPath } from 'volto-subfooter';
|
|
15
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
16
13
|
import { displayBanner } from 'volto-gdpr-privacy';
|
|
14
|
+
import { UniversalLink } from '@plone/volto/components';
|
|
15
|
+
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
16
|
+
import {
|
|
17
|
+
getSiteProperty,
|
|
18
|
+
useHomePath,
|
|
19
|
+
} from 'design-comuni-plone-theme/helpers';
|
|
17
20
|
|
|
18
21
|
const messages = defineMessages({
|
|
19
22
|
goToPage: {
|
|
@@ -35,7 +38,7 @@ const FooterSmall = () => {
|
|
|
35
38
|
const intl = useIntl();
|
|
36
39
|
const pathname = useLocation().pathname;
|
|
37
40
|
const dispatch = useDispatch();
|
|
38
|
-
|
|
41
|
+
const homepath = useHomePath();
|
|
39
42
|
const subFooter = useSelector((state) => state.subFooter?.result);
|
|
40
43
|
const subFooterItems = getItemsByPath(subFooter, pathname)?.filter(
|
|
41
44
|
(item) => item.visible,
|
|
@@ -54,7 +57,9 @@ const FooterSmall = () => {
|
|
|
54
57
|
{subFooterItems?.length > 0 &&
|
|
55
58
|
subFooterItems.map((item, index) => {
|
|
56
59
|
let url =
|
|
57
|
-
item.href ||
|
|
60
|
+
item.href ||
|
|
61
|
+
flattenToAppURL(item.linkUrl?.[0]?.['@id']) ||
|
|
62
|
+
homepath;
|
|
58
63
|
return (
|
|
59
64
|
<li
|
|
60
65
|
className={cx('list-inline-item', {
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
HeaderSearch,
|
|
16
16
|
BrandText,
|
|
17
17
|
} from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
18
|
+
import { useHomePath } from 'design-comuni-plone-theme/helpers';
|
|
18
19
|
|
|
19
20
|
const messages = defineMessages({
|
|
20
21
|
logoSubsiteAlt: {
|
|
@@ -32,22 +33,20 @@ const HeaderCenter = () => {
|
|
|
32
33
|
const subsite = useSelector((state) => state.subsite?.data);
|
|
33
34
|
const logoSubsite = subsite?.subsite_logo && (
|
|
34
35
|
<figure className="icon">
|
|
35
|
-
<
|
|
36
|
-
src={flattenToAppURL(subsite.subsite_logo.scales?.mini?.download)}
|
|
37
|
-
alt={intl.formatMessage(messages.logoSubsiteAlt)}
|
|
38
|
-
/>
|
|
36
|
+
<Logo alt={intl.formatMessage(messages.logoSubsiteAlt)} />
|
|
39
37
|
</figure>
|
|
40
38
|
);
|
|
39
|
+
const homepath = useHomePath();
|
|
41
40
|
|
|
42
41
|
return (
|
|
43
42
|
<Header small={false} theme="" type="center">
|
|
44
43
|
<HeaderContent>
|
|
45
44
|
<div className="it-brand-wrapper ps-4">
|
|
46
45
|
<UniversalLink
|
|
47
|
-
href={subsite?.['@id'] ? flattenToAppURL(subsite['@id']) :
|
|
46
|
+
href={subsite?.['@id'] ? flattenToAppURL(subsite['@id']) : homepath}
|
|
48
47
|
title={intl.formatMessage(messages.subsiteUniversalLink)}
|
|
49
48
|
>
|
|
50
|
-
{subsite?.subsite_logo ? logoSubsite : <Logo />}
|
|
49
|
+
{subsite?.subsite_logo ? logoSubsite : <Logo className="icon" />}
|
|
51
50
|
<BrandText subsite={subsite} />
|
|
52
51
|
</UniversalLink>
|
|
53
52
|
</div>
|
|
@@ -13,19 +13,36 @@ import {
|
|
|
13
13
|
HeaderRightZone,
|
|
14
14
|
} from 'design-react-kit';
|
|
15
15
|
import { useIntl } from 'react-intl';
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
getSiteProperty,
|
|
18
|
+
useHomePath,
|
|
19
|
+
} from 'design-comuni-plone-theme/helpers';
|
|
20
|
+
import { SiteProperty } from 'volto-site-settings';
|
|
17
21
|
|
|
18
22
|
const HeaderSlim = () => {
|
|
19
23
|
const subsite = useSelector((state) => state.subsite?.data);
|
|
20
24
|
const intl = useIntl();
|
|
21
|
-
|
|
25
|
+
const homepath = useHomePath();
|
|
22
26
|
const parentSiteURL = subsite
|
|
23
|
-
?
|
|
27
|
+
? homepath
|
|
24
28
|
: getSiteProperty('parentSiteURL', intl.locale);
|
|
25
29
|
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
const staticParentSiteTitle = getSiteProperty('parentSiteTitle', intl.locale);
|
|
31
|
+
|
|
32
|
+
// TODO DEPRECATED use only SiteProperty
|
|
33
|
+
const deprecatedSubsiteParentSiteTitle = getSiteProperty(
|
|
34
|
+
'subsiteParentSiteTitle',
|
|
35
|
+
intl.locale,
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const subsiteParentSiteTitle =
|
|
39
|
+
deprecatedSubsiteParentSiteTitle ||
|
|
40
|
+
SiteProperty({
|
|
41
|
+
property: 'site_title',
|
|
42
|
+
defaultValue: getSiteProperty('subsiteParentSiteTitle', intl.locale),
|
|
43
|
+
getValue: true,
|
|
44
|
+
getParent: true,
|
|
45
|
+
});
|
|
29
46
|
|
|
30
47
|
const target = subsite ? null : '_blank';
|
|
31
48
|
return (
|
|
@@ -37,7 +54,8 @@ const HeaderSlim = () => {
|
|
|
37
54
|
target={target}
|
|
38
55
|
rel="noopener noreferrer"
|
|
39
56
|
>
|
|
40
|
-
{
|
|
57
|
+
{!subsite && staticParentSiteTitle}
|
|
58
|
+
{subsite && subsiteParentSiteTitle.replaceAll('\\n', ' - ')}
|
|
41
59
|
</HeaderBrand>
|
|
42
60
|
<HeaderRightZone>
|
|
43
61
|
<HeaderSlimRightZone />
|
|
@@ -8,12 +8,14 @@ import { useSelector } from 'react-redux';
|
|
|
8
8
|
import { Link } from 'react-router-dom';
|
|
9
9
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
10
10
|
import { Nav, NavItem, NavLink } from 'design-react-kit';
|
|
11
|
+
import { useHomePath } from 'design-comuni-plone-theme/helpers';
|
|
11
12
|
|
|
12
13
|
const ParentSiteMenu = () => {
|
|
13
14
|
const dropdownMenu = useSelector(
|
|
14
15
|
(state) => state.dropdownMenuNavItems?.result,
|
|
15
16
|
);
|
|
16
17
|
const subsite = useSelector((state) => state.subsite?.data);
|
|
18
|
+
const homepath = useHomePath();
|
|
17
19
|
|
|
18
20
|
let menu = null;
|
|
19
21
|
if (subsite) {
|
|
@@ -23,7 +25,7 @@ const ParentSiteMenu = () => {
|
|
|
23
25
|
let i = url_split.length - 1;
|
|
24
26
|
while (i > 0) {
|
|
25
27
|
let s = url_split.slice(0, i).join('/');
|
|
26
|
-
s = s.length === 0 ?
|
|
28
|
+
s = s.length === 0 ? homepath : s;
|
|
27
29
|
// eslint-disable-next-line no-loop-func
|
|
28
30
|
dropdownMenu.forEach((m) => {
|
|
29
31
|
if (m.rootPath === s) {
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
* Note the icon class.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
/* SVG example
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
/* SVG example
|
|
14
|
+
import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
15
|
+
const Logo = () => <Icon color="" icon="it-pa" padding={false} size="" />;
|
|
16
|
+
*/
|
|
16
17
|
|
|
17
18
|
/* PNG example using https://www.npmjs.com/package/webpack-image-resize-loader *
|
|
18
19
|
* works, but some issues with prettier and jest
|
|
@@ -20,9 +21,16 @@
|
|
|
20
21
|
// eslint-disable-next-line import/no-unresolved
|
|
21
22
|
//import logo from './logo.png?width=164';
|
|
22
23
|
import logo from './logo.png';
|
|
24
|
+
import { SiteProperty } from 'volto-site-settings';
|
|
23
25
|
|
|
24
|
-
const Logo = () =>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const Logo = ({ alt = 'Logo', className }) => {
|
|
27
|
+
return (
|
|
28
|
+
<SiteProperty
|
|
29
|
+
property="site_logo"
|
|
30
|
+
defaultValue={{ url: logo, width: 82, height: 82 }}
|
|
31
|
+
className={className}
|
|
32
|
+
alt={alt}
|
|
33
|
+
/>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
28
36
|
export default Logo;
|
|
@@ -12,9 +12,17 @@
|
|
|
12
12
|
|
|
13
13
|
// eslint-disable-next-line import/no-unresolved
|
|
14
14
|
import logo from '../Logo/logo.png';
|
|
15
|
+
import { SiteProperty } from 'volto-site-settings';
|
|
15
16
|
|
|
16
|
-
const LogoFooter = () =>
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const LogoFooter = () => {
|
|
18
|
+
return (
|
|
19
|
+
<SiteProperty
|
|
20
|
+
property="site_logo_footer"
|
|
21
|
+
defaultValue={{ url: logo, width: 82, height: 82 }}
|
|
22
|
+
className="icon"
|
|
23
|
+
alt="Logo"
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
19
27
|
|
|
20
28
|
export default LogoFooter;
|
|
@@ -27,7 +27,7 @@ export default function PrevArrow(props) {
|
|
|
27
27
|
onKeyDown={onKeyDown}
|
|
28
28
|
>
|
|
29
29
|
<Icon icon="chevron-left" key="chevron-left-prev" title={_title} />
|
|
30
|
-
<span
|
|
30
|
+
<span className="visually-hidden">{_title}</span>
|
|
31
31
|
</button>
|
|
32
32
|
);
|
|
33
33
|
}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
Button,
|
|
11
11
|
} from 'design-react-kit';
|
|
12
12
|
import { toPublicURL } from '@plone/volto/helpers';
|
|
13
|
-
import
|
|
13
|
+
import Icon from 'design-comuni-plone-theme/components/ItaliaTheme/Icons/Icon';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Actions view component class.
|
|
@@ -98,7 +98,7 @@ const Actions = (props) => {
|
|
|
98
98
|
<LinkList>
|
|
99
99
|
{socials.map((item, i) => {
|
|
100
100
|
const commonButtonProps = {
|
|
101
|
-
icon:
|
|
101
|
+
icon: undefined,
|
|
102
102
|
title: item.title,
|
|
103
103
|
alt: item.title,
|
|
104
104
|
'aria-label': item.title,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl, defineMessages } from 'react-intl';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import
|
|
4
|
+
import Icon from 'design-comuni-plone-theme/components/ItaliaTheme/Icons/Icon';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Dates view component class.
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { defineMessages, useIntl } from 'react-intl';
|
|
4
4
|
import { Card, CardBody, CardTitle } from 'design-react-kit';
|
|
5
5
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
6
|
-
import
|
|
6
|
+
import Icon from 'design-comuni-plone-theme/components/ItaliaTheme/Icons/Icon';
|
|
7
7
|
|
|
8
8
|
const messages = defineMessages({
|
|
9
9
|
attachment: {
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useIntl, defineMessages } from 'react-intl';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { Callout, CalloutTitle } from 'design-react-kit';
|
|
5
|
-
import
|
|
5
|
+
import Icon from 'design-comuni-plone-theme/components/ItaliaTheme/Icons/Icon';
|
|
6
6
|
import { RichText } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
|
|
7
7
|
|
|
8
8
|
const HelpBox = ({ text }) => {
|
|
@@ -67,9 +67,12 @@ const RenderBlocks = ({
|
|
|
67
67
|
|
|
68
68
|
if (Block != null) {
|
|
69
69
|
return (
|
|
70
|
-
<Wrapper
|
|
70
|
+
<Wrapper
|
|
71
|
+
block={blockContent[blocksFieldname]?.[block]}
|
|
72
|
+
id={block}
|
|
73
|
+
key={block}
|
|
74
|
+
>
|
|
71
75
|
<Block
|
|
72
|
-
key={block}
|
|
73
76
|
id={block}
|
|
74
77
|
properties={content ?? data}
|
|
75
78
|
data={{
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from 'design-react-kit';
|
|
12
12
|
|
|
13
13
|
import { toPublicURL } from '@plone/volto/helpers';
|
|
14
|
-
import
|
|
14
|
+
import Icon from 'design-comuni-plone-theme/components/ItaliaTheme/Icons/Icon';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Sharing view component class.
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { injectIntl } from 'react-intl';
|
|
9
8
|
import { defineMessages, useIntl } from 'react-intl';
|
|
10
9
|
import {
|
|
11
10
|
PageHeader,
|
|
@@ -24,12 +23,26 @@ import {
|
|
|
24
23
|
import { contentFolderHasItems } from 'design-comuni-plone-theme/helpers';
|
|
25
24
|
import { UniversalLink } from '@plone/volto/components';
|
|
26
25
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
26
|
+
import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
|
|
27
27
|
|
|
28
28
|
const messages = defineMessages({
|
|
29
29
|
tipologia_incarico: {
|
|
30
30
|
id: 'tipologia_incarico',
|
|
31
31
|
defaultMessage: 'Tipo di incarico',
|
|
32
32
|
},
|
|
33
|
+
data_inizio_incarico: {
|
|
34
|
+
id: 'data_inizio_incarico',
|
|
35
|
+
defaultMessage: "Data di inizio dell'incarico",
|
|
36
|
+
},
|
|
37
|
+
data_conclusione_incarico: {
|
|
38
|
+
id: 'data_conclusione_incarico',
|
|
39
|
+
defaultMessage:
|
|
40
|
+
"Ha fatto parte dell'organizzazione comunale come {incarico} fino al",
|
|
41
|
+
},
|
|
42
|
+
data_insediamento: {
|
|
43
|
+
id: 'data_insediamento',
|
|
44
|
+
defaultMessage: 'Data di insediamento',
|
|
45
|
+
},
|
|
33
46
|
importi_viaggio: {
|
|
34
47
|
id: 'importi_viaggio',
|
|
35
48
|
defaultMessage: 'Importi di viaggio e/o servizio',
|
|
@@ -54,10 +67,6 @@ const messages = defineMessages({
|
|
|
54
67
|
id: 'data_conclusione',
|
|
55
68
|
defaultMessage: 'Data conclusione incarico',
|
|
56
69
|
},
|
|
57
|
-
data_insediamento: {
|
|
58
|
-
id: 'data_insediamento',
|
|
59
|
-
defaultMessage: 'Data insediamento',
|
|
60
|
-
},
|
|
61
70
|
atto_nomina: {
|
|
62
71
|
id: 'atto_nomina',
|
|
63
72
|
defaultMessage: 'Atto di nomina',
|
|
@@ -69,9 +78,10 @@ const messages = defineMessages({
|
|
|
69
78
|
* @param {Object} content Content object.
|
|
70
79
|
* @returns {string} Markup of the component.
|
|
71
80
|
*/
|
|
72
|
-
const IncaricoView = (
|
|
73
|
-
const
|
|
81
|
+
const IncaricoView = ({ content, moment: momentlib }) => {
|
|
82
|
+
const moment = momentlib.default;
|
|
74
83
|
const intl = useIntl();
|
|
84
|
+
|
|
75
85
|
return (
|
|
76
86
|
<div className="container px-4 my-4 incarico-view">
|
|
77
87
|
<SkipToMainContent />
|
|
@@ -93,6 +103,38 @@ const IncaricoView = (props) => {
|
|
|
93
103
|
<div className="font-serif">{content.tipologia_incarico.title}</div>
|
|
94
104
|
</RichTextSection>
|
|
95
105
|
)}
|
|
106
|
+
{content.data_inizio_incarico && (
|
|
107
|
+
<RichTextSection
|
|
108
|
+
tag_id="data_inizio_incarico"
|
|
109
|
+
title={intl.formatMessage(messages.data_inizio_incarico)}
|
|
110
|
+
>
|
|
111
|
+
<div className="font-serif">
|
|
112
|
+
{moment(content.data_inizio_incarico).format('D-MM-YYYY')}
|
|
113
|
+
</div>
|
|
114
|
+
</RichTextSection>
|
|
115
|
+
)}
|
|
116
|
+
{content.data_conclusione_incarico && (
|
|
117
|
+
<RichTextSection
|
|
118
|
+
tag_id="data_conclusione_incarico"
|
|
119
|
+
title={intl.formatMessage(messages.data_conclusione_incarico, {
|
|
120
|
+
incarico: content.title,
|
|
121
|
+
})}
|
|
122
|
+
>
|
|
123
|
+
<div className="font-serif">
|
|
124
|
+
{moment(content.data_conclusione_incarico).format('D-MM-YYYY')}
|
|
125
|
+
</div>
|
|
126
|
+
</RichTextSection>
|
|
127
|
+
)}
|
|
128
|
+
{content.data_insediamento && (
|
|
129
|
+
<RichTextSection
|
|
130
|
+
tag_id="data_insediamento"
|
|
131
|
+
title={intl.formatMessage(messages.data_insediamento)}
|
|
132
|
+
>
|
|
133
|
+
<div className="font-serif">
|
|
134
|
+
{moment(content.data_insediamento).format('D-MM-YYYY')}
|
|
135
|
+
</div>
|
|
136
|
+
</RichTextSection>
|
|
137
|
+
)}
|
|
96
138
|
{richTextHasContent(content.compensi) && (
|
|
97
139
|
<RichTextSection
|
|
98
140
|
data={content.compensi}
|
|
@@ -196,4 +238,4 @@ IncaricoView.propTypes = {
|
|
|
196
238
|
}).isRequired,
|
|
197
239
|
};
|
|
198
240
|
|
|
199
|
-
export default
|
|
241
|
+
export default injectLazyLibs(['moment'])(IncaricoView);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { defineMessages, useIntl } from 'react-intl';
|
|
2
3
|
import { UniversalLink } from '@plone/volto/components';
|
|
3
4
|
import {
|
|
@@ -85,15 +86,12 @@ const PersonaRuolo = ({ content }) => {
|
|
|
85
86
|
return (
|
|
86
87
|
<>
|
|
87
88
|
{content?.incarichi_persona?.length > 0 && (
|
|
88
|
-
|
|
89
|
+
<React.Fragment key={content?.incarichi_persona[0]?.id}>
|
|
89
90
|
<RichTextSection
|
|
90
91
|
tag_id="incarico"
|
|
91
92
|
title={intl.formatMessage(messages.ruolo)}
|
|
92
93
|
>
|
|
93
|
-
<div
|
|
94
|
-
className="font-serif mb-3"
|
|
95
|
-
key={content?.incarichi_persona[0]?.id}
|
|
96
|
-
>
|
|
94
|
+
<div className="font-serif mb-3">
|
|
97
95
|
<p>{content?.incarichi_persona[0]?.title}</p>
|
|
98
96
|
{content?.incarichi_persona[0]?.atto_di_nomina && (
|
|
99
97
|
<UniversalLink
|
|
@@ -239,7 +237,7 @@ const PersonaRuolo = ({ content }) => {
|
|
|
239
237
|
)}
|
|
240
238
|
</RichTextSection>
|
|
241
239
|
)}
|
|
242
|
-
|
|
240
|
+
</React.Fragment>
|
|
243
241
|
)}
|
|
244
242
|
|
|
245
243
|
{content.incarichi_persona?.length > 1 && (
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { useIntl } from 'react-intl';
|
|
1
2
|
import { Helmet, toPublicURL, isInternalURL } from '@plone/volto/helpers';
|
|
3
|
+
import { SiteProperty } from 'volto-site-settings';
|
|
2
4
|
import { getSiteProperty } from 'design-comuni-plone-theme/helpers';
|
|
3
5
|
import { richTextHasContent } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
|
|
4
6
|
|
|
@@ -13,7 +15,17 @@ const fieldDataToPlainText = (field) => {
|
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
const ServizioMetatag = ({ content }) => {
|
|
16
|
-
const
|
|
18
|
+
const intl = useIntl();
|
|
19
|
+
// TODO DEPRECATED use only SiteProperty
|
|
20
|
+
const deprecatedSiteTitle = getSiteProperty('siteTitle', intl.locale);
|
|
21
|
+
let siteTitle =
|
|
22
|
+
deprecatedSiteTitle ||
|
|
23
|
+
SiteProperty({
|
|
24
|
+
property: 'site_title',
|
|
25
|
+
getValue: true,
|
|
26
|
+
defaultTitle: getSiteProperty('siteTitle', intl.locale),
|
|
27
|
+
});
|
|
28
|
+
siteTitle = siteTitle.replaceAll('\\n', ' - ');
|
|
17
29
|
|
|
18
30
|
const schemaOrg = {
|
|
19
31
|
'@context': 'https://schema.org',
|
|
@@ -14,7 +14,6 @@ const mockStore = configureStore(middlewares);
|
|
|
14
14
|
// Warning: An update to Icon inside a test was not wrapped in act(...).
|
|
15
15
|
// When testing, code that causes React state updates should be wrapped into act(...):
|
|
16
16
|
jest.mock('design-comuni-plone-theme/components/ItaliaTheme/Icons/Icon');
|
|
17
|
-
// loadables.push('rrule');
|
|
18
17
|
jest.mock('@plone/volto/helpers/Loadable/Loadable');
|
|
19
18
|
beforeAll(
|
|
20
19
|
async () =>
|
|
@@ -35,6 +35,8 @@ import GenericAppExtras from 'design-comuni-plone-theme/components/ItaliaTheme/A
|
|
|
35
35
|
import PageLoader from 'design-comuni-plone-theme/components/ItaliaTheme/AppExtras/PageLoader';
|
|
36
36
|
import TrackFocus from 'design-comuni-plone-theme/components/ItaliaTheme/AppExtras/TrackFocus';
|
|
37
37
|
import redraft from 'redraft';
|
|
38
|
+
|
|
39
|
+
import SiteSettingsExtras from 'design-comuni-plone-theme/components/ItaliaTheme/AppExtras/SiteSettingsExtras';
|
|
38
40
|
import { loadables as ItaliaLoadables } from 'design-comuni-plone-theme/config/loadables';
|
|
39
41
|
|
|
40
42
|
// CTs icons
|
|
@@ -298,6 +300,10 @@ export default function applyConfig(voltoConfig) {
|
|
|
298
300
|
match: '',
|
|
299
301
|
component: TrackFocus,
|
|
300
302
|
},
|
|
303
|
+
{
|
|
304
|
+
match: '',
|
|
305
|
+
component: SiteSettingsExtras,
|
|
306
|
+
},
|
|
301
307
|
],
|
|
302
308
|
maxFileUploadSize: null,
|
|
303
309
|
'volto-blocks-widget': {
|
|
@@ -518,6 +524,10 @@ export default function applyConfig(voltoConfig) {
|
|
|
518
524
|
...config.components,
|
|
519
525
|
BlockExtraTags: { component: () => null },
|
|
520
526
|
};
|
|
527
|
+
config.registerComponent({
|
|
528
|
+
name: 'SiteSettingsExtras',
|
|
529
|
+
component: SiteSettingsExtras,
|
|
530
|
+
});
|
|
521
531
|
|
|
522
532
|
// REDUCERS
|
|
523
533
|
config.addonReducers = {
|
|
@@ -38,10 +38,7 @@ const Navigation = ({ pathname }) => {
|
|
|
38
38
|
const subsite = useSelector((state) => state.subsite?.data);
|
|
39
39
|
const logoSubsite = subsite?.subsite_logo && (
|
|
40
40
|
<figure className="icon">
|
|
41
|
-
<
|
|
42
|
-
src={flattenToAppURL(subsite.subsite_logo.scales?.mini?.download)}
|
|
43
|
-
alt="Logo"
|
|
44
|
-
/>
|
|
41
|
+
<Logo />
|
|
45
42
|
</figure>
|
|
46
43
|
);
|
|
47
44
|
|
|
@@ -136,7 +133,11 @@ const Navigation = ({ pathname }) => {
|
|
|
136
133
|
}
|
|
137
134
|
onClick={() => setCollapseOpen(false)}
|
|
138
135
|
>
|
|
139
|
-
{subsite?.subsite_logo ?
|
|
136
|
+
{subsite?.subsite_logo ? (
|
|
137
|
+
logoSubsite
|
|
138
|
+
) : (
|
|
139
|
+
<Logo className="icon" />
|
|
140
|
+
)}
|
|
140
141
|
<BrandText mobile={true} subsite={subsite} />
|
|
141
142
|
</UniversalLink>
|
|
142
143
|
</div>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
/*
|
|
6
6
|
CUSTOMIZATIONS:
|
|
7
|
-
-
|
|
7
|
+
- Rimosso <link rel="shortcut icon" href="/favicon.ico" /> perchè creato da volto-site-settings
|
|
8
8
|
- Add shrink-to-fit=no in viewport meta
|
|
9
9
|
- Remove link for manifest and svg/apple icons
|
|
10
10
|
*/
|
|
@@ -122,7 +122,7 @@ class Html extends Component {
|
|
|
122
122
|
})};`,
|
|
123
123
|
}}
|
|
124
124
|
/>
|
|
125
|
-
<link rel="shortcut icon" href="/favicon.ico" />
|
|
125
|
+
{/* <link rel="shortcut icon" href="/favicon.ico" /> */}
|
|
126
126
|
<meta property="og:type" content="website" />
|
|
127
127
|
<meta name="generator" content="Plone 6 - https://plone.org" />
|
|
128
128
|
<meta
|
package/src/helpers/index.js
CHANGED
|
@@ -52,3 +52,4 @@ export {
|
|
|
52
52
|
export { commonSearchBlockMessages } from 'design-comuni-plone-theme/helpers/Translations/searchBlockExtendedTranslations';
|
|
53
53
|
|
|
54
54
|
export { getComponentWithFallback } from 'design-comuni-plone-theme/helpers/registry';
|
|
55
|
+
export { useHomePath } from 'design-comuni-plone-theme/helpers/url';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
|
+
|
|
4
|
+
import config from '@plone/volto/registry';
|
|
5
|
+
|
|
6
|
+
export const useHomePath = () => {
|
|
7
|
+
const [path, setPath] = useState('/');
|
|
8
|
+
|
|
9
|
+
const { locale } = useIntl();
|
|
10
|
+
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
setPath(config.settings.isMultilingual ? '/' + locale : '/');
|
|
13
|
+
}, [locale]);
|
|
14
|
+
return path;
|
|
15
|
+
};
|
package/src/theme/_cms-ui.scss
CHANGED