diff --git a/RELEASE.md b/RELEASE.md index 3046d0cbc..cf35f6503 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -30,11 +30,17 @@ - ... --> + ## Versione X.X.X (dd/mm/yyyy) +### Migliorie + +- Nel template Blocco link solo immagini con link esterni, icona accessibilità per link esterni ora è disattivabile attraverso opzione del template + ### Fix - sistemati gli oggetti link che puntano a file nella Cartella Modulistica - - Sistemato l'allineamento degli elementi nel blocco Contatti: se ci sono meno di tre elementi l'allineamento è centrato, se ce ne sono più di 3 l'allineamento è a sinistra. - Migliorata accessibilità del calendario nel blocco ricerca Eventi e ricerca Bandi +- Fissato il layout del template Blocco link solo immagini con link esterni, posizionata l'icona di accessibilità per link esterni in overlay se presente + diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 8dad5869d..9ab00ad64 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -2633,6 +2633,11 @@ msgstr "" msgid "other_info" msgstr "" +#: config/Blocks/ListingOptions/smallBlockLinksTemplate +# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni +msgid "override_links_accessibility_marker" +msgstr "Barrierefreiheitssymbol nicht für Links anzeigen, die auf externe Websites oder Ressourcen verweisen" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields # defaultMessage: Pagamenti previsti e modalità msgid "pagamenti" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index f2dc79fea..192f672cc 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -2618,6 +2618,11 @@ msgstr "Ohter topics" msgid "other_info" msgstr "Further information" +#: config/Blocks/ListingOptions/smallBlockLinksTemplate +# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni +msgid "override_links_accessibility_marker" +msgstr "Do not show accessibility icon for links pointing to external websites or resources" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields # defaultMessage: Pagamenti previsti e modalità msgid "pagamenti" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 816699c18..a72bfc35c 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -2627,6 +2627,11 @@ msgstr "Otros temas" msgid "other_info" msgstr "Más información" +#: config/Blocks/ListingOptions/smallBlockLinksTemplate +# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni +msgid "override_links_accessibility_marker" +msgstr "No mostrar el ícono de accesibilidad para enlaces que apuntan a sitios web o recursos externos" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields # defaultMessage: Pagamenti previsti e modalità msgid "pagamenti" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 054e46762..b9ae8a9ce 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -2635,6 +2635,11 @@ msgstr "Autres sujets" msgid "other_info" msgstr "Informations complémentaires" +#: config/Blocks/ListingOptions/smallBlockLinksTemplate +# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni +msgid "override_links_accessibility_marker" +msgstr "Ne pas afficher l'icône d'accessibilité pour les liens pointant vers des sites Web ou des ressources externes" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields # defaultMessage: Pagamenti previsti e modalità msgid "pagamenti" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index f326683c8..f84d2fa19 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -2618,6 +2618,11 @@ msgstr "Altri argomenti" msgid "other_info" msgstr "Ulteriori informazioni" +#: config/Blocks/ListingOptions/smallBlockLinksTemplate +# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni +msgid "override_links_accessibility_marker" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields # defaultMessage: Pagamenti previsti e modalità msgid "pagamenti" diff --git a/locales/volto.pot b/locales/volto.pot index fa540a485..710d446aa 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2023-08-28T07:32:02.134Z\n" +"POT-Creation-Date: 2023-09-18T12:53:30.989Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -2620,6 +2620,11 @@ msgstr "" msgid "other_info" msgstr "" +#: config/Blocks/ListingOptions/smallBlockLinksTemplate +# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni +msgid "override_links_accessibility_marker" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields # defaultMessage: Pagamenti previsti e modalità msgid "pagamenti" diff --git a/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx index f30da3337..62775a060 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx @@ -19,6 +19,7 @@ const SmallBlockLinksTemplate = ({ linkHref, titleLine, linkmore_id_lighthouse, + override_links_accessibility_marker, }) => { return (
@@ -48,6 +49,9 @@ const SmallBlockLinksTemplate = ({ item={!isEditMode ? item : null} href={isEditMode ? '#' : ''} className="img-link" + overrideMarkSpecialLinks={ + override_links_accessibility_marker + } > {image} diff --git a/src/config/Blocks/ListingOptions/index.js b/src/config/Blocks/ListingOptions/index.js index 33cbb9ccd..caab64e02 100644 --- a/src/config/Blocks/ListingOptions/index.js +++ b/src/config/Blocks/ListingOptions/index.js @@ -21,3 +21,4 @@ export { addSliderTemplateOptions } from 'design-comuni-plone-theme/config/Block export { addSimpleListTemplateOptions } from 'design-comuni-plone-theme/config/Blocks/ListingOptions/simpleListTemplate'; export { addCardWithSlideUpTextTemplateOptions } from 'design-comuni-plone-theme/config/Blocks/ListingOptions/cardWithSlideUpTextTemplate'; export { addPhotogalleryTemplateOptions } from 'design-comuni-plone-theme/config/Blocks/ListingOptions/photogalleryTemplate'; +export { addSmallBlockLinksTemplateOptions } from 'design-comuni-plone-theme/config/Blocks/ListingOptions/smallBlockLinksTemplate'; diff --git a/src/config/Blocks/ListingOptions/smallBlockLinksTemplate.js b/src/config/Blocks/ListingOptions/smallBlockLinksTemplate.js new file mode 100644 index 000000000..227596ebd --- /dev/null +++ b/src/config/Blocks/ListingOptions/smallBlockLinksTemplate.js @@ -0,0 +1,32 @@ +import { defineMessages } from 'react-intl'; + +import { addSchemaField } from 'design-comuni-plone-theme/config/Blocks/ListingOptions'; + +const messages = defineMessages({ + override_links_accessibility_marker: { + id: 'override_links_accessibility_marker', + defaultMessage: + "Non mostrare l'icona di accessibilità per i link a siti esterni", + }, +}); + +export const addSmallBlockLinksTemplateOptions = ( + schema, + formData, + intl, + position = 0, +) => { + let pos = position; + + addSchemaField( + schema, + 'override_links_accessibility_marker', + intl.formatMessage(messages.override_links_accessibility_marker), + null, + { type: 'boolean' }, + pos, + ); + pos++; + + return pos; +}; diff --git a/src/config/Blocks/listingVariations.js b/src/config/Blocks/listingVariations.js index fee918af3..0be7c3197 100644 --- a/src/config/Blocks/listingVariations.js +++ b/src/config/Blocks/listingVariations.js @@ -59,6 +59,7 @@ import { addCardWithSlideUpTextTemplateOptions, addPhotogalleryTemplateOptions, addLinkMoreOptions, + addSmallBlockLinksTemplateOptions, cloneBlock, } from 'design-comuni-plone-theme/config/Blocks/ListingOptions'; @@ -178,7 +179,8 @@ const italiaListingVariations = [ template: SmallBlockLinksTemplate, skeleton: SmallBlockLinksTemplateSkeleton, schemaEnhancer: ({ schema, formData, intl }) => { - /*let pos = */ addDefaultOptions(schema, formData, intl); + let pos = addDefaultOptions(schema, formData, intl); + addSmallBlockLinksTemplateOptions(schema, formData, intl, pos); addLinkMoreOptions(schema, formData, intl); return schema; }, diff --git a/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx b/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx index 8cb9c998e..baea0b2ec 100644 --- a/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +++ b/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx @@ -30,6 +30,7 @@ const UniversalLink = ({ children, className = null, title = null, + overrideMarkSpecialLinks = false, ...props }) => { const intl = useIntl(); @@ -116,14 +117,15 @@ const UniversalLink = ({ {...props} > {children} - {config.settings.siteProperties.markSpecialLinks && ( - - )} + {!overrideMarkSpecialLinks && + config.settings.siteProperties.markSpecialLinks && ( + + )} ); } else if (isDownload) { diff --git a/src/theme/ItaliaTheme/Blocks/_smallblockLinkstemplate.scss b/src/theme/ItaliaTheme/Blocks/_smallblockLinkstemplate.scss index 06f93fc27..a51597ded 100644 --- a/src/theme/ItaliaTheme/Blocks/_smallblockLinkstemplate.scss +++ b/src/theme/ItaliaTheme/Blocks/_smallblockLinkstemplate.scss @@ -15,13 +15,20 @@ border: 8px solid $white; background: $white; box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.1); + position: relative; + + .img-link svg { + position: absolute; + top: 4px; + right: 4px; + z-index: 2; + } .volto-image.responsive img, .img-skeleton { width: auto; max-width: 100%; object-fit: contain; - } .img-skeleton {