design-comuni-plone-theme 11.10.2 → 11.11.1

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.
@@ -0,0 +1,20 @@
1
+ name: Release latest version on npm
2
+ on:
3
+ release:
4
+ types: [released]
5
+
6
+ jobs:
7
+ release_to_npm:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v4
11
+
12
+ - uses: actions/setup-node@v4
13
+ with:
14
+ node-version: '18.x'
15
+ registry-url: 'https://registry.npmjs.org'
16
+
17
+ - name: Release to npm
18
+ run: yarn npm publish
19
+ env:
20
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.release-it.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "commitMessage": "chore: release v${version}"
5
5
  },
6
6
  "npm": {
7
- "publish": true
7
+ "publish": false
8
8
  },
9
9
  "github": {
10
10
  "release": true,
Binary file
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
 
2
2
 
3
+ ## [11.11.1](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.11.0...v11.11.1) (2024-05-02)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * changed recurrence buttons spacing and rrule translation for on_the ([#672](https://github.com/redturtle/design-comuni-plone-theme/issues/672)) ([383f241](https://github.com/redturtle/design-comuni-plone-theme/commit/383f241ece965ba13071da4e536907c382279e83))
9
+ * spacing for event-recurrences-more ([#673](https://github.com/redturtle/design-comuni-plone-theme/issues/673)) ([675ba21](https://github.com/redturtle/design-comuni-plone-theme/commit/675ba214a52bae7ea9d947b7d238f1490061cced))
10
+ * tipologia evento shown in page ([#670](https://github.com/redturtle/design-comuni-plone-theme/issues/670)) ([13ea54b](https://github.com/redturtle/design-comuni-plone-theme/commit/13ea54bc9aa109738b65ebf775ad1d79c731addd))
11
+
12
+
13
+ ### Documentation
14
+
15
+ * fix release log heading ([5e1dbb9](https://github.com/redturtle/design-comuni-plone-theme/commit/5e1dbb904a1362c5d288df5cf3c75fae374d9203))
16
+ * updated publiccode and release log ([3d9c8e5](https://github.com/redturtle/design-comuni-plone-theme/commit/3d9c8e579fe57eb2ce8db8e880dc6f572a58366e))
17
+
18
+
19
+ ### Maintenance
20
+
21
+ * abbiamo deciso che la cartella deve essere "altri documenti" ([#671](https://github.com/redturtle/design-comuni-plone-theme/issues/671)) ([0dac7db](https://github.com/redturtle/design-comuni-plone-theme/commit/0dac7dbbdd913bb746f18dbab1f3cad6c56fbffc))
22
+ * switch to releasing to npm with github actions ([7781ab0](https://github.com/redturtle/design-comuni-plone-theme/commit/7781ab01d5f19fb2d16ea0d0a8f89752af5fd152))
23
+
24
+ ## [11.11.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.10.2...v11.11.0) (2024-04-29)
25
+
26
+
27
+ ### Features
28
+
29
+ * modificato vista persona per mostrare anche la cartella altri allegati ([#668](https://github.com/redturtle/design-comuni-plone-theme/issues/668)) ([eb47ca0](https://github.com/redturtle/design-comuni-plone-theme/commit/eb47ca02152abf351697dac58dc2704a17a7ba57))
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * add event start date for subevents that do not have an image ([#667](https://github.com/redturtle/design-comuni-plone-theme/issues/667)) ([0426435](https://github.com/redturtle/design-comuni-plone-theme/commit/04264359589c05d1617fdb060aa716f9e7cab57c))
35
+ * added conditional chaining in cardCalendar ([#669](https://github.com/redturtle/design-comuni-plone-theme/issues/669)) ([a8dacc8](https://github.com/redturtle/design-comuni-plone-theme/commit/a8dacc8049c09b8f0742ee4c1904597610331ec7))
36
+
37
+
38
+ ### Documentation
39
+
40
+ * updated publiccode and release log ([1a61edf](https://github.com/redturtle/design-comuni-plone-theme/commit/1a61edf4ad4fd22b906ca012fa9c2f4f26ad2640))
41
+
3
42
  ## [11.10.2](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.10.1...v11.10.2) (2024-04-24)
4
43
 
5
44
 
package/RELEASE.md CHANGED
@@ -41,6 +41,26 @@
41
41
  - ...
42
42
  -->
43
43
 
44
+ ## Versione 11.11.1 (02/05/2024)
45
+
46
+ ### Migliorie
47
+
48
+ - Il campo tipologia è ora mostrato all'interno della pagina del CT Evento, se compilato.
49
+
50
+ ## Versione 11.11.0 (29/04/2024)
51
+
52
+ ### Migliorie
53
+
54
+ - Aggiunte le date degli eventi figli nel caso questi non presentino immagini nella card.
55
+
56
+ ### Novità
57
+
58
+ - Modificato vista del tipo di contenuto Persona per mostrare anche la cartella interna "Altri allegati".
59
+
60
+ ### Fix
61
+
62
+ - Aggiustato problema per il blocco elenco, variazione card con Immagine, per gli eventi con ricorrenza.
63
+
44
64
  ## Versione 11.10.0 (17/04/2024)
45
65
 
46
66
  ### Migliorie
@@ -797,6 +797,11 @@ msgstr ""
797
797
  msgid "altri_documenti"
798
798
  msgstr ""
799
799
 
800
+ #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
801
+ # defaultMessage: Altri documenti
802
+ msgid "altri_documenti_persona"
803
+ msgstr ""
804
+
800
805
  #: config/Blocks/ListingOptions/cardWithImageTemplate
801
806
  # defaultMessage: Mostra l'immagine per tutti gli elementi
802
807
  msgid "always_show_image"
@@ -3003,7 +3008,7 @@ msgid "rrule_nd"
3003
3008
  msgstr ""
3004
3009
 
3005
3010
  #: overrideTranslations
3006
- # defaultMessage: il
3011
+ # defaultMessage: di
3007
3012
  msgid "rrule_on the"
3008
3013
  msgstr ""
3009
3014
 
@@ -3948,6 +3953,11 @@ msgstr ""
3948
3953
  msgid "tipologia_bando"
3949
3954
  msgstr ""
3950
3955
 
3956
+ #: components/ItaliaTheme/View/EventoView/EventoCosE
3957
+ # defaultMessage: Tipo evento
3958
+ msgid "tipologia_evento"
3959
+ msgstr ""
3960
+
3951
3961
  #: components/ItaliaTheme/View/IncaricoView/IncaricoView
3952
3962
  #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
3953
3963
  # defaultMessage: Tipo di incarico
@@ -782,6 +782,11 @@ msgstr ""
782
782
  msgid "altri_documenti"
783
783
  msgstr "Other documents"
784
784
 
785
+ #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
786
+ # defaultMessage: Altri documenti
787
+ msgid "altri_documenti_persona"
788
+ msgstr "Other documents"
789
+
785
790
  #: config/Blocks/ListingOptions/cardWithImageTemplate
786
791
  # defaultMessage: Mostra l'immagine per tutti gli elementi
787
792
  msgid "always_show_image"
@@ -2988,7 +2993,7 @@ msgid "rrule_nd"
2988
2993
  msgstr "nd"
2989
2994
 
2990
2995
  #: overrideTranslations
2991
- # defaultMessage: il
2996
+ # defaultMessage: di
2992
2997
  msgid "rrule_on the"
2993
2998
  msgstr "on the"
2994
2999
 
@@ -3933,6 +3938,11 @@ msgstr ""
3933
3938
  msgid "tipologia_bando"
3934
3939
  msgstr "Type of call"
3935
3940
 
3941
+ #: components/ItaliaTheme/View/EventoView/EventoCosE
3942
+ # defaultMessage: Tipo evento
3943
+ msgid "tipologia_evento"
3944
+ msgstr "Event type"
3945
+
3936
3946
  #: components/ItaliaTheme/View/IncaricoView/IncaricoView
3937
3947
  #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
3938
3948
  # defaultMessage: Tipo di incarico
@@ -791,6 +791,11 @@ msgstr "Otros métodos de envío"
791
791
  msgid "altri_documenti"
792
792
  msgstr "Otros documentos"
793
793
 
794
+ #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
795
+ # defaultMessage: Altri documenti
796
+ msgid "altri_documenti_persona"
797
+ msgstr ""
798
+
794
799
  #: config/Blocks/ListingOptions/cardWithImageTemplate
795
800
  # defaultMessage: Mostra l'immagine per tutti gli elementi
796
801
  msgid "always_show_image"
@@ -2997,7 +3002,7 @@ msgid "rrule_nd"
2997
3002
  msgstr ""
2998
3003
 
2999
3004
  #: overrideTranslations
3000
- # defaultMessage: il
3005
+ # defaultMessage: di
3001
3006
  msgid "rrule_on the"
3002
3007
  msgstr ""
3003
3008
 
@@ -3942,6 +3947,11 @@ msgstr ""
3942
3947
  msgid "tipologia_bando"
3943
3948
  msgstr "Tipo de llamada"
3944
3949
 
3950
+ #: components/ItaliaTheme/View/EventoView/EventoCosE
3951
+ # defaultMessage: Tipo evento
3952
+ msgid "tipologia_evento"
3953
+ msgstr ""
3954
+
3945
3955
  #: components/ItaliaTheme/View/IncaricoView/IncaricoView
3946
3956
  #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
3947
3957
  # defaultMessage: Tipo di incarico
@@ -799,6 +799,11 @@ msgstr ""
799
799
  msgid "altri_documenti"
800
800
  msgstr "Autres documents"
801
801
 
802
+ #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
803
+ # defaultMessage: Altri documenti
804
+ msgid "altri_documenti_persona"
805
+ msgstr ""
806
+
802
807
  #: config/Blocks/ListingOptions/cardWithImageTemplate
803
808
  # defaultMessage: Mostra l'immagine per tutti gli elementi
804
809
  msgid "always_show_image"
@@ -3005,7 +3010,7 @@ msgid "rrule_nd"
3005
3010
  msgstr ""
3006
3011
 
3007
3012
  #: overrideTranslations
3008
- # defaultMessage: il
3013
+ # defaultMessage: di
3009
3014
  msgid "rrule_on the"
3010
3015
  msgstr ""
3011
3016
 
@@ -3950,6 +3955,11 @@ msgstr ""
3950
3955
  msgid "tipologia_bando"
3951
3956
  msgstr "Type d'appel"
3952
3957
 
3958
+ #: components/ItaliaTheme/View/EventoView/EventoCosE
3959
+ # defaultMessage: Tipo evento
3960
+ msgid "tipologia_evento"
3961
+ msgstr ""
3962
+
3953
3963
  #: components/ItaliaTheme/View/IncaricoView/IncaricoView
3954
3964
  #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
3955
3965
  # defaultMessage: Tipo di incarico
@@ -782,6 +782,11 @@ msgstr "Altre modalità di invio"
782
782
  msgid "altri_documenti"
783
783
  msgstr "Documenti"
784
784
 
785
+ #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
786
+ # defaultMessage: Altri documenti
787
+ msgid "altri_documenti_persona"
788
+ msgstr "Altri documenti"
789
+
785
790
  #: config/Blocks/ListingOptions/cardWithImageTemplate
786
791
  # defaultMessage: Mostra l'immagine per tutti gli elementi
787
792
  msgid "always_show_image"
@@ -2988,7 +2993,7 @@ msgid "rrule_nd"
2988
2993
  msgstr " "
2989
2994
 
2990
2995
  #: overrideTranslations
2991
- # defaultMessage: il
2996
+ # defaultMessage: di
2992
2997
  msgid "rrule_on the"
2993
2998
  msgstr "il giorno"
2994
2999
 
@@ -3933,6 +3938,11 @@ msgstr "Impossibile aggiungere un elemento alla timeline senza aver compilato il
3933
3938
  msgid "tipologia_bando"
3934
3939
  msgstr "Tipologia del bando"
3935
3940
 
3941
+ #: components/ItaliaTheme/View/EventoView/EventoCosE
3942
+ # defaultMessage: Tipo evento
3943
+ msgid "tipologia_evento"
3944
+ msgstr ""
3945
+
3936
3946
  #: components/ItaliaTheme/View/IncaricoView/IncaricoView
3937
3947
  #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
3938
3948
  # defaultMessage: Tipo di incarico
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: 2024-04-09T13:53:31.353Z\n"
4
+ "POT-Creation-Date: 2024-05-02T09:19:12.781Z\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
  "MIME-Version: 1.0\n"
@@ -784,6 +784,11 @@ msgstr ""
784
784
  msgid "altri_documenti"
785
785
  msgstr ""
786
786
 
787
+ #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
788
+ # defaultMessage: Altri documenti
789
+ msgid "altri_documenti_persona"
790
+ msgstr ""
791
+
787
792
  #: config/Blocks/ListingOptions/cardWithImageTemplate
788
793
  # defaultMessage: Mostra l'immagine per tutti gli elementi
789
794
  msgid "always_show_image"
@@ -2990,7 +2995,7 @@ msgid "rrule_nd"
2990
2995
  msgstr ""
2991
2996
 
2992
2997
  #: overrideTranslations
2993
- # defaultMessage: il
2998
+ # defaultMessage: di
2994
2999
  msgid "rrule_on the"
2995
3000
  msgstr ""
2996
3001
 
@@ -3935,6 +3940,11 @@ msgstr ""
3935
3940
  msgid "tipologia_bando"
3936
3941
  msgstr ""
3937
3942
 
3943
+ #: components/ItaliaTheme/View/EventoView/EventoCosE
3944
+ # defaultMessage: Tipo evento
3945
+ msgid "tipologia_evento"
3946
+ msgstr ""
3947
+
3938
3948
  #: components/ItaliaTheme/View/IncaricoView/IncaricoView
3939
3949
  #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
3940
3950
  # defaultMessage: Tipo di incarico
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "design-comuni-plone-theme",
3
3
  "description": "Volto Theme for Italia design guidelines",
4
4
  "license": "GPL-v3",
5
- "version": "11.10.2",
5
+ "version": "11.11.1",
6
6
  "main": "src/index.js",
7
7
  "keywords": [
8
8
  "volto-addon",
package/publiccode.yml CHANGED
@@ -227,9 +227,9 @@ maintenance:
227
227
  name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
228
228
  platforms:
229
229
  - web
230
- releaseDate: '2024-04-24'
230
+ releaseDate: '2024-05-02'
231
231
  softwareType: standalone/web
232
- softwareVersion: 11.10.2
232
+ softwareVersion: 11.11.1
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -84,7 +84,7 @@ export const CardCalendar = ({ start, end, recurrence, rrule }) => {
84
84
  } else if (recurrenceDates) {
85
85
  let dateFormat = 'DD/MM';
86
86
  if (
87
- !recurrenceDates?.recurrenceStart.isSame(
87
+ !recurrenceDates?.recurrenceStart?.isSame(
88
88
  recurrenceDates?.recurrenceEnd,
89
89
  'year',
90
90
  )
@@ -1,12 +1,6 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import { defineMessages, useIntl } from 'react-intl';
3
- import {
4
- Card,
5
- CardBody,
6
- CardReadMore,
7
- CardText,
8
- CardTitle,
9
- } from 'design-react-kit';
3
+ import { Card, CardBody, CardReadMore, CardTitle } from 'design-react-kit';
10
4
  import config from '@plone/volto/registry';
11
5
  import { UniversalLink } from '@plone/volto/components';
12
6
  import { flattenToAppURL } from '@plone/volto/helpers';
@@ -31,30 +25,35 @@ const messages = defineMessages({
31
25
  const SubEvent = ({ event, show_image }) => {
32
26
  const intl = useIntl();
33
27
  const Image = config.getComponent({ name: 'Image' }).component;
28
+ const hasImage = event.image_field || event.preview_image || event.image;
34
29
  return event ? (
35
30
  <div className="card-wrapper card-teaser">
36
31
  <Card noWrapper className="card no-after shadow rounded">
37
- {show_image &&
38
- (event.image_field || event.preview_image || event.image) && (
39
- <div className="img-responsive-wrapper">
40
- <div className="img-responsive">
41
- <figure class="volto-image img-wrapper responsive">
42
- <Image
43
- item={event}
44
- alt={intl.formatMessage(messages.immagine)}
45
- loading="lazy"
46
- sizes="(max-width:320px) 300px, (max-width:425px) 400px, (max-width:768px) 600px, 300px"
47
- />
48
- </figure>
49
- {event.start && (
50
- <div className="card-calendar d-flex flex-column justify-content-center">
51
- {viewDate(intl.locale, event.start, 'DD MMM')}
52
- </div>
53
- )}
54
- </div>
32
+ {show_image && hasImage && (
33
+ <div className="img-responsive-wrapper">
34
+ <div className="img-responsive">
35
+ <figure class="volto-image img-wrapper responsive">
36
+ <Image
37
+ item={event}
38
+ alt={intl.formatMessage(messages.immagine)}
39
+ loading="lazy"
40
+ sizes="(max-width:320px) 300px, (max-width:425px) 400px, (max-width:768px) 600px, 300px"
41
+ />
42
+ </figure>
43
+ {event.start && (
44
+ <div className="card-calendar d-flex flex-column justify-content-center">
45
+ {viewDate(intl.locale, event.start, 'DD MMM')}
46
+ </div>
47
+ )}
55
48
  </div>
56
- )}
49
+ </div>
50
+ )}
57
51
  <CardBody>
52
+ {event.start && (!show_image || (show_image && !hasImage)) && (
53
+ <div className="category-top mb-2">
54
+ {viewDate(intl.locale, event.start, 'DD MMM YYYY')}
55
+ </div>
56
+ )}
58
57
  <CardTitle className="h5">
59
58
  <UniversalLink
60
59
  href={flattenToAppURL(event['@id'])}
@@ -64,7 +63,6 @@ const SubEvent = ({ event, show_image }) => {
64
63
  {event.title}
65
64
  </UniversalLink>
66
65
  </CardTitle>
67
- <CardText> </CardText>
68
66
  <CardReadMore
69
67
  iconName="it-arrow-right"
70
68
  tag={UniversalLink}
@@ -32,6 +32,10 @@ const messages = defineMessages({
32
32
  id: 'parteciperanno',
33
33
  defaultMessage: 'Parteciperanno',
34
34
  },
35
+ tipologia_evento: {
36
+ id: 'tipologia_evento',
37
+ defaultMessage: 'Tipo evento',
38
+ },
35
39
  });
36
40
 
37
41
  const EventoCosE = ({ content }) => {
@@ -41,7 +45,8 @@ const EventoCosE = ({ content }) => {
41
45
  contentFolderHasItems(content, 'immagini') ||
42
46
  contentFolderHasItems(content, 'video') ||
43
47
  content?.persone_amministrazione?.length > 0 ||
44
- richTextHasContent(content?.descrizione_destinatari) ? (
48
+ richTextHasContent(content?.descrizione_destinatari) ||
49
+ content?.tipologia_evento ? (
45
50
  <RichTextSection
46
51
  tag_id={'text-body'}
47
52
  title={intl.formatMessage(messages.cos_e)}
@@ -79,7 +84,6 @@ const EventoCosE = ({ content }) => {
79
84
  className="mt-4 pb-4"
80
85
  />
81
86
  <Gallery content={content} folder_name={'video'} />
82
-
83
87
  {richTextHasContent(content?.descrizione_destinatari) && (
84
88
  <div className="mb-5 pt-2">
85
89
  <RichText
@@ -88,6 +92,17 @@ const EventoCosE = ({ content }) => {
88
92
  />
89
93
  </div>
90
94
  )}
95
+
96
+ {content?.tipologia_evento && (
97
+ <div className="mb-5 pt-2">
98
+ <h3 className="tipologia-section h5">
99
+ {intl.formatMessage(messages.tipologia_evento)}
100
+ </h3>
101
+ <p key={content?.tipologia_evento?.token} className="font-serif">
102
+ {content?.tipologia_evento?.title}
103
+ </p>
104
+ </div>
105
+ )}
91
106
  </RichTextSection>
92
107
  ) : (
93
108
  <></>
@@ -43,10 +43,16 @@ const messages = defineMessages({
43
43
  id: 'spese_elettorali',
44
44
  defaultMessage: 'Spese elettorali',
45
45
  },
46
+
46
47
  variazione_situazione_patrimoniale: {
47
48
  id: 'variazione_situazione_patrimoniale',
48
49
  defaultMessage: 'Variazione situazione patrimoniale',
49
50
  },
51
+
52
+ altri_documenti_persona: {
53
+ id: 'altri_documenti_persona',
54
+ defaultMessage: 'Altri documenti',
55
+ },
50
56
  });
51
57
 
52
58
  const PersonaDocumenti = ({ content }) => {
@@ -186,6 +192,20 @@ const PersonaDocumenti = ({ content }) => {
186
192
  />
187
193
  </RichTextSection>
188
194
  )}
195
+ {contentFolderHasItems(content, 'altri-documenti') && (
196
+ <RichTextSection
197
+ tag_id="documenti-altri-documenti"
198
+ title={intl.formatMessage(messages.altri_documenti_persona)}
199
+ >
200
+ <Attachments
201
+ content={content}
202
+ folder_name={'altri-documenti'}
203
+ // title={intl.formatMessage(messages.altri_documenti_persona)}
204
+ as_section={false}
205
+ />
206
+ </RichTextSection>
207
+ )}
208
+
189
209
  </>
190
210
  );
191
211
  };
@@ -23,7 +23,7 @@ defineMessages({
23
23
  },
24
24
  rrule_on_the: {
25
25
  id: 'rrule_on the',
26
- defaultMessage: 'il',
26
+ defaultMessage: 'di',
27
27
  },
28
28
  weekdays: {
29
29
  id: 'rrule_weekdays',
@@ -9,9 +9,6 @@
9
9
  }
10
10
 
11
11
  .event-recurrences-more {
12
- position: absolute;
13
- bottom: $v-gap * 8;
14
-
15
12
  display: flex;
16
13
  align-items: center;
17
14
  color: $body-color;
@@ -22,4 +22,8 @@ body.contenttype-event {
22
22
  }
23
23
  }
24
24
  }
25
+
26
+ &.cms-ui .ui.button {
27
+ padding: 0px;
28
+ }
25
29
  }