Skip to content

Commit

Permalink
feat: expandItems (v2) (#713)
Browse files Browse the repository at this point in the history
* feat: expandItems

* chore: label desc
  • Loading branch information
mamico authored Jul 1, 2024
1 parent 6ba4b94 commit c25fbba
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 23 deletions.
12 changes: 10 additions & 2 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,16 @@ msgstr ""
msgid "events"
msgstr ""

#: components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm
# defaultMessage: Expand items
msgid "expandItems"
msgstr ""

#: components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm
# defaultMessage: Uncheck to omit children items
msgid "expandItems_description"
msgstr ""

#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates
# defaultMessage: Scadenza
msgid "expire"
Expand Down Expand Up @@ -2147,7 +2157,6 @@ msgstr ""
msgid "info_color_tertiary"
msgstr ""

#: components/ItaliaTheme/Blocks/BandiSearch/Body
#: components/ItaliaTheme/Blocks/Calendar/Body
#: components/ItaliaTheme/Blocks/EventSearch/Body
#: components/ItaliaTheme/Blocks/UOSearch/Body
Expand Down Expand Up @@ -3707,7 +3716,6 @@ msgstr ""
msgid "variazione_situazione_patrimoniale"
msgstr ""

#: components/ItaliaTheme/Blocks/BandiSearch/Body
#: components/ItaliaTheme/Blocks/EventSearch/Body
#: components/ItaliaTheme/Blocks/EventSearch/DefaultFilters
#: components/ItaliaTheme/Blocks/UOSearch/Body
Expand Down
12 changes: 10 additions & 2 deletions locales/en/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,16 @@ msgstr "Event website"
msgid "events"
msgstr "Appointments"

#: components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm
# defaultMessage: Expand items
msgid "expandItems"
msgstr ""

#: components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm
# defaultMessage: Uncheck to omit children items
msgid "expandItems_description"
msgstr ""

#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates
# defaultMessage: Scadenza
msgid "expire"
Expand Down Expand Up @@ -2132,7 +2142,6 @@ msgstr ""
msgid "info_color_tertiary"
msgstr ""

#: components/ItaliaTheme/Blocks/BandiSearch/Body
#: components/ItaliaTheme/Blocks/Calendar/Body
#: components/ItaliaTheme/Blocks/EventSearch/Body
#: components/ItaliaTheme/Blocks/UOSearch/Body
Expand Down Expand Up @@ -3692,7 +3701,6 @@ msgstr "Type"
msgid "variazione_situazione_patrimoniale"
msgstr "Change in balance sheet"

#: components/ItaliaTheme/Blocks/BandiSearch/Body
#: components/ItaliaTheme/Blocks/EventSearch/Body
#: components/ItaliaTheme/Blocks/EventSearch/DefaultFilters
#: components/ItaliaTheme/Blocks/UOSearch/Body
Expand Down
12 changes: 10 additions & 2 deletions locales/es/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1939,6 +1939,16 @@ msgstr "Sitio web del evento"
msgid "events"
msgstr "Cita"

#: components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm
# defaultMessage: Expand items
msgid "expandItems"
msgstr ""

#: components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm
# defaultMessage: Uncheck to omit children items
msgid "expandItems_description"
msgstr ""

#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates
# defaultMessage: Scadenza
msgid "expire"
Expand Down Expand Up @@ -2141,7 +2151,6 @@ msgstr ""
msgid "info_color_tertiary"
msgstr ""

#: components/ItaliaTheme/Blocks/BandiSearch/Body
#: components/ItaliaTheme/Blocks/Calendar/Body
#: components/ItaliaTheme/Blocks/EventSearch/Body
#: components/ItaliaTheme/Blocks/UOSearch/Body
Expand Down Expand Up @@ -3701,7 +3710,6 @@ msgstr "Tipo"
msgid "variazione_situazione_patrimoniale"
msgstr "Cambio en el balance"

#: components/ItaliaTheme/Blocks/BandiSearch/Body
#: components/ItaliaTheme/Blocks/EventSearch/Body
#: components/ItaliaTheme/Blocks/EventSearch/DefaultFilters
#: components/ItaliaTheme/Blocks/UOSearch/Body
Expand Down
12 changes: 10 additions & 2 deletions locales/fr/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1947,6 +1947,16 @@ msgstr "Site Web de l'événement"
msgid "events"
msgstr "Rendez-vous"

#: components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm
# defaultMessage: Expand items
msgid "expandItems"
msgstr ""

#: components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm
# defaultMessage: Uncheck to omit children items
msgid "expandItems_description"
msgstr ""

#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates
# defaultMessage: Scadenza
msgid "expire"
Expand Down Expand Up @@ -2149,7 +2159,6 @@ msgstr ""
msgid "info_color_tertiary"
msgstr ""

#: components/ItaliaTheme/Blocks/BandiSearch/Body
#: components/ItaliaTheme/Blocks/Calendar/Body
#: components/ItaliaTheme/Blocks/EventSearch/Body
#: components/ItaliaTheme/Blocks/UOSearch/Body
Expand Down Expand Up @@ -3709,7 +3718,6 @@ msgstr "Typologie"
msgid "variazione_situazione_patrimoniale"
msgstr "Changement de bilan"

#: components/ItaliaTheme/Blocks/BandiSearch/Body
#: components/ItaliaTheme/Blocks/EventSearch/Body
#: components/ItaliaTheme/Blocks/EventSearch/DefaultFilters
#: components/ItaliaTheme/Blocks/UOSearch/Body
Expand Down
12 changes: 10 additions & 2 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,16 @@ msgstr "Sito web dell'evento"
msgid "events"
msgstr "Appuntamenti"

#: components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm
# defaultMessage: Expand items
msgid "expandItems"
msgstr "Espande i sotto-elementi nei filtri di ricerca"

#: components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm
# defaultMessage: Uncheck to omit children items
msgid "expandItems_description"
msgstr "Togliere la spunta per sezioni con un numero elevato di elementi"

#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates
# defaultMessage: Scadenza
msgid "expire"
Expand Down Expand Up @@ -2132,7 +2142,6 @@ msgstr "Colore secondario"
msgid "info_color_tertiary"
msgstr "Colore terziario"

#: components/ItaliaTheme/Blocks/BandiSearch/Body
#: components/ItaliaTheme/Blocks/Calendar/Body
#: components/ItaliaTheme/Blocks/EventSearch/Body
#: components/ItaliaTheme/Blocks/UOSearch/Body
Expand Down Expand Up @@ -3692,7 +3701,6 @@ msgstr ""
msgid "variazione_situazione_patrimoniale"
msgstr "Variazione situazione patrimoniale"

#: components/ItaliaTheme/Blocks/BandiSearch/Body
#: components/ItaliaTheme/Blocks/EventSearch/Body
#: components/ItaliaTheme/Blocks/EventSearch/DefaultFilters
#: components/ItaliaTheme/Blocks/UOSearch/Body
Expand Down
14 changes: 11 additions & 3 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-06-21T09:58:51.722Z\n"
"POT-Creation-Date: 2024-06-27T17:20:04.159Z\n"
"Last-Translator: Plone i18n <[email protected]>\n"
"Language-Team: Plone i18n <[email protected]>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -1932,6 +1932,16 @@ msgstr ""
msgid "events"
msgstr ""

#: components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm
# defaultMessage: Expand items
msgid "expandItems"
msgstr ""

#: components/ItaliaTheme/manage/Widgets/SearchSectionsConfigurationWidget/SearchSectionsConfigurationForm
# defaultMessage: Uncheck to omit children items
msgid "expandItems_description"
msgstr ""

#: components/ItaliaTheme/View/Commons/PageHeader/PageHeaderDates
# defaultMessage: Scadenza
msgid "expire"
Expand Down Expand Up @@ -2134,7 +2144,6 @@ msgstr ""
msgid "info_color_tertiary"
msgstr ""

#: components/ItaliaTheme/Blocks/BandiSearch/Body
#: components/ItaliaTheme/Blocks/Calendar/Body
#: components/ItaliaTheme/Blocks/EventSearch/Body
#: components/ItaliaTheme/Blocks/UOSearch/Body
Expand Down Expand Up @@ -3694,7 +3703,6 @@ msgstr ""
msgid "variazione_situazione_patrimoniale"
msgstr ""

#: components/ItaliaTheme/Blocks/BandiSearch/Body
#: components/ItaliaTheme/Blocks/EventSearch/Body
#: components/ItaliaTheme/Blocks/EventSearch/DefaultFilters
#: components/ItaliaTheme/Blocks/UOSearch/Body
Expand Down
9 changes: 0 additions & 9 deletions src/components/ItaliaTheme/Blocks/BandiSearch/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ const messages = defineMessages({
id: 'find',
defaultMessage: 'Cerca',
},
insert_filter: {
id: 'insert_filter',
defaultMessage:
'Inserire un filtro dal menù laterale per visualizzare i relativi risultati',
},
venues: {
id: 'venues',
defaultMessage: 'Luoghi',
},
noResult: {
id: 'noResult',
defaultMessage: 'Nessun risultato trovato',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { defineMessages, useIntl } from 'react-intl';
import { Form, Grid, Button } from 'semantic-ui-react';
import { flattenToAppURL } from '@plone/volto/helpers';
import withObjectBrowser from '@plone/volto/components/manage/Sidebar/ObjectBrowser';
import { TextWidget } from '@plone/volto/components';
import { TextWidget, CheckboxWidget } from '@plone/volto/components';
import navTreeSVG from '@plone/volto/icons/nav.svg';
import clearSVG from '@plone/volto/icons/clear.svg';

Expand All @@ -26,6 +26,14 @@ const messages = defineMessages({
id: 'searchsectionswidget-deleteitem-button',
defaultMessage: 'Delete section item',
},
expandItems: {
id: 'expandItems',
defaultMessage: 'Expand items',
},
expandItems_description: {
id: 'expandItems_description',
defaultMessage: 'Uncheck to omit children items',
},
});

const SearchSectionsConfigurationForm = ({
Expand Down Expand Up @@ -116,6 +124,14 @@ const SearchSectionsConfigurationForm = ({
onChange={(id, value) => onChangeFormData('href', value)}
/>

<CheckboxWidget
id={`${id}-expandItems`}
title={intl.formatMessage(messages.expandItems)}
description={intl.formatMessage(messages.expandItems_description)}
value={item.expandItems ?? true}
onChange={(id, value) => onChangeFormData('expandItems', value)}
/>

<Form.Field inline className="delete wide" id="item-delete">
<Grid>
<Grid.Row>
Expand Down

0 comments on commit c25fbba

Please sign in to comment.