mirror of
https://github.com/odoo/design-themes.git
synced 2025-10-07 01:18:52 +07:00
0e2497b8e8
This commit introduces a new theme for tests purpose. The goal is to be able to create records and simulate a real use case without only testing through unit tests in python. For instance, with this commit, we now fully test: - menu creation - page creation - new header & footer template - new image shape & background shape This will be extended later to be able to test other stuff too, maybe like changing the website logo (not supported yet). Also, our existing standalone test in themes should use this theme instead of nano to not rely on a real theme that might change. Courtesy of NMI as this theme is partly based on his job. closes odoo/design-themes#586 Related: odoo/odoo#99099 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
46 lines
2.0 KiB
XML
46 lines
2.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- Theme Header - Option -->
|
|
<template id="template_header_opt" inherit_id="website.snippet_options" name="Test Theme Custom Header Template - Option">
|
|
<xpath expr="//we-select[@data-variable='header-template']" position="inside">
|
|
<we-button title="Custom Theme"
|
|
data-customize-website-views="theme_test_custo.template_header_custom"
|
|
data-customize-website-variable="'custom-theme'"
|
|
data-img="/theme_test_custo/static/src/img/template_header_opt.svg"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- Theme Header - Layout -->
|
|
<template id="template_header_custom" inherit_id="website.layout" name="Test Theme Custom Header Template">
|
|
<xpath expr="//header//nav" position="replace">
|
|
<nav data-name="Navbar" class="navbar navbar-expand-lg">
|
|
<div class="container">
|
|
<t t-call="website.placeholder_header_brand"/>
|
|
<t t-call="website.navbar_nav">
|
|
<!-- Menu -->
|
|
<t t-foreach="website.menu_id.child_id" t-as="submenu">
|
|
<t t-call="website.submenu">
|
|
<t t-set="item_class" t-valuef="nav-item"/>
|
|
<t t-set="link_class" t-valuef="nav-link"/>
|
|
</t>
|
|
</t>
|
|
<!-- Sign In -->
|
|
<t t-call="portal.placeholder_user_sign_in">
|
|
<t t-set="_item_class" t-valuef="nav-item"/>
|
|
<t t-set="_link_class" t-valuef="nav-link text-900"/>
|
|
</t>
|
|
<!-- User Dropdown -->
|
|
<t t-call="portal.user_dropdown">
|
|
<t t-set="_user_name" t-value="true"/>
|
|
<t t-set="_item_class" t-valuef="nav-item dropdown ml-auto"/>
|
|
<t t-set="_link_class" t-valuef="nav-link text-900"/>
|
|
</t>
|
|
</t>
|
|
</div>
|
|
</nav>
|
|
</xpath>
|
|
</template>
|
|
|
|
</odoo>
|