diff options
| author | qsm-odoo <qsm@odoo.com> | 2019-08-08 10:33:22 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-08-09 09:45:07 +0000 |
| commit | e60323f87665e08d4cb0bd099dd0ee0fd1630114 (patch) | |
| tree | cf9f21a6faa41535e66a4eb9712e04883aaf42cb | |
| parent | e21656413a73a25796ec67122e3bb2ed60f5ba32 (diff) | |
[IMP] website, *: improve brand promotion in the footer
* web, website_event, website_sale, sale_quotation_builder
Instead of an ugly danger-colored badge promoting "odoo", we now use
the official odoo logo. The code is also refactored to use more
consistent and translatable sentences without duplicated code.
Note: the odoo logo is added in the repo, downloaded from our official
brand assets page (https://www.odoo.com/page/brand-assets), in its
'tiny' version. The repo already contained multiple odoo logos but they
are quite old and should be replaced in a further update. Note: the svg
version was not able to be used as it contains external margins...
Part of https://github.com/odoo/odoo/pull/34422
task-2026299
| -rw-r--r-- | addons/sale_quotation_builder/views/sale_portal_templates.xml | 12 | ||||
| -rw-r--r-- | addons/web/static/src/img/odoo_logo_tiny.png | bin | 0 -> 1168 bytes | |||
| -rw-r--r-- | addons/web/views/webclient_templates.xml | 18 | ||||
| -rw-r--r-- | addons/website/views/website_templates.xml | 12 | ||||
| -rw-r--r-- | addons/website_event/views/event_templates.xml | 10 | ||||
| -rw-r--r-- | addons/website_sale/views/templates.xml | 12 |
6 files changed, 38 insertions, 26 deletions
diff --git a/addons/sale_quotation_builder/views/sale_portal_templates.xml b/addons/sale_quotation_builder/views/sale_portal_templates.xml index 2b3bbe19ce4..4c5b2f6dc95 100644 --- a/addons/sale_quotation_builder/views/sale_portal_templates.xml +++ b/addons/sale_quotation_builder/views/sale_portal_templates.xml @@ -83,11 +83,13 @@ </template> <template id="brand_promotion" inherit_id="website.brand_promotion"> - <xpath expr="//div[hasclass('o_brand_promotion')]" position="replace"> - <div class="o_brand_promotion"> - Powered by <a target="_blank" class="badge badge-danger" href="http://www.odoo.com/page/website-builder">Odoo</a>, - an awesome <a target="_blank" href="http://www.odoo.com/page/crm">Open Source CRM</a>. - </div> + <xpath expr="//t[@t-call='web.brand_promotion_message']" position="replace"> + <t t-call="web.brand_promotion_message"> + <t t-set="_message"> + An awesome <a target="_blank" href="https://www.odoo.com/page/crm?utm_source=db&utm_medium=portal">Open Source CRM</a> + </t> + <t t-set="_utm_medium">portal</t> + </t> </xpath> </template> diff --git a/addons/web/static/src/img/odoo_logo_tiny.png b/addons/web/static/src/img/odoo_logo_tiny.png Binary files differnew file mode 100644 index 00000000000..9fd3895e662 --- /dev/null +++ b/addons/web/static/src/img/odoo_logo_tiny.png diff --git a/addons/web/views/webclient_templates.xml b/addons/web/views/webclient_templates.xml index 51aa1423584..1ed2df632f2 100644 --- a/addons/web/views/webclient_templates.xml +++ b/addons/web/views/webclient_templates.xml @@ -478,9 +478,25 @@ </xpath> </template> + <template id="brand_promotion_message" name="Brand Promotion Message"> + <t t-set="odoo_logo"> + <a target="_blank" + t-attf-href="http://www.odoo.com?utm_source=db&utm_medium=#{_utm_medium}" + class="badge badge-light"> + <img alt="Odoo" + src="/web/static/src/img/odoo_logo_tiny.png" + style="height: 1em; vertical-align: baseline;"/> + </a> + </t> + <t t-set="final_message">Powered by %s%s</t> + <t t-raw="final_message % (odoo_logo, _message and ('- %s' % _message) or '')"/> + </template> <template id="brand_promotion" name="Brand Promotion"> <div class="o_brand_promotion"> - Powered by <a target="_blank" href="http://www.odoo.com?utm_source=db&utm_medium=portal">Odoo</a> + <t t-call="web.brand_promotion_message"> + <t t-set="_message"></t> + <t t-set="_utm_medium">portal</t> + </t> </div> </template> diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index 3b9979c712b..566a4ad8244 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -291,11 +291,13 @@ </template> <template id="brand_promotion" inherit_id="web.brand_promotion" name="Brand Promotion"> - <xpath expr="//div[hasclass('o_brand_promotion')]" position="replace"> - <div class="o_brand_promotion"> - Create a <a target="_blank" href="http://www.odoo.com/page/website-builder?utm_source=db&utm_medium=website">free website</a> with - <a target="_blank" class="badge badge-danger" href="http://www.odoo.com/page/website-builder?utm_source=db&utm_medium=website">Odoo</a> - </div> + <xpath expr="//t[@t-call='web.brand_promotion_message']" position="replace"> + <t t-call="web.brand_promotion_message"> + <t t-set="_message"> + Create a <a target="_blank" href="http://www.odoo.com/page/website-builder?utm_source=db&utm_medium=website">free website</a> + </t> + <t t-set="_utm_medium">website</t> + </t> </xpath> </template> diff --git a/addons/website_event/views/event_templates.xml b/addons/website_event/views/event_templates.xml index c040583e697..791ea18f465 100644 --- a/addons/website_event/views/event_templates.xml +++ b/addons/website_event/views/event_templates.xml @@ -718,16 +718,6 @@ </t> </template> -<template id="website_event.brand_promotion" inherit_id="website.brand_promotion"> - <xpath expr="//div[hasclass('o_brand_promotion')]" position="replace"> - <div class="o_brand_promotion"> - Powered by <a target="_blank" class="badge badge-danger" href="http://www.odoo.com/page/website-builder?utm_source=db&utm_medium=website">Odoo</a>. - Try the <a target="_blank" href="http://www.odoo.com/page/website-builder?utm_source=db&utm_medium=website">open source website builder</a>. - </div> - </xpath> -</template> - - <!-- User Navbar --> <template id="user_navbar_inherit_website_event" inherit_id="website.user_navbar"> <xpath expr="//div[@id='o_new_content_menu_choices']//div[@name='module_website_event']" position="attributes"> diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index ae50d527f21..083b07426df 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -1644,11 +1644,13 @@ </template> <template id="website_sale.brand_promotion" inherit_id="website.brand_promotion"> - <xpath expr="//div[hasclass('o_brand_promotion')]" position="replace"> - <div class="o_brand_promotion"> - Powered by <a target="_blank" class="badge badge-danger" href="http://www.odoo.com/page/website-builder?utm_source=db&utm_medium=website">Odoo</a>, - the #1 <a target="_blank" href="http://www.odoo.com/page/e-commerce?utm_source=db&utm_medium=website">Open Source eCommerce</a>. - </div> + <xpath expr="//t[@t-call='web.brand_promotion_message']" position="replace"> + <t t-call="web.brand_promotion_message"> + <t t-set="_message"> + The #1 <a target="_blank" href="http://www.odoo.com/page/e-commerce?utm_source=db&utm_medium=website">Open Source eCommerce</a> + </t> + <t t-set="_utm_medium">website</t> + </t> </xpath> </template> |
