[IMP] website, *: add 'magazine' header template
*: website_sale, website_sale_wishlist Part of https://github.com/odoo/odoo/pull/56427 task-2264627 X-original-commit: 77d82cfbddb64cc7302672c7741eb65c9fc4a125
This commit is contained in:
@@ -194,6 +194,7 @@ class Theme(models.AbstractModel):
|
||||
self.disable_view('website.template_header_centered_logo')
|
||||
self.disable_view('website.template_header_image')
|
||||
self.disable_view('website.template_header_hamburger_full')
|
||||
self.disable_view('website.template_header_magazine')
|
||||
|
||||
# Reinitialize footer templates
|
||||
self.enable_view('website.footer_custom')
|
||||
|
||||
@@ -605,6 +605,9 @@
|
||||
<we-button data-name="header_hamburger_full_opt"
|
||||
data-customize-website-views="website.template_header_hamburger_full"
|
||||
data-customize-website-variable="'hamburger-full'">Hamburger Full</we-button>
|
||||
<we-button data-name="header_magazine_opt"
|
||||
data-customize-website-views="website.template_header_magazine"
|
||||
data-customize-website-variable="'magazine'">Magazine</we-button>
|
||||
</we-select>
|
||||
|
||||
<!-- Header Sidebar Template - Options -->
|
||||
|
||||
@@ -1078,6 +1078,94 @@
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="template_header_magazine" inherit_id="website.layout" name="Template Header Magazine" active="False">
|
||||
<xpath expr="//header//nav" position="replace">
|
||||
<!-- Topbar -->
|
||||
<div class="oe_structure" id="oe_structure_header_magazine_1"/>
|
||||
<nav class="navbar navbar-light o_colored_level o_cc">
|
||||
<div id="top_menu_container" class="container">
|
||||
<!-- Brand -->
|
||||
<t t-call="website.placeholder_header_brand"/>
|
||||
<!-- Navbar Toggler -->
|
||||
<t t-call="website.navbar_toggler">
|
||||
<t t-set="_toggler_class" t-value="'ml-auto'"/>
|
||||
</t>
|
||||
<!-- Navbar Collapse -->
|
||||
<div id="top_menu_collapse" class="collapse navbar-collapse">
|
||||
<t t-set="_nav_class" t-value="'text-right'"/>
|
||||
<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-value="'nav-item'"/>
|
||||
<t t-set="link_class" t-value="'nav-link'"/>
|
||||
</t>
|
||||
</t>
|
||||
<!-- Sign In -->
|
||||
<t t-call="portal.placeholder_user_sign_in">
|
||||
<t t-set="_item_class" t-value="'nav-item'"/>
|
||||
<t t-set="_link_class" t-value="'nav-link'"/>
|
||||
</t>
|
||||
<!-- User Dropdown -->
|
||||
<t t-call="portal.user_dropdown">
|
||||
<t t-set="_user_name" t-value="true"/>
|
||||
<t t-set="_item_class" t-value="'nav-item dropdown'"/>
|
||||
<t t-set="_link_class" t-value="'nav-link'"/>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="template_header_magazine_oe_structure_header_magazine_1" inherit_id="website.template_header_magazine" name="Template Header Magazine (oe_structure_header_magazine_1)">
|
||||
<xpath expr="//*[hasclass('oe_structure')][@id='oe_structure_header_magazine_1']" position="replace">
|
||||
<div class="oe_structure" id="oe_structure_header_magazine_1">
|
||||
<section class="s_text_block" data-snippet="s_text_block" data-name="Text">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-8 pt16">
|
||||
<p class="mb-0"><small>Add your custom text here</small></p>
|
||||
</div>
|
||||
<div class="col-lg-4 text-lg-right pt16">
|
||||
<div class="s_share no_icon_color" data-name="Social Media">
|
||||
<small class="s_share_title d-none"><b>Follow us</b></small>
|
||||
<a href="/website/social/facebook" class="s_share_facebook" target="_blank">
|
||||
<i class="fa fa-1x fa-fw fa-facebook"/>
|
||||
</a>
|
||||
<a href="/website/social/twitter" class="s_share_twitter" target="_blank">
|
||||
<i class="fa fa-1x fa-fw fa-twitter"/>
|
||||
</a>
|
||||
<a href="/website/social/linkedin" class="s_share_linkedin" target="_blank">
|
||||
<i class="fa fa-1x fa-fw fa-linkedin"/>
|
||||
</a>
|
||||
<a href="/website/social/github" class="s_share_github" target="_blank">
|
||||
<i class="fa fa-1x fa-fw fa-github"/>
|
||||
</a>
|
||||
<a href="/website/social/youtube" class="s_share_youtube" target="_blank">
|
||||
<i class="fa fa-1x fa-fw fa-youtube"/>
|
||||
</a>
|
||||
<a href="/website/social/instagram" class="s_share_instagram" target="_blank">
|
||||
<i class="fa fa-1x fa-fw fa-instagram"/>
|
||||
</a>
|
||||
<a href="mailto:info@yourcompany.example.com">
|
||||
<i class="fa fa-1x fa-fw fa-envelope ml-3"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="s_hr pt16 pb16" data-name="Separator">
|
||||
<hr class="w-100 mx-auto" style="border-top-width: 1px; border-top-style: solid; border-color: var(--300);"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Navbar Hamburger Options -->
|
||||
<template id="option_header_off_canvas" inherit_id="website.navbar_nav" name="Off-Canvas Header" active="False">
|
||||
<xpath expr="//ul[@id='top_menu']" position="attributes">
|
||||
|
||||
@@ -203,6 +203,16 @@
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="template_header_magazine" inherit_id="website.template_header_magazine">
|
||||
<xpath expr="//t[@t-foreach='website.menu_id.child_id']" position="after">
|
||||
<t t-call="website_sale.header_cart_link">
|
||||
<t t-set="_text" t-value="True"/>
|
||||
<t t-set="_item_class" t-value="'nav-item'"/>
|
||||
<t t-set="_link_class" t-value="'nav-link'"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Products Search Bar input-group template -->
|
||||
<template id="website_sale_products_search_box" inherit_id="website.website_search_box" primary="True">
|
||||
<xpath expr="//input[@name='search']" position="attributes">
|
||||
|
||||
@@ -162,6 +162,16 @@
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="template_header_magazine" inherit_id="website_sale.template_header_magazine">
|
||||
<xpath expr="//t[@t-call='website_sale.header_cart_link']" position="after">
|
||||
<t t-call="website_sale_wishlist.header_wishlist_link">
|
||||
<t t-set="_text" t-value="True"/>
|
||||
<t t-set="_item_class" t-value="'nav-item'"/>
|
||||
<t t-set="_link_class" t-value="'nav-link'"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="product_wishlist" name="Wishlist Page">
|
||||
<t t-call="website.layout">
|
||||
<t t-set="additional_title">Shop Wishlist</t>
|
||||
|
||||
Reference in New Issue
Block a user