diff --git a/template/layout_template.xml b/template/layout_template.xml index a643d2434d4a9c7cec76717eb070f211f115987e..80f78893fe64874793bcf295d07f3a7caa942c39 100755 --- a/template/layout_template.xml +++ b/template/layout_template.xml @@ -14,9 +14,16 @@ <xpath expr="//header/nav" position="attributes"> <attribute name="class">navbar navbar-expand-md</attribute> </xpath> - <xpath expr="//a[hasclass('logo')]" position="inside"> + <!-- Masque le logo initial si logo défini par l'utilisateur --> + <xpath expr="//a[hasclass('logo')]" position="attributes"> + <attribute name="t-if">not website.header_image</attribute> + </xpath> + <!-- Ajoute le logo défini par l'utilisateur --> + <xpath expr="//a[hasclass('logo')]" position="after"> <t t-if="website.header_image"> - <img t-attf-src="data:image/*;base64,{{website.header_image}}" style="margin-left: 5px;"/> + <a href="/" class="navbar-brand logo"> + <img t-attf-src="data:image/*;base64,{{website.header_image}}" t-att-alt="'Logo of %s' % res_company.name" t-att-title="res_company.name" /> + </a> </t> </xpath> </template>