io-sanita-theme 2.13.0 → 2.14.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.14.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.13.0...2.14.0) (2025-05-19)
4
+
5
+ ### Features
6
+
7
+ * Persona Schema.org ([a22ad2f](https://github.com/RedTurtle/io-sanita-theme/commit/a22ad2f005e1fb907eba408d0708b3e47f165c8d))
8
+ * Schema.org ComeFarePer ([#84](https://github.com/RedTurtle/io-sanita-theme/issues/84)) ([7832265](https://github.com/RedTurtle/io-sanita-theme/commit/78322651fec3d2c9b84a72cb38a12009e5af6849))
9
+ * schema.org for CT Notizia ([#85](https://github.com/RedTurtle/io-sanita-theme/issues/85)) ([8774a96](https://github.com/RedTurtle/io-sanita-theme/commit/8774a96ad440640ab5b13e47bbd5c752ef6e232e))
10
+
11
+ ### Bug Fixes
12
+
13
+ * missed id 'rights' for Metadata field ([#86](https://github.com/RedTurtle/io-sanita-theme/issues/86)) ([3d3bf9d](https://github.com/RedTurtle/io-sanita-theme/commit/3d3bf9d2965da118de0693244bd71d67137ca8a9))
14
+
15
+ ### Maintenance
16
+
17
+ * udpated volto-gdpr-privacy to fix arrow in widget ([4c5c33a](https://github.com/RedTurtle/io-sanita-theme/commit/4c5c33a232760a2eebe91813861473c8a3653d34))
18
+
3
19
  ## [2.13.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.12.2...2.13.0) (2025-04-24)
4
20
 
5
21
  ### Features
@@ -2701,6 +2701,11 @@ msgstr ""
2701
2701
  msgid "related_items"
2702
2702
  msgstr ""
2703
2703
 
2704
+ #. Default: "Diritti"
2705
+ #: components/View/commons/Metadata/Metadata
2706
+ msgid "rights"
2707
+ msgstr "Rechte"
2708
+
2704
2709
  #. Default: "il giorno"
2705
2710
  #: overrideTranslations
2706
2711
  msgid "rrule_in"
@@ -2696,6 +2696,11 @@ msgstr "Reading time"
2696
2696
  msgid "related_items"
2697
2697
  msgstr "Related items"
2698
2698
 
2699
+ #. Default: "Diritti"
2700
+ #: components/View/commons/Metadata/Metadata
2701
+ msgid "rights"
2702
+ msgstr "Rights"
2703
+
2699
2704
  #. Default: "il giorno"
2700
2705
  #: overrideTranslations
2701
2706
  msgid "rrule_in"
@@ -2703,6 +2703,11 @@ msgstr "Tiempo de leer"
2703
2703
  msgid "related_items"
2704
2704
  msgstr ""
2705
2705
 
2706
+ #. Default: "Diritti"
2707
+ #: components/View/commons/Metadata/Metadata
2708
+ msgid "rights"
2709
+ msgstr "Derechos"
2710
+
2706
2711
  #. Default: "il giorno"
2707
2712
  #: overrideTranslations
2708
2713
  msgid "rrule_in"
@@ -2703,6 +2703,11 @@ msgstr "Temps de lecture"
2703
2703
  msgid "related_items"
2704
2704
  msgstr ""
2705
2705
 
2706
+ #. Default: "Diritti"
2707
+ #: components/View/commons/Metadata/Metadata
2708
+ msgid "rights"
2709
+ msgstr "Droits"
2710
+
2706
2711
  #. Default: "il giorno"
2707
2712
  #: overrideTranslations
2708
2713
  msgid "rrule_in"
@@ -2696,6 +2696,11 @@ msgstr "Tempo di lettura"
2696
2696
  msgid "related_items"
2697
2697
  msgstr ""
2698
2698
 
2699
+ #. Default: "Diritti"
2700
+ #: components/View/commons/Metadata/Metadata
2701
+ msgid "rights"
2702
+ msgstr ""
2703
+
2699
2704
  #. Default: "il giorno"
2700
2705
  #: overrideTranslations
2701
2706
  msgid "rrule_in"
package/locales/volto.pot CHANGED
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
- "POT-Creation-Date: 2025-04-24T07:37:09.946Z\n"
4
+ "POT-Creation-Date: 2025-05-16T08:50:36.599Z\n"
5
5
  "Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
6
6
  "Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
7
7
  "Content-Type: text/plain; charset=utf-8\n"
@@ -2698,6 +2698,11 @@ msgstr ""
2698
2698
  msgid "related_items"
2699
2699
  msgstr ""
2700
2700
 
2701
+ #. Default: "Diritti"
2702
+ #: components/View/commons/Metadata/Metadata
2703
+ msgid "rights"
2704
+ msgstr ""
2705
+
2701
2706
  #. Default: "il giorno"
2702
2707
  #: overrideTranslations
2703
2708
  msgid "rrule_in"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.13.0",
3
+ "version": "2.14.0",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
@@ -104,7 +104,7 @@
104
104
  "volto-feedback-italia": "1.0.8",
105
105
  "volto-form-block": "3.10.2",
106
106
  "volto-form-block-italia": "1.0.5",
107
- "volto-gdpr-privacy": "2.2.14",
107
+ "volto-gdpr-privacy": "2.2.15",
108
108
  "volto-querywidget-with-browser": "0.4.3",
109
109
  "volto-rss-block": "3.0.1",
110
110
  "volto-rt-carousel": "1.0.0",
@@ -0,0 +1,73 @@
1
+ import { toPublicURL } from '@plone/volto/helpers';
2
+ import {
3
+ SchemaOrg,
4
+ SchemaOrgUtils,
5
+ richTextHasContent,
6
+ } from 'io-sanita-theme/helpers';
7
+
8
+ import { useLoadSteps } from 'io-sanita-theme/components/View/ComeFarePer/Steps/helpers';
9
+ import { positions } from 'slate';
10
+
11
+ const ComeFarePerSchemaOrg = ({ content }) => {
12
+ const siteTitle = SchemaOrgUtils.getSiteTitle();
13
+
14
+ let description = [];
15
+ let _yield = [];
16
+ let steps = content?.items?.filter((item) => item['@type'] === 'Step') ?? [];
17
+ const { loadedSteps } = useLoadSteps(steps);
18
+
19
+ //description
20
+ if (content.description) {
21
+ description.push(content.description);
22
+ }
23
+ if (content.sottotitolo) {
24
+ description.push(content.sottotitolo);
25
+ }
26
+
27
+ let schemaOrg = {
28
+ '@type': 'HowTo',
29
+ url: toPublicURL(content['@id']),
30
+ };
31
+
32
+ if (description.length > 0) {
33
+ schemaOrg.description = description.join('. ');
34
+ }
35
+
36
+ //yield -- The quantity that results by performing instructions. For example, a paper airplane, 10 personalized candles.
37
+ if (richTextHasContent(content.panoramica)) {
38
+ _yield.push(SchemaOrgUtils.fieldDataToPlainText(content.panoramica));
39
+ }
40
+ if (_yield.length > 0) {
41
+ schemaOrg.yield = _yield.join('. ');
42
+ }
43
+
44
+ if (richTextHasContent(content.come_fare)) {
45
+ schemaOrg.conditionsOfAccess = SchemaOrgUtils.fieldDataToPlainText(
46
+ content.come_fare,
47
+ );
48
+ }
49
+ if (richTextHasContent(content.a_chi_si_rivolge)) {
50
+ schemaOrg.audience = SchemaOrgUtils.fieldDataToPlainText(
51
+ content.a_chi_si_rivolge,
52
+ );
53
+ }
54
+
55
+ if (steps.length > 0 && Object.keys(loadedSteps).length === steps.length) {
56
+ schemaOrg.step = Object.keys(loadedSteps).map((id, index) => {
57
+ const step = loadedSteps[id];
58
+ const stepSchemaOrg = {
59
+ '@type': 'HowToStep',
60
+ position: index + 1,
61
+ name: step.title ?? 'Step ' + (index + 1),
62
+ };
63
+ if (richTextHasContent(step.testo)) {
64
+ stepSchemaOrg.text = SchemaOrgUtils.fieldDataToPlainText(step.testo);
65
+ }
66
+ return stepSchemaOrg;
67
+ });
68
+ }
69
+
70
+ return <SchemaOrg content={content} schema={schemaOrg} />;
71
+ };
72
+
73
+ export default ComeFarePerSchemaOrg;
@@ -26,6 +26,7 @@ import {
26
26
  ComeFarePerComeFare,
27
27
  ComeFarePerApprofondimenti,
28
28
  ComeFarePerUlterioriInformazioni,
29
+ ComeFarePerSchemaOrg,
29
30
  } from 'io-sanita-theme/components/View/ComeFarePer';
30
31
 
31
32
  export const ComeFarePerViewSectionsOrder = [
@@ -39,6 +40,7 @@ export const ComeFarePerViewSectionsOrder = [
39
40
  ComeFarePerUlterioriInformazioni,
40
41
  },
41
42
  { /* METADATA */ component: Metadata },
43
+ { /* SCHEMA ORG*/ component: ComeFarePerSchemaOrg },
42
44
  ];
43
45
 
44
46
  /**
@@ -6,8 +6,7 @@
6
6
  import React, { useState, useEffect } from 'react';
7
7
  import { useIntl, defineMessages } from 'react-intl';
8
8
  import { useDispatch, useSelector } from 'react-redux';
9
- import { getContent, resetContent } from '@plone/volto/actions/content/content';
10
- import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
9
+
11
10
  import PropTypes from 'prop-types';
12
11
  import {
13
12
  richTextHasContent,
@@ -23,7 +22,7 @@ import {
23
22
  } from 'design-react-kit';
24
23
  import { Icon, CardPlace, CardContatti } from 'io-sanita-theme/components';
25
24
  import { Attachments } from 'io-sanita-theme/components/View/commons';
26
-
25
+ import { useLoadSteps } from 'io-sanita-theme/components/View/ComeFarePer/Steps/helpers';
27
26
  import './steps.scss';
28
27
 
29
28
  const messages = defineMessages({
@@ -72,25 +71,7 @@ const Steps = ({ content, steps = [] }) => {
72
71
  setActiveItem('');
73
72
  }, [allOpen]);
74
73
 
75
- const searchSteps = useSelector((state) => state.content?.subrequests);
76
-
77
- // one request is made for every step
78
- useEffect(() => {
79
- steps.forEach((item) => {
80
- const url = flattenToAppURL(item['@id']);
81
- const loaded = searchSteps?.[url]?.loading || searchSteps?.[url]?.loaded;
82
-
83
- if (!loaded) {
84
- dispatch(getContent(url, null, url));
85
- }
86
- });
87
-
88
- return () => {
89
- steps.forEach((item) => {
90
- dispatch(resetContent(flattenToAppURL(item['@id'])));
91
- });
92
- };
93
- }, []);
74
+ const { loadedSteps } = useLoadSteps(steps);
94
75
 
95
76
  return steps.length > 0 ? (
96
77
  <div className="steps">
@@ -114,7 +95,7 @@ const Steps = ({ content, steps = [] }) => {
114
95
  </Button>
115
96
  <Accordion background="active">
116
97
  {steps.map((s, index) => {
117
- const step = searchSteps[flattenToAppURL(s['@id'])]?.data ?? s;
98
+ const step = loadedSteps[s['@id']] ?? s;
118
99
  const itemIndex = index + 1;
119
100
  const toggleItem = () => {
120
101
  setActiveItem(activeItem !== itemIndex ? itemIndex : '');
@@ -0,0 +1,43 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { useDispatch, useSelector } from 'react-redux';
3
+ import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
4
+ import { getContent, resetContent } from '@plone/volto/actions/content/content';
5
+
6
+ export const useLoadSteps = (steps = []) => {
7
+ const dispatch = useDispatch();
8
+ const subrequests = useSelector((state) => state.content?.subrequests);
9
+ const [loadedSteps, setLoadedSteps] = useState({});
10
+
11
+ // one request is made for every step
12
+ useEffect(() => {
13
+ steps.forEach((item) => {
14
+ const url = flattenToAppURL(item['@id']);
15
+ const subrequest_id = item['@id'];
16
+ const requested =
17
+ subrequests?.[subrequest_id]?.loading ||
18
+ subrequests?.[subrequest_id]?.loaded;
19
+
20
+ if (!requested) {
21
+ dispatch(getContent(url, null, subrequest_id));
22
+ }
23
+ });
24
+
25
+ return () => {
26
+ steps.forEach((item) => {
27
+ dispatch(resetContent(subrequest_id));
28
+ });
29
+ };
30
+ }, []);
31
+
32
+ useEffect(() => {
33
+ steps.forEach((item) => {
34
+ const subrequest_id = item['@id'];
35
+ const step = subrequests?.[subrequest_id]?.data;
36
+ if (subrequests?.[subrequest_id]?.loaded && step) {
37
+ setLoadedSteps({ ...loadedSteps, [item['@id']]: step });
38
+ }
39
+ });
40
+ }, [subrequests]);
41
+
42
+ return { loadedSteps };
43
+ };
@@ -36,6 +36,11 @@ export const ComeFarePerApprofondimenti = loadable(() =>
36
36
  /* webpackChunkName: "ISComeFarePerView" */ 'io-sanita-theme/components/View/ComeFarePer/ComeFarePerApprofondimenti'
37
37
  ),
38
38
  );
39
+ export const ComeFarePerSchemaOrg = loadable(() =>
40
+ import(
41
+ /* webpackChunkName: "ISComeFarePerView" */ 'io-sanita-theme/components/View/ComeFarePer/ComeFarePerSchemaOrg'
42
+ ),
43
+ );
39
44
  export const Steps = loadable(() =>
40
45
  import(
41
46
  /* webpackChunkName: "ISComeFarePerView" */ 'io-sanita-theme/components/View/ComeFarePer/Steps/Steps'
@@ -0,0 +1,69 @@
1
+ import { useIntl } from 'react-intl';
2
+ import { toPublicURL } from '@plone/volto/helpers';
3
+ import { SiteProperty } from 'volto-site-settings';
4
+ import {
5
+ getSiteProperty,
6
+ SchemaOrgUtils,
7
+ richTextHasContent,
8
+ SchemaOrg,
9
+ } from 'io-sanita-theme/helpers';
10
+
11
+ const NewsItemSchemaOrg = ({ content }) => {
12
+ const intl = useIntl();
13
+
14
+ let siteTitle = SchemaOrgUtils.getSiteTitle();
15
+
16
+ let schemaOrg = {
17
+ '@type': 'NewsArticle',
18
+ headline: content.title,
19
+ url: toPublicURL(content['@id']),
20
+ };
21
+
22
+ let description = [];
23
+
24
+ if (content.description) {
25
+ description.push(content.description);
26
+ }
27
+
28
+ if (richTextHasContent(content.descrizione_estesa)) {
29
+ description.push(
30
+ SchemaOrgUtils.fieldDataToPlainText(content.descrizione_estesa),
31
+ );
32
+ }
33
+
34
+ if (description.length > 0) {
35
+ schemaOrg.description = description.join('. ');
36
+ }
37
+
38
+ if (content.uo_correlata?.length > 0) {
39
+ schemaOrg.author = content.uo_correlata.map((e) => {
40
+ const author = {
41
+ '@type': 'Organization',
42
+ name: e.title,
43
+ };
44
+
45
+ return author;
46
+ });
47
+ }
48
+
49
+ if (content.language) {
50
+ schemaOrg.inLanguage = content.language.token;
51
+ }
52
+
53
+ schemaOrg.publisher = {
54
+ '@type': 'Organization',
55
+ name: siteTitle,
56
+ };
57
+
58
+ if (content.effective) {
59
+ schemaOrg.datePublished = content.effective;
60
+ }
61
+
62
+ if (content.modified) {
63
+ schemaOrg.dateModified = content.modified;
64
+ }
65
+
66
+ return <SchemaOrg content={content} schema={schemaOrg} />;
67
+ };
68
+
69
+ export default NewsItemSchemaOrg;
@@ -32,9 +32,11 @@ import {
32
32
  NewsItemACuraDi,
33
33
  NewsItemNotizieCorrelate,
34
34
  NewsItemUlterioriInformazioni,
35
+ NewsItemSchemaOrg,
35
36
  } from 'io-sanita-theme/components/View/NewsItem';
36
37
 
37
38
  export const NewsItemViewSectionsOrder = [
39
+ { /* METADATI SCHEMA.ORG */ component: NewsItemSchemaOrg },
38
40
  { /* TESTO COMPLETO */ component: NewsItemTesto },
39
41
  { /* DOCUMENTI */ component: NewsItemDocumenti },
40
42
  { /* GALLERY */ component: NewsItemGallery },
@@ -1,67 +1,61 @@
1
1
  import loadable from '@loadable/component';
2
2
 
3
- export const NewsItemView = loadable(
4
- () =>
5
- import(
6
- /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemView'
7
- ),
8
- );
9
- export const NewsItemTesto = loadable(
10
- () =>
11
- import(
12
- /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemTesto'
13
- ),
14
- );
15
- export const NewsItemDocumenti = loadable(
16
- () =>
17
- import(
18
- /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemDocumenti'
19
- ),
20
- );
21
- export const NewsItemACuraDi = loadable(
22
- () =>
23
- import(
24
- /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemACuraDi'
25
- ),
26
- );
27
- export const NewsItemUlterioriInformazioni = loadable(
28
- () =>
29
- import(
30
- /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemUlterioriInformazioni'
31
- ),
32
- );
33
- export const NewsItemGallery = loadable(
34
- () =>
35
- import(
36
- /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemGallery'
37
- ),
3
+ export const NewsItemView = loadable(() =>
4
+ import(
5
+ /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemView'
6
+ ),
7
+ );
8
+ export const NewsItemTesto = loadable(() =>
9
+ import(
10
+ /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemTesto'
11
+ ),
12
+ );
13
+ export const NewsItemDocumenti = loadable(() =>
14
+ import(
15
+ /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemDocumenti'
16
+ ),
17
+ );
18
+ export const NewsItemACuraDi = loadable(() =>
19
+ import(
20
+ /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemACuraDi'
21
+ ),
22
+ );
23
+ export const NewsItemUlterioriInformazioni = loadable(() =>
24
+ import(
25
+ /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemUlterioriInformazioni'
26
+ ),
27
+ );
28
+ export const NewsItemGallery = loadable(() =>
29
+ import(
30
+ /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemGallery'
31
+ ),
38
32
  );
39
33
 
40
- export const NewsItemPersone = loadable(
41
- () =>
42
- import(
43
- /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemPersone'
44
- ),
34
+ export const NewsItemPersone = loadable(() =>
35
+ import(
36
+ /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemPersone'
37
+ ),
45
38
  );
46
39
 
47
- export const NewsItemStrutture = loadable(
48
- () =>
49
- import(
50
- /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemStrutture'
51
- ),
40
+ export const NewsItemStrutture = loadable(() =>
41
+ import(
42
+ /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemStrutture'
43
+ ),
52
44
  );
53
45
 
54
- export const NewsItemServiziEPrestazioni = loadable(
55
- () =>
56
- import(
57
- /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemServiziEPrestazioni'
58
- ),
46
+ export const NewsItemServiziEPrestazioni = loadable(() =>
47
+ import(
48
+ /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemServiziEPrestazioni'
49
+ ),
59
50
  );
60
51
 
61
- export const NewsItemNotizieCorrelate = loadable(
62
- () =>
63
- import(
64
- /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemNotizieCorrelate'
65
- ),
52
+ export const NewsItemNotizieCorrelate = loadable(() =>
53
+ import(
54
+ /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemNotizieCorrelate'
55
+ ),
56
+ );
57
+ export const NewsItemSchemaOrg = loadable(() =>
58
+ import(
59
+ /* webpackChunkName: "ISNewsItemView" */ 'io-sanita-theme/components/View/NewsItem/NewsItemSchemaOrg'
60
+ ),
66
61
  );
67
-
@@ -0,0 +1,63 @@
1
+ import { toPublicURL } from '@plone/volto/helpers';
2
+ import {
3
+ SchemaOrg,
4
+ SchemaOrgUtils,
5
+ richTextHasContent,
6
+ } from 'io-sanita-theme/helpers';
7
+
8
+ import { useLoadSteps } from 'io-sanita-theme/components/View/ComeFarePer/Steps/helpers';
9
+ import { positions } from 'slate';
10
+ import schema from '../../manage/Widgets/HeaderContactsWidget/schema';
11
+
12
+ const PersonaSchemaOrg = ({ content }) => {
13
+ const siteTitle = SchemaOrgUtils.getSiteTitle();
14
+ const siteUrl = toPublicURL('/');
15
+
16
+ let name = [];
17
+ let description = [];
18
+ const role = content.incarico?.title
19
+ ? content.incarico.title.split('»').pop().trim()
20
+ : null;
21
+
22
+ //name
23
+ if (content.titolo_persona) {
24
+ name.push(content.titolo_persona);
25
+ }
26
+ name.push(content.title);
27
+ //description
28
+
29
+ if (content.sottotitolo) {
30
+ description.push(content.sottotitolo);
31
+ }
32
+
33
+ if (content.description) {
34
+ description.push(content.description);
35
+ }
36
+
37
+ let schemaOrg = {
38
+ '@type': 'Person',
39
+ name: name.join(' '),
40
+ url: toPublicURL(content['@id']),
41
+ affiliation: {
42
+ '@type': 'Organization',
43
+ name: siteTitle,
44
+ url: siteUrl,
45
+ },
46
+ };
47
+
48
+ if (role) {
49
+ schemaOrg.jobTitle = role;
50
+ }
51
+
52
+ if (description.length > 0) {
53
+ schemaOrg.description = description.join('. ');
54
+ }
55
+
56
+ if (content.image?.scales?.large?.download) {
57
+ schemaOrg.image = toPublicURL(content.image.scales.large.download);
58
+ }
59
+
60
+ return <SchemaOrg content={content} schema={schemaOrg} />;
61
+ };
62
+
63
+ export default PersonaSchemaOrg;
@@ -18,6 +18,7 @@ import {
18
18
  PersonaDocumenti,
19
19
  PersonaGalleria,
20
20
  PersonaUlterioriInformazioni,
21
+ PersonaSchemaOrg,
21
22
  } from 'io-sanita-theme/components/View/Persona';
22
23
 
23
24
  import { ContentTypeViewSections } from 'io-sanita-theme/helpers';
@@ -33,6 +34,7 @@ import {
33
34
  } from 'io-sanita-theme/components/View/commons';
34
35
 
35
36
  export const PersonaViewSectionsOrder = [
37
+ { /* SCHEMA.ORG */ component: PersonaSchemaOrg },
36
38
  { /* INCARICHI */ component: PersonaIncarichi },
37
39
  { /* COMPETENZE */ component: PersonaCompetenze },
38
40
  { /* UO DI APPARTENENZA */ component: PersonaUOAppartenenza },
@@ -60,3 +60,9 @@ export const PersonaStrutture = loadable(() =>
60
60
  /* webpackChunkName: "ISPersonaView" */ 'io-sanita-theme/components/View/Persona/PersonaStrutture'
61
61
  ),
62
62
  );
63
+
64
+ export const PersonaSchemaOrg = loadable(() =>
65
+ import(
66
+ /* webpackChunkName: "ISPersonaView" */ 'io-sanita-theme/components/View/Persona/PersonaSchemaOrg'
67
+ ),
68
+ );
@@ -11,6 +11,10 @@ const messages = defineMessages({
11
11
  id: 'modified',
12
12
  defaultMessage: 'Ultimo aggiornamento',
13
13
  },
14
+ rights: {
15
+ id: 'rights',
16
+ defaultMessage: 'Diritti',
17
+ },
14
18
  });
15
19
 
16
20
  /**
@@ -9,19 +9,18 @@ import PropTypes from 'prop-types';
9
9
  */
10
10
 
11
11
  const PageHeaderPersona = ({ content }) => {
12
- if(content['@type'] !== 'Persona'){
12
+ if (content['@type'] !== 'Persona') {
13
13
  return null;
14
14
  }
15
-
16
- const role = content.incarico?.title && content.incarico.title.split('»').pop().trim();
17
15
 
18
- return role?(
19
-
20
- <p className="subtitle">
21
- <strong>{role}</strong>
22
- </p>
23
-
24
- ):null;
16
+ const role =
17
+ content.incarico?.title && content.incarico.title.split('»').pop().trim();
18
+
19
+ return role ? (
20
+ <p className="subtitle">
21
+ <strong>{role}</strong>
22
+ </p>
23
+ ) : null;
25
24
  };
26
25
 
27
26
  export default PageHeaderPersona;