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.
87 lines
5.3 KiB
87 lines
5.3 KiB
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<!-- Customization with buttons, layout,search attributes etc.-->
|
|
<template id="boec_layout_button" name="Boec Layout Button"
|
|
inherit_id="website_sale.add_grid_or_list_option">
|
|
<xpath expr="//div[contains(@t-attf-class, 'o_wsale_apply_layout')]"
|
|
position="replace"/>
|
|
</template>
|
|
<template id="boec_pricelist_button" name="Boec Pricelist Button"
|
|
inherit_id="website_sale.products">
|
|
<xpath expr="//div[hasclass('oe_website_sale')]" position="before">
|
|
<div class="products_pager d-flex form-inline flex-md-nowrap justify-content-between justify-content-md-center"
|
|
style="margin-left:20%;margin-right:20%;">
|
|
<t t-if="is_view_active('website_sale.search')" 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-if="is_view_active('website_sale.sort')" t-call="website_sale.sort">
|
|
<t t-set="_classes" t-valuef="me-auto d-lg-inline-block"/>
|
|
</t>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
<template id="boec_brand_filter" inherit_id="website_sale.products_attributes" active="True">
|
|
<xpath expr="//div[@t-if='attrib_values or tags']" position="attributes">
|
|
<attribute name="t-if">attrib_values or tags or brand_ids</attribute>
|
|
</xpath>
|
|
<xpath expr="//form[contains(@class, 'js_attributes')]" position="inside">
|
|
<t t-set="brands" t-value="website.get_brands()"/>
|
|
<div t-if="brands" class="accordion-item nav-item mb-1 rounded-0 ">
|
|
<h6 class="accordion-header" id="brand-heading">
|
|
<button class="accordion-button" style="padding-left: 0px; padding-right: 0px;" type="button" data-bs-toggle="collapse" data-bs-target="#brand-collapse" aria-expanded="true" aria-controls="brand-collapse">
|
|
<b>Brands</b>
|
|
</button>
|
|
</h6>
|
|
<div id="brand-collapse" class=" flex-column mb-3 accordion-collapse collapse show" aria-labelledby="brand-heading" data-bs-parent="#accordionExample">
|
|
<t t-foreach="brands" t-as="brand">
|
|
<div class="form-check mb-1">
|
|
<input type="checkbox"
|
|
name="brand"
|
|
class="form-check-input"
|
|
t-attf-id="brand_#{brand.id}"
|
|
t-att-value="brand.id"
|
|
t-att-checked="'checked' if brand.id in brand_ids else None"/>
|
|
<label class="form-check-label fw-normal" t-attf-for="brand_#{brand.id}" t-field="brand.brand_name"/>
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
<template id="boec_o_wsale_offcanvas" inherit_id="website_sale.o_wsale_offcanvas" active="True">
|
|
<xpath expr="//div[hasclass('offcanvas-body')]/a[@href]" position="replace">
|
|
<a t-attf-class="btn btn-{{navClass}} d-flex py-1 mb-2 {{(not attrib_values and not isFilteringByPrice and not tags and not brand_ids) and 'disabled' }}"
|
|
t-att-aria-disabled="(not attrib_values and not isFilteringByPrice and not tags and not brand_ids) and 'true' or 'false'"
|
|
href="/shop"
|
|
title="Clear Filters">
|
|
Clear Filters
|
|
</a>
|
|
</xpath>
|
|
<xpath expr="//form[contains(@t-attf-class, 'js_attributes')]" position="inside">
|
|
<t t-set="brands" t-value="website.get_brands()"/>
|
|
<div t-if="brands" class="accordion-item border-top-0 order-2">
|
|
<h6 class="accordion-header" id="brand-heading-mobile">
|
|
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#brand-mobile-collapse" aria-expanded="true" aria-controls="brand-mobile-collapse">
|
|
<b>Brands</b>
|
|
</button>
|
|
</h6>
|
|
<div id="brand-mobile-collapse" class="flex-column accordion-collapse collapse show" aria-labelledby="brand-heading-mobile" data-bs-parent="#accordionExample">
|
|
<div class="accordion-body pt-1">
|
|
<t t-foreach="brands" t-as="brand">
|
|
<div class="form-check mb-1">
|
|
<input type="checkbox"
|
|
name="brand"
|
|
class="form-check-input"
|
|
t-attf-id="brand_#{brand.id}"
|
|
t-att-value="brand.id"
|
|
t-att-checked="'checked' if brand.id in brand_ids else None"/>
|
|
<label class="form-check-label fw-normal" t-attf-for="brand_#{brand.id}" t-field="brand.brand_name"/>
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|
|
|