io-sanita-theme 2.25.1 → 2.26.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/RELEASE.md +7 -1
  3. package/locales/de/LC_MESSAGES/volto.po +10 -0
  4. package/locales/en/LC_MESSAGES/volto.po +10 -0
  5. package/locales/es/LC_MESSAGES/volto.po +10 -0
  6. package/locales/fr/LC_MESSAGES/volto.po +10 -0
  7. package/locales/it/LC_MESSAGES/volto.po +10 -0
  8. package/locales/volto.pot +11 -1
  9. package/package.json +1 -1
  10. package/src/components/View/AggregationPage/AggregationPage.jsx +2 -0
  11. package/src/components/View/Bando/BandoView.jsx +2 -0
  12. package/src/components/View/CartellaModulistica/CartellaModulisticaView.jsx +8 -1
  13. package/src/components/View/ComeFarePer/ComeFarePerView.jsx +2 -0
  14. package/src/components/View/Documento/DocumentoView.jsx +2 -0
  15. package/src/components/View/Evento/EventoView.jsx +2 -0
  16. package/src/components/View/FAQ/Faq/FaqView.jsx +2 -0
  17. package/src/components/View/FAQ/FaqFolder/FaqFolderView.jsx +3 -1
  18. package/src/components/View/Farmacia/FarmaciaView.jsx +2 -2
  19. package/src/components/View/Modulo/ModuloView.jsx +3 -0
  20. package/src/components/View/NewsItem/NewsItemView.jsx +2 -0
  21. package/src/components/View/Page/PageView.jsx +2 -1
  22. package/src/components/View/Persona/PersonaView.jsx +2 -0
  23. package/src/components/View/PuntoDiContatto/PuntoDiContattoView.jsx +2 -0
  24. package/src/components/View/Servizio/ServizioView.jsx +2 -0
  25. package/src/components/View/Struttura/StrutturaContatti.jsx +16 -5
  26. package/src/components/View/Struttura/StrutturaResponsabile.jsx +18 -5
  27. package/src/components/View/Struttura/StrutturaView.jsx +2 -0
  28. package/src/components/View/UOView/UOView.jsx +2 -0
  29. package/src/components/View/commons/RelatedItemInEvidence/ItemInEvidence.jsx +56 -0
  30. package/src/components/View/commons/RelatedItemInEvidence/RelatedItemInEvidence.jsx +54 -0
  31. package/src/components/View/commons/index.js +5 -0
  32. package/src/theme/io-sanita/components/_relatedItemInEvidence.scss +3 -0
  33. package/src/theme/main.scss +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.26.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.25.1...2.26.0) (2026-04-22)
