You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
5.3 KiB
93 lines
5.3 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<data>
|
|
<template id="splash_shop" name="Splash Shop" inherit_id="website_sale.products">
|
|
<!-- It is a customization of the product list header for an e-commerce website, -->
|
|
<!-- adding search, price list, pager, category navigation, grid/list view options, -->
|
|
<!-- sorting, and filter buttons.-->
|
|
<xpath expr="//div[hasclass('products_header')]" position="replace">
|
|
<div class="products_header products_pager btn-toolbar flex-nowrap align-items-center justify-content-between mb-3">
|
|
<t t-call="website_sale.search">
|
|
<t t-set="search" t-value="original_search or search"/>
|
|
<t t-set="_form_classes" t-valuef="d-lg-inline {{'d-inline' if not category else 'd-none'}}"/>
|
|
</t>
|
|
|
|
<t t-call="website_sale.pricelist_list" t-cache="pricelist">
|
|
<t t-set="_classes" t-valuef="d-none d-lg-inline ms-3"/>
|
|
</t>
|
|
|
|
<t t-call="website.pager"/>
|
|
|
|
|
|
<div t-if="category" class="d-flex align-items-center d-lg-none me-auto">
|
|
<t t-if="not category.parent_id" t-set="backUrl" t-valuef="/shop"/>
|
|
<t t-else="" t-set="backUrl"
|
|
t-value="keep('/shop/category/' + slug(category.parent_id), category=0)"/>
|
|
|
|
<a t-attf-class="btn btn-{{navClass}} me-2"
|
|
t-att-href="category.parent_id and keep('/shop/category/' + slug(category.parent_id), category=0) or '/shop'">
|
|
<i class="fa fa-angle-left"/>
|
|
</a>
|
|
<h4 t-out="category.name" class="mb-0 me-auto"/>
|
|
</div>
|
|
|
|
<t t-if="is_view_active('website_sale.add_grid_or_list_option')"
|
|
t-call="website_sale.add_grid_or_list_option">
|
|
<t t-set="_classes" t-valuef="d-flex ms-3"/>
|
|
</t>
|
|
|
|
<t t-if="is_view_active('website_sale.sort')" t-call="website_sale.sort">
|
|
<t t-set="_classes" t-valuef="d-none d-lg-inline-block ms-3"/>
|
|
</t>
|
|
|
|
<button t-if="is_view_active('website_sale.sort') or opt_wsale_categories or opt_wsale_attributes or opt_wsale_attributes_top"
|
|
t-attf-class="btn btn-{{navClass}} position-relative ms-3 {{not opt_wsale_attributes_top and 'd-lg-none'}} btn-splash"
|
|
data-bs-toggle="offcanvas"
|
|
data-bs-target="#o_wsale_offcanvas">
|
|
<i class="fa fa-sliders"/>
|
|
<span t-if="isFilteringByPrice or attrib_set"
|
|
t-attf-class="position-absolute top-0 start-100 translate-middle badge border border-{{navClass}} rounded-circle bg-danger p-1">
|
|
<span class="visually-hidden">filters active</span>
|
|
</span>
|
|
</button>
|
|
</div>
|
|
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="splash_pricelist_button" name="Splash Pricelist Button" inherit_id="website_sale.sort">
|
|
<!-- Template overrides the default product sorting options in the Odoo eCommerce website, replacing them-->
|
|
<!-- with a dropdown menu containing sortable fields. It inherits from the -->
|
|
<!-- "website_sale.sort" template and adds additional styling and functionality.-->
|
|
<xpath expr="//div[contains(@t-attf-class, 'o_sortby_dropdown')]" position="replace">
|
|
<div t-attf-class="o_sortby_dropdown dropdown dropdown_sorty_by ms-lg-3 {{_classes}}">
|
|
<a role="button" href="#" t-attf-class="dropdown-toggle btn btn-{{navClass}}"
|
|
data-bs-toggle="dropdown">
|
|
<span class="d-none d-lg-inline">
|
|
<t t-if="isSortingBy" t-out="isSortingBy[0][1]"/>
|
|
<span t-else="1" t-field="website.shop_default_sort"/>
|
|
</span>
|
|
<i class="fa fa-sort-amount-asc d-lg-none"/>
|
|
</a>
|
|
<div class="dropdown-menu dropdown-menu-end" role="menu">
|
|
<t t-foreach="website_sale_sortable" t-as="sortby">
|
|
<a role="menuitem" rel="noindex,nofollow" t-att-href="keep('/shop', order=sortby[0])"
|
|
class="dropdown-item">
|
|
<span t-out="sortby[1]"/>
|
|
</a>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
<template id="splash_products_add_to_cart" name="Splash Attributes"
|
|
inherit_id="website_sale.products_add_to_cart">
|
|
<xpath expr="//a[@t-if='product._website_show_quick_add()']" position="replace">
|
|
<a t-if="product._website_show_quick_add()"
|
|
href="#" role="button" class="btn btn-primary a-submit" style="padding: 0.375rem 1rem;" aria-label="Shopping cart" title="Shopping cart">
|
|
<span class="fa fa-shopping-cart"/>
|
|
</a>
|
|
</xpath>
|
|
</template>
|
|
</data>
|
|
</odoo>
|