From ba75e5b4c403f362fbabd7e8638c5871832cf115 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:05:20 +0100 Subject: [PATCH] feat: added checkbox for showing image for all cards in eventsSearch (#815) * feat: added checkbox for showing image for all cards in eventsSearch * feat: added checkbox for showing image for all cards in uo search * chore: release.md info * fix: value for checkbox widgets in uoSearch and eventsSearch sidebar --- RELEASE.md | 2 +- locales/de/LC_MESSAGES/volto.po | 6 ++++++ locales/en/LC_MESSAGES/volto.po | 6 ++++++ locales/es/LC_MESSAGES/volto.po | 6 ++++++ locales/fr/LC_MESSAGES/volto.po | 6 ++++++ locales/it/LC_MESSAGES/volto.po | 6 ++++++ locales/volto.pot | 8 ++++++- .../ItaliaTheme/Blocks/EventSearch/Body.jsx | 6 +++++- .../Blocks/EventSearch/Sidebar.jsx | 21 ++++++++++++++----- .../ItaliaTheme/Blocks/UOSearch/Body.jsx | 6 +++++- .../ItaliaTheme/Blocks/UOSearch/Sidebar.jsx | 16 ++++++++++++++ 11 files changed, 80 insertions(+), 9 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 3dd9394ff..6f9d3e197 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -49,7 +49,7 @@ ### Novità -- ... +- E' ora possibile decidere se mostrare l'immagine di anteprima per tutte le card nel blocco di ricerca Evento e Unità Organizzativa. ### Fix diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 6345e4db6..e8d5b7970 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -3188,6 +3188,12 @@ msgstr "" msgid "searchBlock" msgstr "" +#: components/ItaliaTheme/Blocks/EventSearch/Sidebar +#: components/ItaliaTheme/Blocks/UOSearch/Sidebar +# defaultMessage: Mostra l'immagine per tutti gli elementi +msgid "searchBlock_always_show_image" +msgstr "" + #: components/ItaliaTheme/Blocks/BandiSearch/Sidebar #: components/ItaliaTheme/Blocks/EventSearch/Sidebar #: components/ItaliaTheme/Blocks/UOSearch/Sidebar diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 1c2324df0..569e9d0e6 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -3173,6 +3173,12 @@ msgstr "Search by all topics" msgid "searchBlock" msgstr "" +#: components/ItaliaTheme/Blocks/EventSearch/Sidebar +#: components/ItaliaTheme/Blocks/UOSearch/Sidebar +# defaultMessage: Mostra l'immagine per tutti gli elementi +msgid "searchBlock_always_show_image" +msgstr "Show image for every card" + #: components/ItaliaTheme/Blocks/BandiSearch/Sidebar #: components/ItaliaTheme/Blocks/EventSearch/Sidebar #: components/ItaliaTheme/Blocks/UOSearch/Sidebar diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index b12904c6f..eb9583948 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -3182,6 +3182,12 @@ msgstr "Buscar por todos los temas" msgid "searchBlock" msgstr "Búsqueda de eventos" +#: components/ItaliaTheme/Blocks/EventSearch/Sidebar +#: components/ItaliaTheme/Blocks/UOSearch/Sidebar +# defaultMessage: Mostra l'immagine per tutti gli elementi +msgid "searchBlock_always_show_image" +msgstr "" + #: components/ItaliaTheme/Blocks/BandiSearch/Sidebar #: components/ItaliaTheme/Blocks/EventSearch/Sidebar #: components/ItaliaTheme/Blocks/UOSearch/Sidebar diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 850e1adfc..f9e046cc5 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -3190,6 +3190,12 @@ msgstr "Rechercher tous les sujets" msgid "searchBlock" msgstr "" +#: components/ItaliaTheme/Blocks/EventSearch/Sidebar +#: components/ItaliaTheme/Blocks/UOSearch/Sidebar +# defaultMessage: Mostra l'immagine per tutti gli elementi +msgid "searchBlock_always_show_image" +msgstr "" + #: components/ItaliaTheme/Blocks/BandiSearch/Sidebar #: components/ItaliaTheme/Blocks/EventSearch/Sidebar #: components/ItaliaTheme/Blocks/UOSearch/Sidebar diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 24298fd46..567f5aee9 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -3173,6 +3173,12 @@ msgstr "Cerca tutti gli argomenti" msgid "searchBlock" msgstr "Ricerca eventi" +#: components/ItaliaTheme/Blocks/EventSearch/Sidebar +#: components/ItaliaTheme/Blocks/UOSearch/Sidebar +# defaultMessage: Mostra l'immagine per tutti gli elementi +msgid "searchBlock_always_show_image" +msgstr "" + #: components/ItaliaTheme/Blocks/BandiSearch/Sidebar #: components/ItaliaTheme/Blocks/EventSearch/Sidebar #: components/ItaliaTheme/Blocks/UOSearch/Sidebar diff --git a/locales/volto.pot b/locales/volto.pot index 7d56e8ad4..94c5c21a8 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-10-29T14:58:46.664Z\n" +"POT-Creation-Date: 2024-11-25T14:46:11.571Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -3175,6 +3175,12 @@ msgstr "" msgid "searchBlock" msgstr "" +#: components/ItaliaTheme/Blocks/EventSearch/Sidebar +#: components/ItaliaTheme/Blocks/UOSearch/Sidebar +# defaultMessage: Mostra l'immagine per tutti gli elementi +msgid "searchBlock_always_show_image" +msgstr "" + #: components/ItaliaTheme/Blocks/BandiSearch/Sidebar #: components/ItaliaTheme/Blocks/EventSearch/Sidebar #: components/ItaliaTheme/Blocks/UOSearch/Sidebar diff --git a/src/components/ItaliaTheme/Blocks/EventSearch/Body.jsx b/src/components/ItaliaTheme/Blocks/EventSearch/Body.jsx index b1f38dbd7..5c6fb7aa7 100644 --- a/src/components/ItaliaTheme/Blocks/EventSearch/Body.jsx +++ b/src/components/ItaliaTheme/Blocks/EventSearch/Body.jsx @@ -234,7 +234,11 @@ const Body = ({ data, id, inEditMode, path, onChangeBlock }) => { items?.length > 0 ? (
- +
{querystringResults.total > b_size && ( { @@ -161,11 +165,18 @@ const Sidebar = (props) => { { + props.onChangeBlock(props.block, { + ...props.data, + [id]: value, + }); + }} + /> + { props.onChangeBlock(props.block, { ...props.data, diff --git a/src/components/ItaliaTheme/Blocks/UOSearch/Body.jsx b/src/components/ItaliaTheme/Blocks/UOSearch/Body.jsx index 26194f804..72c6377bc 100644 --- a/src/components/ItaliaTheme/Blocks/UOSearch/Body.jsx +++ b/src/components/ItaliaTheme/Blocks/UOSearch/Body.jsx @@ -211,7 +211,11 @@ const Body = ({ data, id, inEditMode, path, onChangeBlock }) => { items?.length > 0 ? (
- +
{querystringResults.total > b_size && ( { @@ -154,6 +159,17 @@ const Sidebar = (props) => { }} />
+ { + props.onChangeBlock(props.block, { + ...props.data, + [id]: value, + }); + }} + />