4
+
5
+ ### Features
6
+
7
+ * struttura ct altenative text fields ([#134](https://github.com/RedTurtle/io-sanita-theme/issues/134)) ([3018de8](https://github.com/RedTurtle/io-sanita-theme/commit/3018de8fd18fa8b94a7b5f47dcfe69698fb318ed))
8
+
9
+ ### Bug Fixes
10
+
11
+ * loop request in cartella modulistica view ([#133](https://github.com/RedTurtle/io-sanita-theme/issues/133)) ([8305465](https://github.com/RedTurtle/io-sanita-theme/commit/830546574623fc41e2a29095de5c1b999d392a17))
12
+ * show related content in evidence in ct views ([#132](https://github.com/RedTurtle/io-sanita-theme/issues/132)) ([f990f59](https://github.com/RedTurtle/io-sanita-theme/commit/f990f595182c60f8a5137c9e8f848318195893f2))
13
+
14
+ ### Maintenance
15
+
16
+ * i18n ([d64f454](https://github.com/RedTurtle/io-sanita-theme/commit/d64f4547124576ec7be26ad791aad37013968739))
17
+ * releaselog ([861ee72](https://github.com/RedTurtle/io-sanita-theme/commit/861ee72b55d6e0568655d962f7de35b2b1ab1290))
18
+
3
19
  ## [2.25.1](https://github.com/RedTurtle/io-sanita-theme/compare/2.25.0...2.25.1) (2026-04-21)
4
20
 
5
21
  ### Bug Fixes
package/RELEASE.md CHANGED
@@ -41,6 +41,13 @@
41
41
  - ...
42
42
  -->
43
43
 
44
+ ## Versione 2.26.0 (22/04/2026)
45
+
46
+ ### Fix
47
+
48
+ - Aggiunta la sezione Documenti correlati in ComeFarePer CT
49
+ - Mostrare contenuto correlato in evidenza nella Pagina
50
+
44
51
  ## Versione 2.25.0 (21/04/2026)
45
52
 
46
53
  ### Fix
@@ -53,7 +60,6 @@
53
60
  - Mostrare il testo della descrizione del Punto di contatto all'interno della card Contatti
54
61
  - Modifica icona Struttura in Folder Content
55
62
  - Sistemata la visualizzazione dell'etichetta "Programmato" accanto al titolo dei contenuti in Folder Content: ora viene mostrata come badge ben distinguibile dal titolo.
56
- - Aggiunta la sezione Documenti correlati in ComeFarePer CT
57
63
 
58
64
  ## Versione 2.24.0 (10/04/2026)
59
65
 
@@ -1892,6 +1892,11 @@ msgstr ""
1892
1892
  msgid "expire"
1893
1893
  msgstr ""
1894
1894
 
1895
+ #. Default: "Esplora"
1896
+ #: components/View/commons/RelatedItemInEvidence/ItemInEvidence
1897
+ msgid "explore"
1898
+ msgstr ""
1899
+
1895
1900
  #. Default: "Inserisci una parola chiave per trovare una risposta"
1896
1901
  #: components/View/FAQ/FaqFolder/FaqFolderView
1897
1902
  msgid "faq_search"
@@ -2092,6 +2097,11 @@ msgstr ""
2092
2097
  msgid "icons_linkMoreTitle"
2093
2098
  msgstr ""
2094
2099
 
2100
+ #. Default: "Contenuti in evidenza"
2101
+ #: components/View/commons/RelatedItemInEvidence/RelatedItemInEvidence
2102
+ msgid "inEvidenceItems"
2103
+ msgstr ""
2104
+
2095
2105
  #. Default: "Indice della pagina"
2096
2106
  #: components/View/commons/SideMenu/SideMenu
2097
2107
  msgid "index"
@@ -1887,6 +1887,11 @@ msgstr "Other informations"
1887
1887
  msgid "expire"
1888
1888
  msgstr "Expire"
1889
1889
 
1890
+ #. Default: "Esplora"
1891
+ #: components/View/commons/RelatedItemInEvidence/ItemInEvidence
1892
+ msgid "explore"
1893
+ msgstr ""
1894
+
1890
1895
  #. Default: "Inserisci una parola chiave per trovare una risposta"
1891
1896
  #: components/View/FAQ/FaqFolder/FaqFolderView
1892
1897
  msgid "faq_search"
@@ -2087,6 +2092,11 @@ msgstr ""
2087
2092
  msgid "icons_linkMoreTitle"
2088
2093
  msgstr ""
2089
2094
 
2095
+ #. Default: "Contenuti in evidenza"
2096
+ #: components/View/commons/RelatedItemInEvidence/RelatedItemInEvidence
2097
+ msgid "inEvidenceItems"
2098
+ msgstr ""
2099
+
2090
2100
  #. Default: "Indice della pagina"
2091
2101
  #: components/View/commons/SideMenu/SideMenu
2092
2102
  msgid "index"
@@ -1894,6 +1894,11 @@ msgstr ""
1894
1894
  msgid "expire"
1895
1895
  msgstr "Expirar"
1896
1896
 
1897
+ #. Default: "Esplora"
1898
+ #: components/View/commons/RelatedItemInEvidence/ItemInEvidence
1899
+ msgid "explore"
1900
+ msgstr ""
1901
+
1897
1902
  #. Default: "Inserisci una parola chiave per trovare una risposta"
1898
1903
  #: components/View/FAQ/FaqFolder/FaqFolderView
1899
1904
  msgid "faq_search"
@@ -2094,6 +2099,11 @@ msgstr ""
2094
2099
  msgid "icons_linkMoreTitle"
2095
2100
  msgstr ""
2096
2101
 
2102
+ #. Default: "Contenuti in evidenza"
2103
+ #: components/View/commons/RelatedItemInEvidence/RelatedItemInEvidence
2104
+ msgid "inEvidenceItems"
2105
+ msgstr ""
2106
+
2097
2107
  #. Default: "Indice della pagina"
2098
2108
  #: components/View/commons/SideMenu/SideMenu
2099
2109
  msgid "index"
@@ -1894,6 +1894,11 @@ msgstr ""
1894
1894
  msgid "expire"
1895
1895
  msgstr "Expiration"
1896
1896
 
1897
+ #. Default: "Esplora"
1898
+ #: components/View/commons/RelatedItemInEvidence/ItemInEvidence
1899
+ msgid "explore"
1900
+ msgstr ""
1901
+
1897
1902
  #. Default: "Inserisci una parola chiave per trovare una risposta"
1898
1903
  #: components/View/FAQ/FaqFolder/FaqFolderView
1899
1904
  msgid "faq_search"
@@ -2094,6 +2099,11 @@ msgstr ""
2094
2099
  msgid "icons_linkMoreTitle"
2095
2100
  msgstr ""
2096
2101
 
2102
+ #. Default: "Contenuti in evidenza"
2103
+ #: components/View/commons/RelatedItemInEvidence/RelatedItemInEvidence
2104
+ msgid "inEvidenceItems"
2105
+ msgstr ""
2106
+
2097
2107
  #. Default: "Indice della pagina"
2098
2108
  #: components/View/commons/SideMenu/SideMenu
2099
2109
  msgid "index"
@@ -1887,6 +1887,11 @@ msgstr ""
1887
1887
  msgid "expire"
1888
1888
  msgstr "Scadenza"
1889
1889
 
1890
+ #. Default: "Esplora"
1891
+ #: components/View/commons/RelatedItemInEvidence/ItemInEvidence
1892
+ msgid "explore"
1893
+ msgstr ""
1894
+
1890
1895
  #. Default: "Inserisci una parola chiave per trovare una risposta"
1891
1896
  #: components/View/FAQ/FaqFolder/FaqFolderView
1892
1897
  msgid "faq_search"
@@ -2087,6 +2092,11 @@ msgstr ""
2087
2092
  msgid "icons_linkMoreTitle"
2088
2093
  msgstr ""
2089
2094
 
2095
+ #. Default: "Contenuti in evidenza"
2096
+ #: components/View/commons/RelatedItemInEvidence/RelatedItemInEvidence
2097
+ msgid "inEvidenceItems"
2098
+ msgstr ""
2099
+
2090
2100
  #. Default: "Indice della pagina"
2091
2101
  #: components/View/commons/SideMenu/SideMenu
2092
2102
  msgid "index"
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: 2026-04-21T07:20:20.069Z\n"
4
+ "POT-Creation-Date: 2026-04-22T13:21:59.420Z\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"
@@ -1889,6 +1889,11 @@ msgstr ""
1889
1889
  msgid "expire"
1890
1890
  msgstr ""
1891
1891
 
1892
+ #. Default: "Esplora"
1893
+ #: components/View/commons/RelatedItemInEvidence/ItemInEvidence
1894
+ msgid "explore"
1895
+ msgstr ""
1896
+
1892
1897
  #. Default: "Inserisci una parola chiave per trovare una risposta"
1893
1898
  #: components/View/FAQ/FaqFolder/FaqFolderView
1894
1899
  msgid "faq_search"
@@ -2089,6 +2094,11 @@ msgstr ""
2089
2094
  msgid "icons_linkMoreTitle"
2090
2095
  msgstr ""
2091
2096
 
2097
+ #. Default: "Contenuti in evidenza"
2098
+ #: components/View/commons/RelatedItemInEvidence/RelatedItemInEvidence
2099
+ msgid "inEvidenceItems"
2100
+ msgstr ""
2101
+
2092
2102
  #. Default: "Indice della pagina"
2093
2103
  #: components/View/commons/SideMenu/SideMenu
2094
2104
  msgid "index"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.25.1",
3
+ "version": "2.26.0",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
@@ -17,6 +17,7 @@ import {
17
17
  PageHeader,
18
18
  SkipToMainContent,
19
19
  commonIntlMessages,
20
+ RelatedItemInEvidence,
20
21
  } from 'io-sanita-theme/components/View/commons';
21
22
  import {
22
23
  CardSimple,
@@ -252,6 +253,7 @@ const AggregationPage = ({ match, route, location }) => {
252
253
  </section>
253
254
  </div>
254
255
  </div>
256
+ <RelatedItemInEvidence content={content}/>
255
257
  </>
256
258
  );
257
259
  };
@@ -27,6 +27,7 @@ import {
27
27
  useSideMenu,
28
28
  Placeholder,
29
29
  commonIntlMessages,
30
+ RelatedItemInEvidence,
30
31
  } from 'io-sanita-theme/components/View/commons';
31
32
 
32
33
  export const BandoViewSectionsOrder = [
@@ -93,6 +94,7 @@ const BandoView = ({ content, location }) => {
93
94
  </div>
94
95
  <Placeholder position="afterContent" content={content} />
95
96
  <RelatedItems content={content} />
97
+ <RelatedItemInEvidence content={content} />
96
98
  <Placeholder position="afterRelatedItems" content={content} />
97
99
  </>
98
100
  );
@@ -17,6 +17,7 @@ import {
17
17
  RelatedItems,
18
18
  Placeholder,
19
19
  Metadata,
20
+ RelatedItemInEvidence,
20
21
  } from 'io-sanita-theme/components/View/commons';
21
22
  import { TextOrBlocks } from 'io-sanita-theme/helpers';
22
23
 
@@ -58,7 +59,12 @@ const CartellaModulisticaView = ({ content }) => {
58
59
  const modulistica = modulisticaItems?.data?.items ?? [];
59
60
 
60
61
  useEffect(() => {
61
- if (hasItems && !modulisticaItems.loading && !modulisticaItems.loaded) {
62
+ if (
63
+ hasItems &&
64
+ !modulisticaItems.loading &&
65
+ !modulisticaItems.loaded &&
66
+ !modulisticaItems.error
67
+ ) {
62
68
  dispatch(getModulisticaItems(flattenToAppURL(modulistica_items_url)));
63
69
  }
64
70
  }, [dispatch, hasItems, modulisticaItems, modulistica_items_url]);
@@ -210,6 +216,7 @@ const CartellaModulisticaView = ({ content }) => {
210
216
 
211
217
  <Placeholder position="afterContent" content={content} />
212
218
  <RelatedItems content={content} list={content?.servizi_collegati ?? []} />
219
+ <RelatedItemInEvidence content={content} />
213
220
  <Placeholder position="afterRelatedItems" content={content} />
214
221
  </>
215
222
  );
@@ -17,6 +17,7 @@ import {
17
17
  Metadata,
18
18
  Placeholder,
19
19
  commonIntlMessages,
20
+ RelatedItemInEvidence,
20
21
  } from 'io-sanita-theme/components/View/commons';
21
22
 
22
23
  import {
@@ -89,6 +90,7 @@ const ComeFarePerView = ({ content, location }) => {
89
90
  </div>
90
91
  <Placeholder position="afterContent" content={content} />
91
92
  <RelatedItems content={content} />
93
+ <RelatedItemInEvidence content={content} />
92
94
  <Placeholder position="afterRelatedItems" content={content} />
93
95
  </>
94
96
  );
@@ -16,6 +16,7 @@ import {
16
16
  RelatedItems,
17
17
  Placeholder,
18
18
  commonIntlMessages,
19
+ RelatedItemInEvidence,
19
20
  } from 'io-sanita-theme/components/View/commons';
20
21
 
21
22
  import {
@@ -87,6 +88,7 @@ const DocumentoView = ({ content }) => {
87
88
  </div>
88
89
  <Placeholder position="afterContent" content={content} />
89
90
  <RelatedItems content={content} />
91
+ <RelatedItemInEvidence content={content} />
90
92
  <Placeholder position="afterRelatedItems" content={content} />
91
93
  </>
92
94
  );
@@ -17,6 +17,7 @@ import {
17
17
  Metadata,
18
18
  Placeholder,
19
19
  commonIntlMessages,
20
+ RelatedItemInEvidence,
20
21
  } from 'io-sanita-theme/components/View/commons';
21
22
 
22
23
  import {
@@ -104,6 +105,7 @@ const EventoView = ({ content, location }) => {
104
105
  </div>
105
106
  <Placeholder position="afterContent" content={content} />
106
107
  <RelatedItems content={content} />
108
+ <RelatedItemInEvidence content={content} />
107
109
  <Placeholder position="afterRelatedItems" content={content} />
108
110
  </>
109
111
  );
@@ -11,6 +11,7 @@ import {
11
11
  RelatedItems,
12
12
  Metadata,
13
13
  Placeholder,
14
+ RelatedItemInEvidence,
14
15
  } from 'io-sanita-theme/components/View/commons';
15
16
 
16
17
  import { TextOrBlocks } from 'io-sanita-theme/helpers';
@@ -39,6 +40,7 @@ const FaqView = ({ content }) => {
39
40
 
40
41
  <Placeholder position="afterContent" content={content} />
41
42
  <RelatedItems content={content} />
43
+ <RelatedItemInEvidence content={content} />
42
44
  <Placeholder position="afterRelatedItems" content={content} />
43
45
  </div>
44
46
  );
@@ -174,7 +174,9 @@ const FaqFolderView = ({ content }) => {
174
174
 
175
175
  <RelatedItems content={content} list={content?.servizi_collegati ?? []} />
176
176
 
177
- <Placeholder position="afterRelatedItems" content={content} />
177
+ <RelatedItemInEvidence content={content} />
178
+
179
+ <Placeholder position="afterRelatedItems" content={content} />
178
180
  </>
179
181
  );
180
182
  };
@@ -7,6 +7,7 @@ import {
7
7
  useSideMenu,
8
8
  Metadata,
9
9
  commonIntlMessages,
10
+ RelatedItemInEvidence,
10
11
  } from 'io-sanita-theme/components/View/commons';
11
12
  import { ContentTypeViewSections } from 'io-sanita-theme/helpers';
12
13
  import PropTypes from 'prop-types';
@@ -92,8 +93,7 @@ const FarmaciaView = ({ content }) => {
92
93
  ...(content.related_news ?? []),
93
94
  ]}
94
95
  />
95
- {/* TODO
96
- <RelatedItemInEvidence content={content} /> */}
96
+ <RelatedItemInEvidence content={content} />
97
97
  </>
98
98
  );
99
99
  };
@@ -10,6 +10,7 @@ import {
10
10
  RelatedItems,
11
11
  Metadata,
12
12
  Placeholder,
13
+ RelatedItemInEvidence,
13
14
  } from 'io-sanita-theme/components/View/commons';
14
15
 
15
16
  import {
@@ -46,6 +47,8 @@ const ModuloView = ({ content }) => {
46
47
 
47
48
  <RelatedItems content={content} />
48
49
 
50
+ <RelatedItemInEvidence content={content} />
51
+
49
52
  <Placeholder position="afterRelatedItems" content={content} />
50
53
  </>
51
54
  );
@@ -19,6 +19,7 @@ import {
19
19
  Metadata,
20
20
  Placeholder,
21
21
  commonIntlMessages,
22
+ RelatedItemInEvidence,
22
23
  } from 'io-sanita-theme/components/View/commons';
23
24
 
24
25
  import {
@@ -112,6 +113,7 @@ const NewsItemView = ({ content, location }) => {
112
113
 
113
114
  <Placeholder position="afterContent" content={content} />
114
115
  <RelatedItems list={related_items} />
116
+ <RelatedItemInEvidence content={content} />
115
117
  <Placeholder position="afterRelatedItems" content={content} />
116
118
  </>
117
119
  );
@@ -17,6 +17,7 @@ import {
17
17
  Placeholder,
18
18
  Metadata,
19
19
  RelatedItems,
20
+ RelatedItemInEvidence,
20
21
  } from 'io-sanita-theme/components/View/commons';
21
22
 
22
23
  import { defineMessages, useIntl } from 'react-intl';
@@ -71,7 +72,6 @@ const PageView = ({ content, token, location, history }) => {
71
72
  {content?.title}
72
73
  </h1>
73
74
  </Placeholder>
74
-
75
75
  <p className="description">{content?.description}</p>
76
76
  </div>
77
77
  {rightHeaderHasContent && (
@@ -113,6 +113,7 @@ const PageView = ({ content, token, location, history }) => {
113
113
  />
114
114
  </div>
115
115
  <RelatedItems content={content} />
116
+ <RelatedItemInEvidence content={content} />
116
117
  <Placeholder position="afterContent" content={content} />
117
118
  </>
118
119
  );
@@ -31,6 +31,7 @@ import {
31
31
  RelatedItems,
32
32
  Placeholder,
33
33
  commonIntlMessages,
34
+ RelatedItemInEvidence,
34
35
  } from 'io-sanita-theme/components/View/commons';
35
36
 
36
37
  export const PersonaViewSectionsOrder = [
@@ -98,6 +99,7 @@ const PersonaView = ({ content }) => {
98
99
  </div>
99
100
  <Placeholder position="afterContent" content={content} />
100
101
  <RelatedItems content={content} />
102
+ <RelatedItemInEvidence content={content} />
101
103
  <Placeholder position="afterRelatedItems" content={content} />
102
104
  </>
103
105
  );
@@ -21,6 +21,7 @@ import {
21
21
  useSideMenu,
22
22
  Metadata,
23
23
  commonIntlMessages,
24
+ RelatedItemInEvidence,
24
25
  } from 'io-sanita-theme/components/View/commons';
25
26
 
26
27
  import { ContentTypeViewSections } from 'io-sanita-theme/helpers';
@@ -78,6 +79,7 @@ const PuntoDiContattoView = ({ content }) => {
78
79
  </div>
79
80
  <Placeholder position="afterContent" content={content} />
80
81
  <RelatedItems list={content?.relatedItems} />
82
+ <RelatedItemInEvidence content={content} />
81
83
  <Placeholder position="afterRelatedItems" content={content} />
82
84
  </>
83
85
  );
@@ -37,6 +37,7 @@ import {
37
37
  useSideMenu,
38
38
  Metadata,
39
39
  commonIntlMessages,
40
+ RelatedItemInEvidence,
40
41
  } from 'io-sanita-theme/components/View/commons';
41
42
 
42
43
  export const ServizioSectionsOrder = [
@@ -110,6 +111,7 @@ const ServizioView = ({ content }) => {
110
111
  </div>
111
112
  <Placeholder position="afterContent" content={content} />
112
113
  <RelatedItems content={content} list={content?.related_news ?? []} />
114
+ <RelatedItemInEvidence content={content} />
113
115
  <Placeholder position="afterRelatedItems" content={content} />
114
116
  </>
115
117
  );
@@ -1,8 +1,13 @@
1
- import PropTypes from 'prop-types';
1
+ import { Col, Row } from 'design-react-kit';
2
+ import {
3
+ RichText,
4
+ RichTextSection,
5
+ richTextHasContent,
6
+ } from 'io-sanita-theme/helpers';
2
7
  import { defineMessages, useIntl } from 'react-intl';
8
+
3
9
  import { CardContatti } from 'io-sanita-theme/components';
4
- import { RichTextSection } from 'io-sanita-theme/helpers';
5
- import { Row, Col } from 'design-react-kit';
10
+ import PropTypes from 'prop-types';
6
11
 
7
12
  const messages = defineMessages({
8
13
  contatti: {
@@ -13,8 +18,8 @@ const messages = defineMessages({
13
18
 
14
19
  const StrutturaContatti = ({ content }) => {
15
20
  const intl = useIntl();
16
-
17
- return content?.pdc_correlato?.length > 0 ? (
21
+ const has_richTextContent = richTextHasContent(content?.pdc_correlato_text);
22
+ return content?.pdc_correlato?.length > 0 || has_richTextContent ? (
18
23
  <RichTextSection
19
24
  tag_id="contatti"
20
25
  title={intl.formatMessage(messages.contatti)}
@@ -27,6 +32,12 @@ const StrutturaContatti = ({ content }) => {
27
32
  </Col>
28
33
  ))}
29
34
  </Row>
35
+ {/* Contenuto testuale alternativo, usato ad esempio con il sync virtualdesk */}
36
+ {has_richTextContent && (
37
+ <div className="richtext-blocks font-serif">
38
+ <RichText data={content?.pdc_correlato_text} />
39
+ </div>
40
+ )}
30
41
  </RichTextSection>
31
42
  ) : null;
32
43
  };
@@ -1,8 +1,13 @@
1
- import React from 'react';
1
+ import { Col, Row } from 'design-react-kit';
2
+ import {
3
+ RichText,
4
+ RichTextSection,
5
+ richTextHasContent,
6
+ } from 'io-sanita-theme/helpers';
2
7
  import { defineMessages, useIntl } from 'react-intl';
3
- import { RichTextSection } from 'io-sanita-theme/helpers';
8
+
4
9
  import { CardPersona } from 'io-sanita-theme/components';
5
- import { Row, Col } from 'design-react-kit';
10
+ import React from 'react';
6
11
 
7
12
  const messages = defineMessages({
8
13
  responsabile: {
@@ -13,8 +18,10 @@ const messages = defineMessages({
13
18
 
14
19
  const StrutturaResponsabile = ({ content }) => {
15
20
  const intl = useIntl();
16
-
17
- return content?.responsabile_correlato?.length > 0 ? (
21
+ const has_richTextContent = richTextHasContent(
22
+ content?.responsabile_correlato_text,
23
+ );
24
+ return content?.responsabile_correlato?.length > 0 || has_richTextContent ? (
18
25
  <RichTextSection
19
26
  tag_id="responsabile"
20
27
  title={intl.formatMessage(messages.responsabile)}
@@ -28,6 +35,12 @@ const StrutturaResponsabile = ({ content }) => {
28
35
  );
29
36
  })}
30
37
  </Row>
38
+ {/* Contenuto testuale alternativo, usato ad esempio con il sync virtualdesk */}
39
+ {has_richTextContent && (
40
+ <div className="richtext-blocks font-serif">
41
+ <RichText data={content?.responsabile_correlato_text} />
42
+ </div>
43
+ )}
31
44
  </RichTextSection>
32
45
  ) : (
33
46
  <></>
@@ -37,6 +37,7 @@ import {
37
37
  useSideMenu,
38
38
  Metadata,
39
39
  commonIntlMessages,
40
+ RelatedItemInEvidence,
40
41
  } from 'io-sanita-theme/components/View/commons';
41
42
 
42
43
  export const StrutturaSectionsOrder = [
@@ -110,6 +111,7 @@ const StrutturaView = ({ content }) => {
110
111
  </div>
111
112
  <Placeholder position="afterContent" content={content} />
112
113
  <RelatedItems content={content} list={content?.related_news ?? []} />
114
+ <RelatedItemInEvidence content={content} />
113
115
  <Placeholder position="afterRelatedItems" content={content} />
114
116
  </>
115
117
  );
@@ -33,6 +33,7 @@ import {
33
33
  useSideMenu,
34
34
  Metadata,
35
35
  commonIntlMessages,
36
+ RelatedItemInEvidence,
36
37
  } from 'io-sanita-theme/components/View/commons';
37
38
 
38
39
  export const UOViewSectionsOrder = [
@@ -102,6 +103,7 @@ const UOView = ({ content }) => {
102
103
  </div>
103
104
  <Placeholder position="afterContent" content={content} />
104
105
  <RelatedItems content={content} list={content?.related_news ?? []} />
106
+ <RelatedItemInEvidence content={content} />
105
107
  <Placeholder position="afterRelatedItems" content={content} />
106
108
  </>
107
109
  );
@@ -0,0 +1,56 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { defineMessages, useIntl } from 'react-intl';
4
+ import {
5
+ Card,
6
+ CardBody,
7
+ CardTitle,
8
+ CardText,
9
+ CardReadMore,
10
+ } from 'design-react-kit';
11
+ import { flattenToAppURL } from '@plone/volto/helpers';
12
+
13
+ const messages = defineMessages({
14
+ explore: {
15
+ id: 'explore',
16
+ defaultMessage: 'Esplora',
17
+ },
18
+ });
19
+
20
+ /**
21
+ * ItemInEvidence view component class.
22
+ * @function ItemInEvidence
23
+ * @params {object} location: object.
24
+ * @returns {string} Markup of the component.
25
+ */
26
+ const ItemInEvidence = ({ content }) => {
27
+ const intl = useIntl();
28
+ const correlato_in_evidenza = content.correlato_in_evidenza[0];
29
+ return (
30
+ <div className="card-wrapper">
31
+ <Card className="card-bg rounded " noWrapper={true} tag="div">
32
+ <CardBody tag="div">
33
+ <CardTitle className="h3">{correlato_in_evidenza.title}</CardTitle>
34
+ <CardText tag="p">{correlato_in_evidenza.description}</CardText>
35
+ <CardReadMore
36
+ iconName="it-arrow-right"
37
+ tag="a"
38
+ text={intl.formatMessage(messages.explore)}
39
+ href={flattenToAppURL(correlato_in_evidenza['@id'])}
40
+ />
41
+ </CardBody>
42
+ </Card>
43
+ </div>
44
+ );
45
+ };
46
+
47
+ export default ItemInEvidence;
48
+
49
+ ItemInEvidence.propTypes = {
50
+ content: PropTypes.shape({
51
+ '@id': PropTypes.string,
52
+ '@type': PropTypes.string,
53
+ title: PropTypes.string,
54
+ correlato_in_evidenza: PropTypes.array,
55
+ }),
56
+ };
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import ItemInEvidence from 'io-sanita-theme/components/View/commons/RelatedItemInEvidence/ItemInEvidence';
4
+ import { Container, Row, Col } from 'design-react-kit';
5
+ import { defineMessages, useIntl } from 'react-intl';
6
+
7
+ const messages = defineMessages({
8
+ inEvidenceItems: {
9
+ id: 'inEvidenceItems',
10
+ defaultMessage: 'Contenuti in evidenza',
11
+ },
12
+ });
13
+
14
+ /**
15
+ * RelatedItems view component class.
16
+ * @function RelatedItems
17
+ * @params {object} location: object.
18
+ * @returns {string} Markup of the component.
19
+ */
20
+ const RelatedItemInEvidence = ({ content }) => {
21
+ const intl = useIntl();
22
+ return (
23
+ content?.correlato_in_evidenza?.length > 0 && (
24
+ <section
25
+ id="correlato-in-evidenza"
26
+ role="complementary"
27
+ aria-label={intl.formatMessage(messages.inEvidenceItems)}
28
+ >
29
+ <section className="section bg-primary">
30
+ <div className="section-content">
31
+ <Container>
32
+ <Row className="m-4">
33
+ <Col md={6} className="px-3">
34
+ <ItemInEvidence content={content} />
35
+ </Col>
36
+ </Row>
37
+ </Container>
38
+ </div>
39
+ </section>
40
+ </section>
41
+ )
42
+ );
43
+ };
44
+
45
+ export default RelatedItemInEvidence;
46
+
47
+ RelatedItemInEvidence.propTypes = {
48
+ content: PropTypes.shape({
49
+ '@id': PropTypes.string,
50
+ '@type': PropTypes.string,
51
+ title: PropTypes.string,
52
+ correlato_in_evidenza: PropTypes.array,
53
+ }),
54
+ };
@@ -105,6 +105,11 @@ export const RelatedItems = loadable(() =>
105
105
  /* webpackChunkName: "ISViewsCommons" */ 'io-sanita-theme/components/View/commons/RelatedItems'
106
106
  ),
107
107
  );
108
+ export const RelatedItemInEvidence = loadable(() =>
109
+ import(
110
+ /* webpackChunkName: "ISViewsCommons" */ 'io-sanita-theme/components/View/commons/RelatedItemInEvidence/RelatedItemInEvidence'
111
+ ),
112
+ );
108
113
  export const SearchSectionForm = loadable(() =>
109
114
  import(
110
115
  /* webpackChunkName: "ISViewsCommons" */ 'io-sanita-theme/components/View/commons/PageHeader/SearchSectionForm'
@@ -0,0 +1,3 @@
1
+ #correlato-in-evidenza {
2
+ margin-bottom: 48px;
3
+ }
@@ -27,6 +27,7 @@
27
27
  @import './io-sanita/components/cards';
28
28
  @import './io-sanita/components/mapPinDirections';
29
29
  @import './io-sanita/components/view/commons/pageHeader';
30
+ @import './io-sanita/components/relatedItemInEvidence';
30
31
 
31
32
  @import './io-sanita/components/blocks/common';
32
33
  @import './io-sanita/components/blocks/skeleton';