From dc81acfb2d7a1abc2f3e810d6d95695924bc1d6a Mon Sep 17 00:00:00 2001 From: "Serge Bayet (seba)" Date: Wed, 16 Aug 2023 11:51:20 +0200 Subject: [PATCH] [IMP] website, *: allow to add a language from theme tab + options *: web_editor, portal This adds a button to add language in theme tab. When clicked, opens the "add a language" wizard. If the website has only one language, the options to enable language in header & footer are hidden. When an user add a language, the default behavior is Header: dropdown & Footer: inline. Also provides two more rendering options : Language Code and Flag + Language Code. task-3457554 closes odoo/odoo#119650 Related: odoo/design-themes#651 Related: odoo/upgrade#5214 Signed-off-by: Quentin Smetz (qsm) Co-authored-by: qsm-odoo --- addons/portal/views/portal_templates.xml | 5 +- .../static/src/js/editor/snippets.editor.js | 2 +- .../static/src/js/editor/snippets.options.js | 61 +++++++------ .../wysiwyg_adapter/wysiwyg_adapter.js | 2 +- .../static/src/js/editor/snippets.options.js | 89 ++++++++++++++++++- addons/website/static/src/scss/website.scss | 1 + .../src/systray_items/website_switcher.js | 2 +- .../static/tests/tours/automatic_editor.js | 11 +-- addons/website/static/tests/tours/rte.js | 13 +-- addons/website/views/snippets/snippets.xml | 15 +++- addons/website/views/website_templates.xml | 50 ++++------- 11 files changed, 173 insertions(+), 78 deletions(-) diff --git a/addons/portal/views/portal_templates.xml b/addons/portal/views/portal_templates.xml index 49c2e2b6b0c7d..7538f35a18da0 100644 --- a/addons/portal/views/portal_templates.xml +++ b/addons/portal/views/portal_templates.xml @@ -71,6 +71,7 @@ - -