[IMP] website: Make company logo editable from frontend
Purpose ======= Clicking the company logo takes to the backend's company settings. Users get lost and don't know how to go back to the website. Specs ===== It should be a picture selection wizard. If possible the default picture should be the company logo if already set.
This commit is contained in:
committed by
Yannick Tivisse
parent
33b09d0d5e
commit
d1a8d54aca
@@ -70,22 +70,6 @@ options.registry.company_data = options.Class.extend({
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
on_focus: function () {
|
||||
this._super.apply(this, arguments);
|
||||
|
||||
var proto = options.registry.company_data.prototype;
|
||||
|
||||
Dialog.confirm(null, _t("Do you want to edit the company data ?"), {
|
||||
confirm_callback: function () {
|
||||
editor.editor_bar.save_without_reload().then(function () {
|
||||
proto.__link_deferred.then(function (link) {
|
||||
window.location.href = link;
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
options.registry.slider = options.Class.extend({
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
<template id="layout_logo_show" inherit_id="website.layout" customize_show="True" name="Show Logo">
|
||||
<xpath expr="//header//a[@class='navbar-brand']" position="replace">
|
||||
<a href="/" class="navbar-brand logo">
|
||||
<img src="/logo.png" t-att-alt="'Logo of %s' % res_company.name" t-att-title="res_company.name"/>
|
||||
<span t-field="res_company.logo" t-options="{'widget': 'image'}" t-att-alt="'Logo of %s' % res_company.name" t-att-title="res_company.name" />
|
||||
</a>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user