Public release from ruodoo-project: 19.0 - 2026-08-30 21:16:35 UTC
This commit is contained in:
18
translation_helper/static/src/menus/dropdown.xml
Normal file
18
translation_helper/static/src/menus/dropdown.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<!-- Patch SectionsMenu: add translate button inside Dropdown-based section buttons (items with children) -->
|
||||
<t t-name="translation_helper.NavBar.SectionsMenu" t-inherit="web.NavBar.SectionsMenu" t-inherit-mode="extension">
|
||||
<xpath expr="//button[@t-att-data-menu-xmlid]/span" position="after">
|
||||
<MenuTranslationButton t-if="__translate__" menuXmlId="section.xmlid" />
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
<!-- Patch MenuSlot: add translate button after group headers (items with children inside dropdown) -->
|
||||
<t t-name="translation_helper.NavBar.SectionsMenu.Dropdown.MenuSlot" t-inherit="web.NavBar.SectionsMenu.Dropdown.MenuSlot" t-inherit-mode="extension">
|
||||
<xpath expr="//div[hasclass('dropdown-menu_group')]" position="after">
|
||||
<MenuTranslationButton t-if="__translate__ and item.xmlid" menuXmlId="item.xmlid" />
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
Reference in New Issue
Block a user