diff --git a/packages/volto/cypress/tests/core/basic/objectBrowser.js b/packages/volto/cypress/tests/core/basic/objectBrowser.js index 293e5303d4..d439725474 100644 --- a/packages/volto/cypress/tests/core/basic/objectBrowser.js +++ b/packages/volto/cypress/tests/core/basic/objectBrowser.js @@ -97,7 +97,10 @@ describe('Object Browser Tests', () => { // The document is not in the list cy.findByLabelText('Browse My Searchable Page').should('not.exist'); // And the list has only 1 item - cy.get('.ui.segment.object-listing li').should('have.length', 1); + cy.get('.ui.segment.object-listing .image-wrapper').should( + 'have.length', + 1, + ); // The image can be selected as usual cy.findByLabelText('Select My Searchable Image').dblclick(); diff --git a/packages/volto/locales/ca/LC_MESSAGES/volto.po b/packages/volto/locales/ca/LC_MESSAGES/volto.po index c49f46036f..c5d1440d68 100644 --- a/packages/volto/locales/ca/LC_MESSAGES/volto.po +++ b/packages/volto/locales/ca/LC_MESSAGES/volto.po @@ -1671,6 +1671,7 @@ msgstr "Historial de {title}" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1681,6 +1682,11 @@ msgstr "Inici" msgid "ID" msgstr "Id" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -2005,6 +2011,11 @@ msgstr "" msgid "Links and references" msgstr "" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3058,6 +3069,7 @@ msgstr "Cerca l'etiqueta d'entrada" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "Resultats de la cerca" diff --git a/packages/volto/locales/de/LC_MESSAGES/volto.po b/packages/volto/locales/de/LC_MESSAGES/volto.po index f42b1f850c..05460062ad 100644 --- a/packages/volto/locales/de/LC_MESSAGES/volto.po +++ b/packages/volto/locales/de/LC_MESSAGES/volto.po @@ -1670,6 +1670,7 @@ msgstr "Historie von {title}" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1680,6 +1681,11 @@ msgstr "Startseite" msgid "ID" msgstr "ID" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -2004,6 +2010,11 @@ msgstr "Inhalte, die im Text auf diesen Inhalt verlinken" msgid "Links and references" msgstr "Links und Referenzen" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3057,6 +3068,7 @@ msgstr "Label Suchfeld" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "Suchergebnisse" diff --git a/packages/volto/locales/en/LC_MESSAGES/volto.po b/packages/volto/locales/en/LC_MESSAGES/volto.po index 351091e13d..99ff970059 100644 --- a/packages/volto/locales/en/LC_MESSAGES/volto.po +++ b/packages/volto/locales/en/LC_MESSAGES/volto.po @@ -1665,6 +1665,7 @@ msgstr "" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1675,6 +1676,11 @@ msgstr "" msgid "ID" msgstr "" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -1999,6 +2005,11 @@ msgstr "" msgid "Links and references" msgstr "" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3052,6 +3063,7 @@ msgstr "" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "" diff --git a/packages/volto/locales/es/LC_MESSAGES/volto.po b/packages/volto/locales/es/LC_MESSAGES/volto.po index 9ea8879da5..323c212b87 100644 --- a/packages/volto/locales/es/LC_MESSAGES/volto.po +++ b/packages/volto/locales/es/LC_MESSAGES/volto.po @@ -1672,6 +1672,7 @@ msgstr "Historial de {title}" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1682,6 +1683,11 @@ msgstr "Inicio" msgid "ID" msgstr "ID" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -2006,6 +2012,11 @@ msgstr "Vincular este elemento con un hipervínculo en el texto" msgid "Links and references" msgstr "Enlaces y referencias" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3059,6 +3070,7 @@ msgstr "Etiqueta del campo de búsqueda" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "Resultado de la búsqueda" diff --git a/packages/volto/locales/eu/LC_MESSAGES/volto.po b/packages/volto/locales/eu/LC_MESSAGES/volto.po index 2909158221..49936fe350 100644 --- a/packages/volto/locales/eu/LC_MESSAGES/volto.po +++ b/packages/volto/locales/eu/LC_MESSAGES/volto.po @@ -1672,6 +1672,7 @@ msgstr "{title} elementuaren historia" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1682,6 +1683,11 @@ msgstr "Hasiera" msgid "ID" msgstr "ID" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -2006,6 +2012,11 @@ msgstr "" msgid "Links and references" msgstr "" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3059,6 +3070,7 @@ msgstr "Bilaketa kutxaren etiketa" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "Bilaketaren emaitzak" diff --git a/packages/volto/locales/fi/LC_MESSAGES/volto.po b/packages/volto/locales/fi/LC_MESSAGES/volto.po index 9e38934475..ea67919876 100644 --- a/packages/volto/locales/fi/LC_MESSAGES/volto.po +++ b/packages/volto/locales/fi/LC_MESSAGES/volto.po @@ -1670,6 +1670,7 @@ msgstr "{title} – muutoshistoria" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1680,6 +1681,11 @@ msgstr "Etusivu" msgid "ID" msgstr "ID" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -2004,6 +2010,11 @@ msgstr "" msgid "Links and references" msgstr "" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3057,6 +3068,7 @@ msgstr "Hakukentän nimike" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "Hakutulokset" diff --git a/packages/volto/locales/fr/LC_MESSAGES/volto.po b/packages/volto/locales/fr/LC_MESSAGES/volto.po index f7c4e31855..422561a85a 100644 --- a/packages/volto/locales/fr/LC_MESSAGES/volto.po +++ b/packages/volto/locales/fr/LC_MESSAGES/volto.po @@ -1672,6 +1672,7 @@ msgstr "Historique de {title}" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1682,6 +1683,11 @@ msgstr "Accueil" msgid "ID" msgstr "ID" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -2006,6 +2012,11 @@ msgstr "" msgid "Links and references" msgstr "" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3059,6 +3070,7 @@ msgstr "Label du champ de recherche" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "Résultats de recherche" diff --git a/packages/volto/locales/hi/LC_MESSAGES/volto.po b/packages/volto/locales/hi/LC_MESSAGES/volto.po index a91a740813..aa80505383 100644 --- a/packages/volto/locales/hi/LC_MESSAGES/volto.po +++ b/packages/volto/locales/hi/LC_MESSAGES/volto.po @@ -1665,6 +1665,7 @@ msgstr "{title} का इतिहास" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1675,6 +1676,11 @@ msgstr "होम" msgid "ID" msgstr "आईडी" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -1999,6 +2005,11 @@ msgstr "इस आइटम के मूलपाठ में हाइपर msgid "Links and references" msgstr "लिंक और संदर्भ" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3052,6 +3063,7 @@ msgstr "खोज इनपुट लेबल" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "खोज परिणाम" diff --git a/packages/volto/locales/it/LC_MESSAGES/volto.po b/packages/volto/locales/it/LC_MESSAGES/volto.po index 8e5222dc91..856f036ffe 100644 --- a/packages/volto/locales/it/LC_MESSAGES/volto.po +++ b/packages/volto/locales/it/LC_MESSAGES/volto.po @@ -1665,6 +1665,7 @@ msgstr "Cronologia di {title}" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1675,6 +1676,11 @@ msgstr "Home" msgid "ID" msgstr "ID" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -1999,6 +2005,11 @@ msgstr "Elementi collegati a questo contenuto con un collegamento ipertestuali n msgid "Links and references" msgstr "Link e collegamenti" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3052,6 +3063,7 @@ msgstr "Etichetta del campo di ricerca" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "Risultati della ricerca" diff --git a/packages/volto/locales/ja/LC_MESSAGES/volto.po b/packages/volto/locales/ja/LC_MESSAGES/volto.po index 5ccc2ae8c0..2a2da939ab 100644 --- a/packages/volto/locales/ja/LC_MESSAGES/volto.po +++ b/packages/volto/locales/ja/LC_MESSAGES/volto.po @@ -1670,6 +1670,7 @@ msgstr "{title} の履歴" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1680,6 +1681,11 @@ msgstr "ホーム" msgid "ID" msgstr "ID" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -2004,6 +2010,11 @@ msgstr "" msgid "Links and references" msgstr "" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3057,6 +3068,7 @@ msgstr "" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "検索" diff --git a/packages/volto/locales/nl/LC_MESSAGES/volto.po b/packages/volto/locales/nl/LC_MESSAGES/volto.po index 9cb6168525..01dc20ba85 100644 --- a/packages/volto/locales/nl/LC_MESSAGES/volto.po +++ b/packages/volto/locales/nl/LC_MESSAGES/volto.po @@ -1669,6 +1669,7 @@ msgstr "Geschiedenis van {title}" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1679,6 +1680,11 @@ msgstr "Home" msgid "ID" msgstr "" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -2003,6 +2009,11 @@ msgstr "" msgid "Links and references" msgstr "" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3056,6 +3067,7 @@ msgstr "" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "" diff --git a/packages/volto/locales/pt/LC_MESSAGES/volto.po b/packages/volto/locales/pt/LC_MESSAGES/volto.po index fa63f79e92..7d02e71e72 100644 --- a/packages/volto/locales/pt/LC_MESSAGES/volto.po +++ b/packages/volto/locales/pt/LC_MESSAGES/volto.po @@ -1670,6 +1670,7 @@ msgstr "Histórico de {title}" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1680,6 +1681,11 @@ msgstr "Início" msgid "ID" msgstr "" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -2004,6 +2010,11 @@ msgstr "" msgid "Links and references" msgstr "" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3057,6 +3068,7 @@ msgstr "" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "Resultados da pesquisa" diff --git a/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po b/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po index a8e7d81cb0..f2ea3de844 100644 --- a/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po +++ b/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po @@ -1671,6 +1671,7 @@ msgstr "Histórico de {title}" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1681,6 +1682,11 @@ msgstr "Início" msgid "ID" msgstr "ID" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -2005,6 +2011,11 @@ msgstr "" msgid "Links and references" msgstr "" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3058,6 +3069,7 @@ msgstr "Rótulo da caixa de busca" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "Resultados da pesquisa" diff --git a/packages/volto/locales/ro/LC_MESSAGES/volto.po b/packages/volto/locales/ro/LC_MESSAGES/volto.po index 2ababcbc53..9481755aa6 100644 --- a/packages/volto/locales/ro/LC_MESSAGES/volto.po +++ b/packages/volto/locales/ro/LC_MESSAGES/volto.po @@ -1665,6 +1665,7 @@ msgstr "Istoricul {title}" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1675,6 +1676,11 @@ msgstr "Acasă" msgid "ID" msgstr "ID" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -1999,6 +2005,11 @@ msgstr "" msgid "Links and references" msgstr "" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3052,6 +3063,7 @@ msgstr "Căutați eticheta de intrare" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "Rezultatele căutării" diff --git a/packages/volto/locales/volto.pot b/packages/volto/locales/volto.pot index 82a00408e7..c28b4ea5dc 100644 --- a/packages/volto/locales/volto.pot +++ b/packages/volto/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-05-03T06:54:04.407Z\n" +"POT-Creation-Date: 2024-05-29T18:53:42.120Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "Content-Type: text/plain; charset=utf-8\n" @@ -1667,6 +1667,7 @@ msgstr "" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1677,6 +1678,11 @@ msgstr "" msgid "ID" msgstr "" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -2001,6 +2007,11 @@ msgstr "" msgid "Links and references" msgstr "" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3054,6 +3065,7 @@ msgstr "" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "" diff --git a/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po b/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po index 2f53f62d3e..d4511f9c05 100644 --- a/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po +++ b/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po @@ -1671,6 +1671,7 @@ msgstr "历史{title}" #: components/manage/Contents/Contents #: components/manage/Contents/ContentsBreadcrumbs #: components/manage/Contents/ContentsBreadcrumbsHomeItem +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Breadcrumbs/Breadcrumbs #: components/theme/Logo/Logo msgid "Home" @@ -1681,6 +1682,11 @@ msgstr "首页" msgid "ID" msgstr "" +#. Default: "Icon View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "Icon View" +msgstr "" + #. Default: "If all of the following conditions are met:" #: components/manage/Controlpanels/Rules/ConfigureRule msgid "If all of the following conditions are met:" @@ -2005,6 +2011,11 @@ msgstr "" msgid "Links and references" msgstr "" +#. Default: "List View" +#: components/manage/Sidebar/ObjectBrowserBody +msgid "List View" +msgstr "" + #. Default: "Listing" #: components/manage/Blocks/Listing/schema msgid "Listing" @@ -3058,6 +3069,7 @@ msgstr "搜索输入标签" #. Default: "Search results" #: components/manage/Blocks/Search/components/SearchDetails +#: components/manage/Sidebar/ObjectBrowserBody #: components/theme/Search/Search msgid "Search results" msgstr "搜索结果" diff --git a/packages/volto/news/5279.feature b/packages/volto/news/5279.feature new file mode 100644 index 0000000000..a93c6febfb --- /dev/null +++ b/packages/volto/news/5279.feature @@ -0,0 +1 @@ +Added object browser icon view @robgietema \ No newline at end of file diff --git a/packages/volto/src/components/manage/Sidebar/ObjectBrowserBody.jsx b/packages/volto/src/components/manage/Sidebar/ObjectBrowserBody.jsx index 194f32b2a5..7ce0d3d455 100644 --- a/packages/volto/src/components/manage/Sidebar/ObjectBrowserBody.jsx +++ b/packages/volto/src/components/manage/Sidebar/ObjectBrowserBody.jsx @@ -21,6 +21,8 @@ import clearSVG from '@plone/volto/icons/clear.svg'; import searchSVG from '@plone/volto/icons/zoom.svg'; import linkSVG from '@plone/volto/icons/link.svg'; import homeSVG from '@plone/volto/icons/home.svg'; +import iconsSVG from '@plone/volto/icons/apps.svg'; +import listSVG from '@plone/volto/icons/list-bullet.svg'; import ObjectBrowserNav from '@plone/volto/components/manage/Sidebar/ObjectBrowserNav'; @@ -41,6 +43,18 @@ const messages = defineMessages({ id: 'Search SVG', defaultMessage: 'Search SVG', }, + iconView: { + id: 'Icon View', + defaultMessage: 'Icon View', + }, + listView: { + id: 'List View', + defaultMessage: 'List View', + }, + home: { + id: 'Home', + defaultMessage: 'Home', + }, of: { id: 'Selected items - x of y', defaultMessage: 'of' }, }); @@ -132,6 +146,7 @@ class ObjectBrowserBody extends Component { this.props.mode === 'image' ? this.props.searchableTypes || config.settings.imageObjects : this.props.searchableTypes, + view: this.props.mode === 'image' ? 'icons' : 'list', }; this.searchInputRef = React.createRef(); } @@ -201,10 +216,28 @@ class ObjectBrowserBody extends Component { showSearchInput: !prevState.showSearchInput, }), () => { - if (this.searchInputRef?.current) this.searchInputRef.current.focus(); + if (this.searchInputRef?.current) { + this.searchInputRef.current.focus(); + } else { + this.props.searchContent( + this.state.currentFolder, + { + 'path.depth': 1, + sort_on: 'getObjPositionInParent', + metadata_fields: '_all', + b_size: 1000, + }, + `${this.props.block}-${this.props.mode}`, + ); + } }, ); + toggleView = () => + this.setState((prevState) => ({ + view: prevState.view === 'icons' ? 'list' : 'icons', + })); + onSearch = (e) => { const text = flattenToAppURL(e.target.value); if (text.startsWith('/')) { @@ -386,25 +419,9 @@ class ObjectBrowserBody extends Component { */ render() { return ( - +
- {this.state.currentFolder === '/' ? ( - <> - {this.props.mode === 'image' ? ( - - ) : ( - - )} - - ) : ( - - )} {this.state.showSearchInput ? ( - ) : this.props.mode === 'image' ? ( -

- -

) : ( -

- -

+ <> + {this.state.currentFolder === '/' ? ( + <> + {this.props.mode === 'image' ? ( + + ) : ( + + )} + + ) : ( + + )} + {this.props.mode === 'image' ? ( +

+ +

+ ) : ( +

+ +

+ )} + )}
- - {this.state.currentFolder !== '/' ? ( - this.state.currentFolder.split('/').map((item, index, items) => { - return ( - - {index === 0 ? ( - this.navigateTo('/')}> - - - ) : ( - <> - - - this.navigateTo(items.slice(0, index + 1).join('/')) - } - > - {item} - - - )} - - ); - }) - ) : ( - this.navigateTo('/')}> - - - )} - + {this.props.mode === 'image' && ( + + )} + {!this.state.showSearchInput ? ( + + {this.state.currentFolder !== '/' ? ( + this.state.currentFolder + .split('/') + .map((item, index, items) => { + return ( + + {index === 0 ? ( + this.navigateTo('/')} + role="button" + aria-label={this.props.intl.formatMessage( + messages.home, + )} + > + + + ) : ( + <> + + + this.navigateTo( + items.slice(0, index + 1).join('/'), + ) + } + > + {item} + + + )} + + ); + }) + ) : ( + this.navigateTo('/')} + aria-label={this.props.intl.formatMessage(messages.home)} + > + + + )} + + ) : ( +
+ +
+ )}
{this.props.mode === 'multiple' && ( @@ -510,6 +601,7 @@ class ObjectBrowserBody extends Component { handleClickOnItem={this.handleClickOnItem} handleDoubleClickOnItem={this.handleDoubleClickOnItem} mode={this.props.mode} + view={this.state.view} navigateTo={this.navigateTo} isSelectable={this.isSelectable} /> @@ -523,6 +615,7 @@ export default compose( connect( (state) => ({ searchSubrequests: state.search.subrequests, + lang: state.intl.locale, }), { searchContent }, ), diff --git a/packages/volto/src/components/manage/Sidebar/ObjectBrowserNav.jsx b/packages/volto/src/components/manage/Sidebar/ObjectBrowserNav.jsx index 14e7d605c1..d7324ba1b3 100644 --- a/packages/volto/src/components/manage/Sidebar/ObjectBrowserNav.jsx +++ b/packages/volto/src/components/manage/Sidebar/ObjectBrowserNav.jsx @@ -26,6 +26,7 @@ const ObjectBrowserNav = ({ handleClickOnItem, handleDoubleClickOnItem, mode, + view, navigateTo, isSelectable, }) => { @@ -47,83 +48,136 @@ const ObjectBrowserNav = ({ return ( {currentSearchResults && - currentSearchResults.items.map((item) => ( -
  • handleClickOnItem(item)} - onDoubleClick={() => handleDoubleClickOnItem(item)} - > - - - {' '} - {flattenToAppURL(item['@id'])} ( {item['@type']}) - - } - trigger={ - - - - } - /> - - {item.title} - - {item.is_folderish && mode === 'image' && ( - - )} - {item.is_folderish && (mode === 'link' || mode === 'multiple') && ( + currentSearchResults.items.map((item) => + view === 'icons' ? ( +
  • { - e.stopPropagation(); - navigateTo(item['@id']); - }} + onClick={(e) => handleClickOnItem(item)} + onDoubleClick={() => handleDoubleClickOnItem(item)} + className="image-preview" + aria-label={`${intl.formatMessage(messages.select)} ${ + item.title + }`} > - - - +
    + )} + +
    +
    handleClickOnItem(item)} + aria-hidden="true" + > +
    + {item.title} +
    +
    - )} -
  • - ))} + + ) : ( +
  • handleClickOnItem(item)} + onDoubleClick={() => handleDoubleClickOnItem(item)} + > + + + {' '} + {flattenToAppURL(item['@id'])} ( {item['@type']}) + + } + trigger={ + + + + } + /> + + {item.title} + + {item.is_folderish && mode === 'image' && ( + + )} + {item.is_folderish && + (mode === 'link' || mode === 'multiple') && ( +
    { + e.stopPropagation(); + navigateTo(item['@id']); + }} + > + + + +
    + )} +
  • + ), + )}
    ); }; diff --git a/packages/volto/theme/themes/pastanaga/extras/objectbrowser-widget.less b/packages/volto/theme/themes/pastanaga/extras/objectbrowser-widget.less index f1217fc517..6195be6671 100644 --- a/packages/volto/theme/themes/pastanaga/extras/objectbrowser-widget.less +++ b/packages/volto/theme/themes/pastanaga/extras/objectbrowser-widget.less @@ -41,3 +41,86 @@ border: none !important; } } + +.object-browser { + .mode-switch { + margin-right: 8px; + cursor: pointer; + float: right; + } + + header h2 { + margin: 2px 0 !important; + } + + .searchResults { + margin-left: 20px; + font-size: 14px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + line-height: 1.5; + text-rendering: optimizeLegibility; + text-size-adjust: 100%; + } + + ul.object-listing { + padding: 0; + } + + .image-wrapper { + display: block; + margin: 16px; + float: left; + + img, + .icon-wrapper { + background-color: #edf1f2; + cursor: pointer; + outline: 0; + } + + .selected { + outline: solid 3px #517776 !important; + } + + img:hover, + .icon-wrapper:hover { + outline: solid 3px rgb(187, 198, 200); + } + + .image-preview, + .image-preview:hover { + display: flex; + border: 0; + border-radius: 0; + box-shadow: none; + + img { + width: 200px; + height: 200px; + object-fit: contain; + } + } + + .image-preview, + .image-title { + cursor: pointer; + text-align: center; + } + + .image-title { + margin-top: 5px; + } + + .image-title-content { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .icon-wrapper { + display: flex; + padding: 46px; + } + } +}