From b2fefbd3c56b4ac1ef4cfe0387db45d24aa5a037 Mon Sep 17 00:00:00 2001 From: Nirali Sapra Date: Wed, 6 Dec 2017 17:18:52 +0530 Subject: [PATCH] [IMP] portal, website, website_*: make footer content easy to customize Previously, customizing the website footer was not very easy. This commit will allow users to customize the footer like any other snippet area. There are several behavior changes, as mentioned below: - Removed toggles 'Automatic Footer' and 'Payment Icons' from the Customize menu - Language Selector was moved near the 'Copyright' section of the footer and features a dropdown (dropup technically) to select the language - Moved some footer links from various modules to top menu List of the added menus / changed menus: (a) Resellers (new menu for previous footer link 'Resellers') (b) References (new menu for previous footer link 'Our References') (c) Forums (renamed from 'Forum', as a replacement of 'Forums' footer link, showing all the forums instead of 'Help', as there is no link available to all forums after this commit) (d) Live Support (new menu for previous footer link 'Livechat Support') (e) Mailing Lists (new menu for previous footer link 'Mailing List') (f) Members (new menu for previous footer link 'Members') - Links which were already available as a website menus (Presentations, Jobs, Events, News, Documentation, etc) are simply removed Technical Notes: - Introduced a new template called 'brand_promotion' in website. This will help to avoid adding redundant footer content (like copyright, language selector etc) from several modules (website_sale, website_event, website_quote, etc) while the only intention is to replace module page links. - Removed summernote related fix in portal.less (caused by xpath) because footer is now customizable and added padding to structure instead of footer itself so that bg-color/img can be applied on whole footer. - Few of the tours are improved to drag and drop snippets at proper places and not inside the footer. - Used Flex in copyright portion of footer, so that text will always be horizontally centered (Some themes have different padding for buttons, etc, so if we don't align text dynamically, it has to be managed in particular theme and in particular layouts like full-screen / boxed. And if someone changes height of this portion, we have to re-design this portion again, etc). task-38069 Closes https://github.com/odoo/odoo/pull/22298 Co-authored-by: Dharmraj --- addons/portal/static/src/scss/portal.scss | 12 -- addons/website/static/src/js/tours/banner.js | 4 +- addons/website/static/src/js/tours/rte.js | 21 ++- addons/website/static/src/scss/website.scss | 16 ++ addons/website/views/website_templates.xml | 144 ++++++++---------- .../views/website_blog_templates.xml | 7 - .../data/crm_partner_assign_data.xml | 12 ++ .../website_crm_partner_assign_templates.xml | 7 - addons/website_customer/__manifest__.py | 1 + .../data/website_customer_data.xml | 13 ++ .../views/website_customer_templates.xml | 7 - .../website_event/views/event_templates.xml | 22 +-- addons/website_forum/data/forum_data.xml | 6 +- addons/website_forum/views/website_forum.xml | 9 -- addons/website_forum_doc/data/doc_data.xml | 2 +- .../website_forum_doc/views/website_doc.xml | 8 - .../website_hr_recruitment_templates.xml | 6 - .../data/website_livechat_data.xml | 6 + .../views/website_livechat.xml | 7 - .../data/mail_template_data.xml | 12 ++ .../views/website_mail_channel_templates.xml | 6 - addons/website_membership/__manifest__.py | 1 + .../data/membership_data.xml | 13 ++ .../views/website_membership_templates.xml | 7 - addons/website_payment/__init__.py | 2 - addons/website_payment/__manifest__.py | 1 - addons/website_payment/models/__init__.py | 1 - addons/website_payment/models/website.py | 14 -- .../views/website_payment_templates.xml | 15 -- .../views/website_quote_templates.xml | 15 +- addons/website_sale/views/templates.xml | 14 +- .../website_slides/views/website_slides.xml | 9 -- 32 files changed, 178 insertions(+), 242 deletions(-) create mode 100644 addons/website_customer/data/website_customer_data.xml create mode 100644 addons/website_membership/data/membership_data.xml delete mode 100644 addons/website_payment/models/__init__.py delete mode 100644 addons/website_payment/models/website.py delete mode 100644 addons/website_payment/views/website_payment_templates.xml diff --git a/addons/portal/static/src/scss/portal.scss b/addons/portal/static/src/scss/portal.scss index 9eeb6a538b5..ea68b013d8a 100644 --- a/addons/portal/static/src/scss/portal.scss +++ b/addons/portal/static/src/scss/portal.scss @@ -61,18 +61,6 @@ ul.nav-stacked > li > a { footer { background-color: #F8F8F8; - - #footer { - padding-top: 32px; - - // TODO This solves a bug that should be solved differently when - // possible. When automatic footer option is enabled,