Skip to content

Commit

Permalink
Merge branch 'main' into 12.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Mar 19, 2024
2 parents bc02bb8 + 01b331e commit 14efbfa
Show file tree
Hide file tree
Showing 18 changed files with 430 additions and 15 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
## [11.0.0-alpha.2](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.0.0-alpha.1...v11.0.0-alpha.2) (2023-11-29)

## [11.8.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.7.0...v11.8.0) (2024-03-19)


### Features

* added download link to filename in file widget ([#587](https://github.com/redturtle/design-comuni-plone-theme/issues/587)) ([96649e2](https://github.com/redturtle/design-comuni-plone-theme/commit/96649e29e79a7b71bf93a27406baa4fc1994a213))
* print styles for UO ([#581](https://github.com/redturtle/design-comuni-plone-theme/issues/581)) ([91b4752](https://github.com/redturtle/design-comuni-plone-theme/commit/91b47526b69b0957eba6c8e803798f4b3ffcf9bb))
* TextWidget to add alt text to image ([#573](https://github.com/redturtle/design-comuni-plone-theme/issues/573)) ([d183f27](https://github.com/redturtle/design-comuni-plone-theme/commit/d183f2749a2604ebecb0f0df09ec8770d84c7f59))
* updated volto-form-block with email validation ([#596](https://github.com/redturtle/design-comuni-plone-theme/issues/596)) ([c21f65b](https://github.com/redturtle/design-comuni-plone-theme/commit/c21f65bc7e54d2fa092ae4bcfbfd1c99670cab5c))


### Bug Fixes

* link in header doesn't change color when inside cms-ui ([#583](https://github.com/redturtle/design-comuni-plone-theme/issues/583)) ([d076b0a](https://github.com/redturtle/design-comuni-plone-theme/commit/d076b0a540cf3de3c9f7f08cefca27eff3917f70))
* updated volto-querywidget-with-browser to fix infinite loops on lost reference ([#599](https://github.com/redturtle/design-comuni-plone-theme/issues/599)) ([c6d4cb6](https://github.com/redturtle/design-comuni-plone-theme/commit/c6d4cb6b51447514fedf2938f40031e42779644e))
* view form block ([5ff7ea7](https://github.com/redturtle/design-comuni-plone-theme/commit/5ff7ea70474963e3dca126a44d531cc4dc17be74))


### Maintenance

* updated volto-form-block to fix view form ([80a6586](https://github.com/redturtle/design-comuni-plone-theme/commit/80a6586ac7d458c46efe51bcc4fa4a9cb3b8d619))


### Documentation

* updated publiccode and release log ([3c52c12](https://github.com/redturtle/design-comuni-plone-theme/commit/3c52c12edfed3c12a4fdac212b9f229644bf913f))

## [11.7.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.6.2...v11.7.0) (2024-03-15)


Expand Down
11 changes: 11 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@
- ...
-->

## Versione 11.8.0 (19/03/2024)

### Migliorie

- Gli stili del tipo di contenuto Unità Organizzativa sono stati ottimizzati per la stampa.

### Novità

- È possibile scaricare il file o l'immagine caricata dal widget di upload file cliccando sul nome del file stesso.
- È possibile aggiungere un testo alternativo per l'immagine del blocco Card con Immagine.

## Versione 11.7.0 (15/03/2024)

### Novità
Expand Down
5 changes: 5 additions & 0 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,11 @@ msgstr ""
msgid "allegati"
msgstr ""

#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
# defaultMessage: Testo alternativo per l'immagine
msgid "altText"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
# defaultMessage: Altre cariche
msgid "altre_cariche"
Expand Down
5 changes: 5 additions & 0 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,11 @@ msgstr "All topics"
msgid "allegati"
msgstr "Attached documents"

#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
# defaultMessage: Testo alternativo per l'immagine
msgid "altText"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
# defaultMessage: Altre cariche
msgid "altre_cariche"
Expand Down
5 changes: 5 additions & 0 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,11 @@ msgstr "Todos los temas"
msgid "allegati"
msgstr "Documentos adjuntos"

#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
# defaultMessage: Testo alternativo per l'immagine
msgid "altText"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
# defaultMessage: Altre cariche
msgid "altre_cariche"
Expand Down
5 changes: 5 additions & 0 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,11 @@ msgstr "Tous les sujets"
msgid "allegati"
msgstr "Documents attachés"

#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
# defaultMessage: Testo alternativo per l'immagine
msgid "altText"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
# defaultMessage: Altre cariche
msgid "altre_cariche"
Expand Down
5 changes: 5 additions & 0 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,11 @@ msgstr "Tutti gli argomenti"
msgid "allegati"
msgstr "Documenti allegati"

#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
# defaultMessage: Testo alternativo per l'immagine
msgid "altText"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
# defaultMessage: Altre cariche
msgid "altre_cariche"
Expand Down
9 changes: 7 additions & 2 deletions locales/volto.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2024-03-06T12:52:11.880Z\n"
"POT-Creation-Date: 2024-03-07T15:23:38.346Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -800,6 +800,11 @@ msgstr ""
msgid "allegati"
msgstr ""

#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
# defaultMessage: Testo alternativo per l'immagine
msgid "altText"
msgstr ""

#: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
# defaultMessage: Altre cariche
msgid "altre_cariche"
Expand Down Expand Up @@ -3341,7 +3346,7 @@ msgid "search_startDate"
msgstr ""

#: helpers/Translations/searchBlockExtendedTranslations
# defaultMessage: Ricerca per: <em>{searchedtext}</em>.
# defaultMessage: Ricerca per: <em>{searchedtext}</em>.
msgid "searchedFor"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"volto-gdpr-privacy": "collective/volto-gdpr-privacy#f91d3e6bcea028d3cbd4994cae25d72878112588",
"volto-google-analytics": "2.0.0",
"volto-multilingual-widget": "3.0.0",
"volto-querywidget-with-browser": "0.4.1",
"volto-querywidget-with-browser": "0.4.2",
"volto-rss-block": "3.0.0",
"volto-secondarymenu": "4.0.0",
"volto-social-settings": "3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions publiccode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ maintenance:
name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
platforms:
- web
releaseDate: '2024-03-15'
releaseDate: '2024-03-19'
softwareType: standalone/web
softwareVersion: 11.7.0
softwareVersion: 11.8.0
url: 'https://github.com/italia/design-comuni-plone-theme'
usedBy:
- ASP Comuni Modenesi Area Nord
Expand Down
18 changes: 14 additions & 4 deletions src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const messages = defineMessages({
},
});

const renderImage = (image, showImage, sizeNatural) =>
const renderImage = (image, showImage, sizeNatural, altText = '') =>
showImage && image ? (
<div className="img-responsive-wrapper">
<div
Expand All @@ -35,7 +35,7 @@ const renderImage = (image, showImage, sizeNatural) =>
<figure className="img-wrapper">
<img
src={`data:${image['content-type']};${image.encoding},${image.data}`}
alt=""
alt={altText}
aria-hidden="true"
loading="lazy"
/>
Expand Down Expand Up @@ -89,7 +89,12 @@ const Block = (props) => {
>
{hasImage && (
<Col className="my-1 px-0" key={'col-0'}>
{renderImage(data?.image, hasImage, data?.sizeNatural)}
{renderImage(
data?.image,
hasImage,
data?.sizeNatural,
data?.altText,
)}
</Col>
)}
<div
Expand Down Expand Up @@ -140,7 +145,12 @@ const Block = (props) => {
})}
>
<Col className="my-1 p-0" key={'col-0'} data-testid={'col-0'}>
{renderImage(data?.image, hasImage, data?.sizeNatural)}
{renderImage(
data?.image,
hasImage,
data?.sizeNatural,
data?.altText,
)}
</Col>
<div
key={'col-1'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
FileWidget,
CheckboxWidget,
FormFieldWrapper,
TextWidget,
} from '@plone/volto/components';
import ImageSizeWidget from '@plone/volto/components/manage/Widgets/ImageSizeWidget';

Expand Down Expand Up @@ -44,6 +45,10 @@ const messages = defineMessages({
id: 'Grande',
defaultMessage: 'Grande',
},
altText: {
id: 'altText',
defaultMessage: "Testo alternativo per l'immagine",
},
});

const Sidebar = ({ data, block, onChangeBlock }) => {
Expand Down Expand Up @@ -105,6 +110,14 @@ const Sidebar = ({ data, block, onChangeBlock }) => {
value={data.sizeImage || 's'}
/>
</FormFieldWrapper>
<TextWidget
id="altText"
title={intl.formatMessage(messages.altText)}
value={data.altText}
onChange={(name, value) => {
onChangeBlock({ ...data, altText: value });
}}
/>
</Accordion.Content>
</Accordion>
</Segment.Group>
Expand Down
Loading

0 comments on commit 14efbfa

Please sign in to comment.