diff --git a/RELEASE.md b/RELEASE.md index f73a661b5..3050fa8b8 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,12 @@ - ... --> +## Versione X.X.X (dd/mm/yyyy) + +### Novità + +- Aggiunta la possibilità di selezionare la dimensione dell'immagine nel blocco Alert, inoltre è stato aggiornato anche il widget per la selezione del colore di sfondo. + ## Versione 10.3.0 (08/11/2023) ### Fix diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 3d4d837d3..765780f51 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -86,6 +86,7 @@ msgstr "" msgid "CardImageRight" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar #: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar # defaultMessage: Dimensione immagine msgid "CardImageSize" @@ -133,21 +134,6 @@ msgstr "" msgid "Color" msgstr "" -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Rosso -msgid "Color_danger" -msgstr "" - -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Giallo -msgid "Color_warning" -msgstr "" - -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Arancione -msgid "Color_warning_orange" -msgstr "" - #: components/ItaliaTheme/View/EventoView/EventoContatti # defaultMessage: Contatti msgid "Contatti" @@ -1217,6 +1203,16 @@ msgstr "" msgid "codice_ipa" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Rosso +msgid "color_danger" +msgstr "" + +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Arancione +msgid "color_orange" +msgstr "" + #: components/ItaliaTheme/Blocks/ContactsBlock/Sidebar #: components/ItaliaTheme/Blocks/HighlightedContent/Sidebar # defaultMessage: Primario @@ -1228,6 +1224,11 @@ msgstr "" msgid "color_transparent" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Giallo +msgid "color_warning" +msgstr "" + #: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti #: components/ItaliaTheme/View/PersonaView/PersonaRuolo diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 28903bbed..f2c307fdc 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -71,6 +71,7 @@ msgstr "Show" msgid "CardImageRight" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar #: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar # defaultMessage: Dimensione immagine msgid "CardImageSize" @@ -118,21 +119,6 @@ msgstr "Click here to replace file" msgid "Color" msgstr "" -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Rosso -msgid "Color_danger" -msgstr "" - -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Giallo -msgid "Color_warning" -msgstr "" - -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Arancione -msgid "Color_warning_orange" -msgstr "" - #: components/ItaliaTheme/View/EventoView/EventoContatti # defaultMessage: Contatti msgid "Contatti" @@ -1202,6 +1188,16 @@ msgstr "Close search" msgid "codice_ipa" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Rosso +msgid "color_danger" +msgstr "" + +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Arancione +msgid "color_orange" +msgstr "" + #: components/ItaliaTheme/Blocks/ContactsBlock/Sidebar #: components/ItaliaTheme/Blocks/HighlightedContent/Sidebar # defaultMessage: Primario @@ -1213,6 +1209,11 @@ msgstr "" msgid "color_transparent" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Giallo +msgid "color_warning" +msgstr "" + #: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti #: components/ItaliaTheme/View/PersonaView/PersonaRuolo diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 43f011312..6721b5025 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -80,6 +80,7 @@ msgstr "Ver" msgid "CardImageRight" msgstr "Alinear imagen a la derecha" +#: components/ItaliaTheme/Blocks/Alert/Sidebar #: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar # defaultMessage: Dimensione immagine msgid "CardImageSize" @@ -127,21 +128,6 @@ msgstr "Haga clic aquí para reemplazar el archivo" msgid "Color" msgstr "Color" -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Rosso -msgid "Color_danger" -msgstr "" - -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Giallo -msgid "Color_warning" -msgstr "" - -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Arancione -msgid "Color_warning_orange" -msgstr "" - #: components/ItaliaTheme/View/EventoView/EventoContatti # defaultMessage: Contatti msgid "Contatti" @@ -1211,6 +1197,16 @@ msgstr "Cerrar búsqueda" msgid "codice_ipa" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Rosso +msgid "color_danger" +msgstr "" + +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Arancione +msgid "color_orange" +msgstr "" + #: components/ItaliaTheme/Blocks/ContactsBlock/Sidebar #: components/ItaliaTheme/Blocks/HighlightedContent/Sidebar # defaultMessage: Primario @@ -1222,6 +1218,11 @@ msgstr "Primario" msgid "color_transparent" msgstr "Transparente" +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Giallo +msgid "color_warning" +msgstr "" + #: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti #: components/ItaliaTheme/View/PersonaView/PersonaRuolo diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 4722ddbdf..d3d069cd8 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -88,6 +88,7 @@ msgstr "Voir" msgid "CardImageRight" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar #: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar # defaultMessage: Dimensione immagine msgid "CardImageSize" @@ -135,21 +136,6 @@ msgstr "Cliquez ici pour remplacer le fichier" msgid "Color" msgstr "" -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Rosso -msgid "Color_danger" -msgstr "" - -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Giallo -msgid "Color_warning" -msgstr "" - -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Arancione -msgid "Color_warning_orange" -msgstr "" - #: components/ItaliaTheme/View/EventoView/EventoContatti # defaultMessage: Contatti msgid "Contatti" @@ -1219,6 +1205,16 @@ msgstr "Fermer la recherche" msgid "codice_ipa" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Rosso +msgid "color_danger" +msgstr "" + +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Arancione +msgid "color_orange" +msgstr "" + #: components/ItaliaTheme/Blocks/ContactsBlock/Sidebar #: components/ItaliaTheme/Blocks/HighlightedContent/Sidebar # defaultMessage: Primario @@ -1230,6 +1226,11 @@ msgstr "" msgid "color_transparent" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Giallo +msgid "color_warning" +msgstr "" + #: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti #: components/ItaliaTheme/View/PersonaView/PersonaRuolo diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index fa9021030..aa4d92561 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -71,6 +71,7 @@ msgstr "Vedi" msgid "CardImageRight" msgstr "Allinea immagine a destra" +#: components/ItaliaTheme/Blocks/Alert/Sidebar #: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar # defaultMessage: Dimensione immagine msgid "CardImageSize" @@ -118,21 +119,6 @@ msgstr "Clicca qui per sostituire il file" msgid "Color" msgstr "Colore" -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Rosso -msgid "Color_danger" -msgstr "Rosso" - -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Giallo -msgid "Color_warning" -msgstr "Giallo" - -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Arancione -msgid "Color_warning_orange" -msgstr "Arancione" - #: components/ItaliaTheme/View/EventoView/EventoContatti # defaultMessage: Contatti msgid "Contatti" @@ -1202,6 +1188,16 @@ msgstr "Chiudi ricerca" msgid "codice_ipa" msgstr "Codice dell'ente erogatore (ipa)" +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Rosso +msgid "color_danger" +msgstr "" + +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Arancione +msgid "color_orange" +msgstr "" + #: components/ItaliaTheme/Blocks/ContactsBlock/Sidebar #: components/ItaliaTheme/Blocks/HighlightedContent/Sidebar # defaultMessage: Primario @@ -1213,6 +1209,11 @@ msgstr "Colore primario" msgid "color_transparent" msgstr "Trasparente" +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Giallo +msgid "color_warning" +msgstr "" + #: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti #: components/ItaliaTheme/View/PersonaView/PersonaRuolo diff --git a/locales/volto.pot b/locales/volto.pot index 207c3929e..20f9a4396 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2023-11-07T16:35:33.634Z\n" +"POT-Creation-Date: 2023-11-08T17:11:37.097Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -73,6 +73,7 @@ msgstr "" msgid "CardImageRight" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar #: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar # defaultMessage: Dimensione immagine msgid "CardImageSize" @@ -120,21 +121,6 @@ msgstr "" msgid "Color" msgstr "" -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Rosso -msgid "Color_danger" -msgstr "" - -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Giallo -msgid "Color_warning" -msgstr "" - -#: components/ItaliaTheme/Blocks/Alert/Sidebar -# defaultMessage: Arancione -msgid "Color_warning_orange" -msgstr "" - #: components/ItaliaTheme/View/EventoView/EventoContatti # defaultMessage: Contatti msgid "Contatti" @@ -1204,6 +1190,16 @@ msgstr "" msgid "codice_ipa" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Rosso +msgid "color_danger" +msgstr "" + +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Arancione +msgid "color_orange" +msgstr "" + #: components/ItaliaTheme/Blocks/ContactsBlock/Sidebar #: components/ItaliaTheme/Blocks/HighlightedContent/Sidebar # defaultMessage: Primario @@ -1215,6 +1211,11 @@ msgstr "" msgid "color_transparent" msgstr "" +#: components/ItaliaTheme/Blocks/Alert/Sidebar +# defaultMessage: Giallo +msgid "color_warning" +msgstr "" + #: components/ItaliaTheme/View/IncaricoView/IncaricoView #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti #: components/ItaliaTheme/View/PersonaView/PersonaRuolo diff --git a/src/components/ItaliaTheme/Blocks/Alert/Edit.jsx b/src/components/ItaliaTheme/Blocks/Alert/Edit.jsx index f84612fc0..f8c7d261b 100644 --- a/src/components/ItaliaTheme/Blocks/Alert/Edit.jsx +++ b/src/components/ItaliaTheme/Blocks/Alert/Edit.jsx @@ -59,8 +59,8 @@ class Edit extends Component { constructor(props) { super(props); - if (!this.props.data.color) { - this.props.data.color = 'warning'; + if (!this.props.data.bg_color) { + this.props.data.bg_color = 'warning'; } this.blockNode = React.createRef(); } @@ -78,8 +78,8 @@ class Edit extends Component { > @@ -89,7 +89,11 @@ class Edit extends Component { )} diff --git a/src/components/ItaliaTheme/Blocks/Alert/Sidebar.jsx b/src/components/ItaliaTheme/Blocks/Alert/Sidebar.jsx index a852980a0..8d3a6042c 100644 --- a/src/components/ItaliaTheme/Blocks/Alert/Sidebar.jsx +++ b/src/components/ItaliaTheme/Blocks/Alert/Sidebar.jsx @@ -1,31 +1,36 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { Form } from 'semantic-ui-react'; -import { Button, Grid, Segment } from 'semantic-ui-react'; +import { Segment } from 'semantic-ui-react'; import { defineMessages, FormattedMessage, injectIntl } from 'react-intl'; import { FileWidget } from '@plone/volto/components'; +import { ColorListWidget } from 'design-comuni-plone-theme/components/ItaliaTheme'; +import ImageSizeWidget from '@plone/volto/components/manage/Widgets/ImageSizeWidget'; const messages = defineMessages({ Color: { id: 'Color', defaultMessage: 'Colore', }, - Color_warning: { - id: 'Color_warning', + color_warning: { + id: 'color_warning', defaultMessage: 'Giallo', }, - Color_warning_orange: { - id: 'Color_warning_orange', + color_orange: { + id: 'color_orange', defaultMessage: 'Arancione', }, - Color_danger: { - id: 'Color_danger', + color_danger: { + id: 'color_danger', defaultMessage: 'Rosso', }, Image: { id: 'Image', defaultMessage: 'Immagine', }, + CardImageSize: { + id: 'CardImageSize', + defaultMessage: 'Dimensione immagine', + }, }); class Sidebar extends Component { @@ -37,6 +42,21 @@ class Sidebar extends Component { }; render() { + const bg_colors = [ + { + name: 'info', + label: this.props.intl.formatMessage(messages.color_warning), + }, + { + name: 'warning', + label: this.props.intl.formatMessage(messages.color_orange), + }, + { + name: 'danger', + label: this.props.intl.formatMessage(messages.color_danger), + }, + ]; + return (
@@ -46,74 +66,18 @@ class Sidebar extends Component {
- - - - -
- -
-
- - -