[ADD] theme saas-6
This commit is contained in:
@@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Product grid view -->
|
||||
|
||||
<template id="products" inherit_id='website_sale.products' name="Products">
|
||||
<xpath expr="//*[contains(@id, 'products_grid')]//*[1]" position="before">
|
||||
<t t-call="theme_loftspace_sale.search"/>
|
||||
</xpath>
|
||||
|
||||
<!-- Add pager to the top and bottom -->
|
||||
<xpath expr="//div[@id='products_grid']/*[1]" position="before">
|
||||
<div class="products_pager" t-if="pager['page_count'] > 1">
|
||||
<t t-call="website.pager"/>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='products_grid']/*[last()]" position="after">
|
||||
<div class="products_pager" t-if="pager['page_count'] > 1">
|
||||
<t t-call="website.pager"/>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<!-- Remove original pager -->
|
||||
<xpath expr="//div[contains(@class, 'products_pager')]" position="replace">
|
||||
</xpath>
|
||||
<xpath expr="//div[contains(@class, 'oe_website_sale')]/div[@class='products_pager']" position="replace">
|
||||
</xpath>
|
||||
<xpath expr="//div[contains(@class, 'js_sale')]/*[last()]" position="replace">
|
||||
<div class="oe_structure"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- Rearrange product page -->
|
||||
|
||||
<template id="product" inherit_id='website_sale.product' name="Product">
|
||||
<!-- Widen breadcrumb -->
|
||||
<xpath expr="//*[@id='wrap']//*[contains(@class, 'row')]/*[1]" position="attributes">
|
||||
<attribute name="class">col-sm-12</attribute>
|
||||
</xpath>
|
||||
<!-- Move Published button -->
|
||||
<xpath expr="//*[@id='wrap']//*[contains(@class, 'row')]/*[3]" position="attributes">
|
||||
<attribute name="class">col-sm-12</attribute>
|
||||
<attribute name="id">website_published_button</attribute>
|
||||
</xpath>
|
||||
<!-- Move search bar -->
|
||||
<xpath expr="//*[@id='wrap']//*[contains(@class, 'row')]/*[2]" position="replace">
|
||||
</xpath>
|
||||
<xpath expr="//*[@id='wrap']//*[contains(@class, 'row')]" position="before">
|
||||
<t t-call="theme_loftspace_sale.search"/>
|
||||
</xpath>
|
||||
<!-- Hide useless hr -->
|
||||
<xpath expr="//div[contains(@class, 'col-lg-offset-1')]/hr" position="replace">
|
||||
</xpath>
|
||||
<!-- New add to cart button -->
|
||||
<xpath expr="//a[@id='add_to_cart']" position="replace">
|
||||
<a id="add_to_cart" class="btn btn-success btn-lg mt8 js_check_product a-submit center-block" href="#">
|
||||
<i class="fa fa-shopping-cart"></i>
|
||||
Add to Cart
|
||||
</a>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Add class to recommended products -->
|
||||
|
||||
<template id="recommended_products" inherit_id="website_sale.recommended_products" name="Alternative Products">
|
||||
<xpath expr="//div[contains(@class, 'container')]" position="attributes">
|
||||
<attribute name='id'>website_sale_recommended_products</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Add h3 tag to the category list -->
|
||||
|
||||
<template id="products_categories" inherit_id="website_sale.products_categories" name="Product Categories">
|
||||
<xpath expr="//div[@id='products_grid_before']/ul" position="before">
|
||||
<h3 class="category-name">Product categories</h3>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='products_grid_before']" position="attributes">
|
||||
<attribute name="class">col-md-3 col-sm-4 hidden-xs</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='products_grid']" position="attributes">
|
||||
<attribute name="class">col-md-9 col-sm-8</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Add h3 tag before filters -->
|
||||
|
||||
<template id="products_filters" inherit_id="website_sale.products_attributes" name="Product Filters">
|
||||
<xpath expr="//form[contains(@class, 'js_attributes')]" position="before">
|
||||
<h3 class="category-name">Product filters</h3>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<record id="website_sale.products_add_to_cart" model="ir.ui.view">
|
||||
<field name="active" eval='True'/>
|
||||
</record>
|
||||
|
||||
<record id="website_sale.products_categories" model="ir.ui.view">
|
||||
<field name="active" eval='True'/>
|
||||
</record>
|
||||
|
||||
<template id="products_categories_recursive" inherit_id="website_sale.products_categories">
|
||||
<xpath expr="//t[@t-call='website_sale.categories_recursive']" position="replace">
|
||||
<t t-call="theme_loftspace_sale.categories_recursive"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Put open icon next to categories -->
|
||||
<template id="categories_recursive" name="Category list">
|
||||
<li t-att-class="'' if c.id == int(category or 0) else ''">
|
||||
<t t-if="c.child_id">
|
||||
<i class="fa fa-chevron-down open-icon"></i>
|
||||
<i class="fa fa-chevron-up close-icon"></i>
|
||||
<a t-att-href="keep('/shop/category/' + slug(c), category=0)" t-field="c.name" class="main-category"/>
|
||||
</t>
|
||||
<t t-if="not c.child_id">
|
||||
<a t-att-href="keep('/shop/category/' + slug(c), category=0)" t-att-id="c.id" t-field="c.name"/>
|
||||
</t>
|
||||
<ul t-if="c.child_id" class="nav nav-pills nav-stacked nav-hierarchy">
|
||||
<t t-foreach="c.child_id" t-as="c">
|
||||
<t t-call="theme_loftspace_sale.categories_recursive"/>
|
||||
</t>
|
||||
</ul>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<template id="search" name="search">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<t t-if="not keep">
|
||||
<form action="/shop" method="get" class="pagination form-inline">
|
||||
<div class="input-group">
|
||||
<input name="search" class="search-query form-control" placeholder="Search..." type="text"/>
|
||||
<span class="input-group-btn">
|
||||
<a class="btn btn-default a-submit"><i class="fa fa-search"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</t>
|
||||
<t t-if="keep">
|
||||
<t t-call="website_sale.search">
|
||||
<t t-set="search_class">pagination form-inline col-md-12</t>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<!-- Jump to website after theme installation -->
|
||||
<record id="base.open_menu" model="ir.actions.todo">
|
||||
<field name="action_id" ref="website.action_website"/>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<template id="less" name="theme_loftspace_sale_less" inherit_id="website.assets_frontend">
|
||||
<xpath expr="//link[last()]" position="after">
|
||||
<link href="/theme_loftspace_sale/static/src/less/theme_ecommerce.less" rel="stylesheet" type="text/less"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="assets_frontend" inherit_id="website.assets_frontend" name="theme_loftspace_sale frontend scripts" priority="99">
|
||||
<xpath expr="script[last()]" position="after">
|
||||
<script type="text/javascript" src="/theme_loftspace_sale/static/src/js/collapse_categories.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user