Merge pull request #3434 from expsa/dev_donations_ahidev
[UPD] customizations on template + translation
This commit is contained in:
commit
38da0a81e5
|
|
@ -44,6 +44,7 @@
|
|||
'views/headers/style_6.xml',
|
||||
'views/headers/style_7.xml',
|
||||
'views/headers/style_8.xml',
|
||||
'views/headers/style_9.xml',
|
||||
|
||||
# Footers
|
||||
'views/footers/style_1.xml',
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -68,6 +68,34 @@
|
|||
</li>
|
||||
</template>
|
||||
|
||||
<template id="tp_donation_login_dropdown_component">
|
||||
<li t-if="request.website.viewref('portal.user_sign_in').active" t-attf-class="list-inline-item o_not_editable #{_btn_classes}">
|
||||
<div class="dropdown" t-ignore="true" t-if="not user_id._is_public()">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-label="Account Info"><i t-attf-class="dri dri-user #{_icon_classes}"/></a>
|
||||
<div t-if="action_label" class="tp-action-btn-label">Account</div>
|
||||
<div class="dropdown-menu dropdown-menu-right" role="menu">
|
||||
<div class="dropdown-header"><t t-esc="user_id.name"/></div>
|
||||
<a href="/my/campaigns" role="menuitem" class="dropdown-item">My Account</a>
|
||||
<a href="/my/campaigns" role="menuitem" class="dropdown-item">My Campaigns</a>
|
||||
<a href="/my/orders" role="menuitem" class="dropdown-item">Donations</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="/web/session/logout?redirect=/" role="menuitem" class="dropdown-item">Logout</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown" t-else="">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-label="Account Info"><i t-attf-class="dri dri-user #{_icon_classes}"/></a>
|
||||
<div t-if="action_label" class="tp-action-btn-label">Account</div>
|
||||
<div class="dropdown-menu dropdown-menu-right" role="menu">
|
||||
<div class="dropdown-header">Guest</div>
|
||||
<a href="/account/login" role="menuitem" class="dropdown-item">Login</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="/shop/cart" role="menuitem" class="dropdown-item">My Donations</a>
|
||||
</div>
|
||||
</div>
|
||||
<div t-if="show_title" class="mt-1 small text-body">Account</div>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<template id="tp_mobile_bottombar_component" name="Bottombar Component">
|
||||
<t t-set="wishcount" t-value="len(request.env['product.wishlist'].current())"/>
|
||||
<t t-set="website_path" t-value="request.httprequest.path"/>
|
||||
|
|
@ -172,6 +200,26 @@
|
|||
<t t-call="theme_prime.tp_login_dropdown_component"></t>
|
||||
</template>
|
||||
|
||||
<template id="donation_component_account_info" name="Component Account Info">
|
||||
<li t-if="not no_search" class="list-inline-item">
|
||||
<a href="#" class="tp-search-sidebar-action" t-att-data-search="search" data-placement="bottom" aria-label="Search">
|
||||
<i class="dri dri-search o_not_editable"/>
|
||||
</a>
|
||||
<div t-if="show_title" class="mt-1 small text-body o_not_editable">Search</div>
|
||||
</li>
|
||||
|
||||
<t t-set="website_sale_order" t-value="website.sale_get_order()" />
|
||||
<li class="list-inline-item">
|
||||
<a class="o_wsale_my_cart tp-cart-sidebar-action" href="/shop/cart">
|
||||
<i class="dri dri-cart o_not_editable"/>
|
||||
<sup class="my_cart_quantity badge badge-primary mb-0 font-weight-bold" t-esc="website_sale_order and website_sale_order.cart_quantity or '0'" t-att-data-order-id="website_sale_order and website_sale_order.id or ''"/>
|
||||
</a>
|
||||
<div t-if="show_title" class="mt-1 small text-body o_not_editable">My Donations</div>
|
||||
</li>
|
||||
|
||||
<t t-call="theme_prime.tp_donation_login_dropdown_component"></t>
|
||||
</template>
|
||||
|
||||
<template id="component_language_pricelist" name="Component Language + Pricelist">
|
||||
<t t-set="website_sale_pricelists" t-value="website.get_pricelist_available(show_visible=True)" />
|
||||
<t t-set="language_selector_visible" t-value="len(languages) > 1 or (website and (editable or translatable))"/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="template_header_style_9" inherit_id="website.layout" name="Header Style - 9" active="False">
|
||||
|
||||
<xpath expr="//header" position="attributes">
|
||||
<attribute name="data-theme" add="o_ensan_theme2"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//header//nav" position="replace">
|
||||
<nav data-name="Navbar" class="navbar navbar-expand-lg navbar-light o_colored_level o_cc shadow-sm">
|
||||
<div id="top_menu_container" class="container">
|
||||
<!-- Navbar Toggler -->
|
||||
<t t-call="theme_prime.component_navbar_toggler"/>
|
||||
<!-- Brand -->
|
||||
<t t-call="website.placeholder_header_brand"/>
|
||||
<!-- Account Info -->
|
||||
<t t-call="theme_prime.component_navbar_mobile_account_info"/>
|
||||
<!-- Navbar Collapse -->
|
||||
<div id="top_menu_collapse" class="collapse navbar-collapse">
|
||||
<t t-call="website.navbar_nav">
|
||||
<t t-set="_nav_class" t-value="'flex-grow-1'"/>
|
||||
<!-- 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>
|
||||
</t>
|
||||
</div>
|
||||
<!-- Button -->
|
||||
<div id="top_menu_collapse" class="collapse navbar-collapse o_top_menu_last">
|
||||
<!-- Language Selector -->
|
||||
<t t-call="website.placeholder_header_language_selector">
|
||||
<t t-set="_div_classes" t-value="'ml-2'"/>
|
||||
</t>
|
||||
</div>
|
||||
<!-- Account Info -->
|
||||
<ul class="list-inline my-3 d-none d-lg-block tp-account-info">
|
||||
<t t-call="theme_prime.donation_component_account_info"/>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -79,7 +79,8 @@
|
|||
<span class="dri dri-search-l fa-2x text-success ml-1 mr-3"></span>
|
||||
<div class="media-body">
|
||||
<h6 class="mb-1">Search</h6>
|
||||
<div>Find your product</div>
|
||||
<div>Find your donation</div>
|
||||
<!-- <div>Find your product</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -203,7 +204,8 @@
|
|||
<div class="pt-3 pb-2 py-lg-2">
|
||||
<t t-set="tp_is_filters_activated" t-value="is_view_active('website_sale.products_attributes') or is_view_active('website_sale.products_categories')"/>
|
||||
<div class="d-lg-none d-flex align-items-center justify-content-between">
|
||||
<h5 class="mb-0">Shop</h5>
|
||||
<h5 class="mb-0">Donation</h5>
|
||||
<!-- <h5 class="mb-0">Shop</h5> -->
|
||||
<div><t t-esc="search_count"/> items found.</div>
|
||||
</div>
|
||||
<div class="row justify-content-between align-items-center">
|
||||
|
|
@ -214,7 +216,8 @@
|
|||
</button>
|
||||
<ol t-if="category" class="breadcrumb m-0 p-0 bg-transparent">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="/shop">Shop</a>
|
||||
<a href="/shop">Donations</a>
|
||||
<!-- <a href="/shop">Shop</a> -->
|
||||
</li>
|
||||
<t t-foreach="category.parents_and_self" t-as="cat">
|
||||
<li t-if="cat.id == category.id" class="breadcrumb-item">
|
||||
|
|
@ -226,7 +229,9 @@
|
|||
</t>
|
||||
</ol>
|
||||
<div t-else="" class="d-inline-block">
|
||||
<h6 class="mb-0 d-inline-block">All Products</h6> - <t t-esc="search_count"/> items
|
||||
|
||||
<h6 class="mb-0 d-inline-block">All Donations</h6> - <t t-esc="search_count"/> items
|
||||
<!-- <h6 class="mb-0 d-inline-block">All Products</h6> - <t t-esc="search_count"/> items -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -379,11 +384,14 @@
|
|||
<div id="tp-no-search">
|
||||
<div t-if="not search" class="my-5">
|
||||
<div class="text-center">
|
||||
<h1 class="mt-4">We couldn't find any product!</h1>
|
||||
<p t-if="category">No product defined in category <span class="text-dark" t-esc="category.display_name"/>.</p>
|
||||
<h1 class="mt-4">We couldn't find any donation!</h1>
|
||||
<p t-if="category">No donation defined in category <span class="text-dark" t-esc="category.display_name"/>.</p>
|
||||
<!-- <h1 class="mt-4">We couldn't find any product!</h1>
|
||||
<p t-if="category">No product defined in category <span class="text-dark" t-esc="category.display_name"/>.</p> -->
|
||||
</div>
|
||||
<div groups="sales_team.group_sale_manager" class="text-center mt48">
|
||||
<div class="text-muted">Click<i>'New'</i> in the top-right corner to create your first product.</div>
|
||||
<div class="text-muted">Click<i>'New'</i> in the top-right corner to create your first donation.</div>
|
||||
<!-- <div class="text-muted">Click<i>'New'</i> in the top-right corner to create your first product.</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div t-else="" class="my-5">
|
||||
|
|
@ -408,7 +416,8 @@
|
|||
</form>
|
||||
</div>
|
||||
<div groups="sales_team.group_sale_manager" class="text-center mt48">
|
||||
<div class="text-muted">Click<i>'New'</i> in the top-right corner to create your first product.</div>
|
||||
<div class="text-muted">Click<i>'New'</i> in the top-right corner to create your first donation.</div>
|
||||
<!-- <div class="text-muted">Click<i>'New'</i> in the top-right corner to create your first product.</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -430,7 +439,8 @@
|
|||
<a t-att-href="keep('/shop',category=0)" class="p-0 text-body">
|
||||
<div class="custom-control custom-radio">
|
||||
<input type="radio" class="custom-control-input" t-att-checked="not category"/>
|
||||
<label class="custom-control-label">All Products</label>
|
||||
<label class="custom-control-label">All Donations</label>
|
||||
<!-- <label class="custom-control-label">All Products</label> -->
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -891,7 +901,8 @@
|
|||
<a href="/"><i class="dri dri-home-l"/></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
<a t-att-href="keep(category=0)">Shop</a>
|
||||
<a t-att-href="keep(category=0)">Donation</a>
|
||||
<!-- <a t-att-href="keep(category=0)">Shop</a> -->
|
||||
</li>
|
||||
<li t-if="category" class="breadcrumb-item">
|
||||
<a t-att-href="keep('/shop/category/%s' % slug(category), category=0)" t-field="category.name"/>
|
||||
|
|
@ -1237,7 +1248,8 @@
|
|||
|
||||
<div class="tp-suggested-product-slider" t-attf-data-products-params='{"selectionType":"manual", "productIDs":#{product.alternative_product_ids.ids}}' t-att-data-two-block="has_two_blocks">
|
||||
<div class="position-relative">
|
||||
<h5 class="tp-underline-title">Similar Products</h5>
|
||||
<h5 class="tp-underline-title">Similar Donations</h5>
|
||||
<!-- <h5 class="tp-underline-title">Similar Products</h5> -->
|
||||
<div class="tp-slider-controls">
|
||||
<button class="btn btn-link tp-prev" role="button" aria-label="Prev"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="btn btn-link tp-next" role="button" aria-label="Next"><i class="fa fa-chevron-right"></i></button>
|
||||
|
|
@ -1309,7 +1321,8 @@
|
|||
|
||||
<template id="product_buy_now" inherit_id="website_sale.product_buy_now" name="Theme Prime: Buy Now Button">
|
||||
<xpath expr="//a[@id='buy_now']" position="replace">
|
||||
<a role="button" id="buy_now" class="btn btn-primary-soft btn-lg mt16 d-block d-md-inline-block w-md-auto ml-0 ml-md-2" href="#"><i class="dri dri-bolt"/> Buy Now</a>
|
||||
<a role="button" id="buy_now" class="btn btn-primary-soft btn-lg mt16 d-block d-md-inline-block w-md-auto ml-0 ml-md-2" href="#"><i class="dri dri-bolt"/> Donate Now</a>
|
||||
<!-- <a role="button" id="buy_now" class="btn btn-primary-soft btn-lg mt16 d-block d-md-inline-block w-md-auto ml-0 ml-md-2" href="#"><i class="dri dri-bolt"/> Buy Now</a> -->
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
|
@ -1371,7 +1384,8 @@
|
|||
<div class="row justify-content-center s_nb_column_fixed s_col_no_bgcolor">
|
||||
<div class="col-12 col-lg-8 text-center">
|
||||
<span class="dri dri-cart fa-2x bg-primary rounded-circle"></span>
|
||||
<h2 class="mt-3">Shopping <font class="text-primary">Cart</font></h2>
|
||||
<h2 class="mt-3">Donating <font class="text-primary">Cart</font></h2>
|
||||
<!-- <h2 class="mt-3">Shopping <font class="text-primary">Cart</font></h2> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1427,7 +1441,8 @@
|
|||
|
||||
<template id="suggested_products_list" inherit_id="website_sale.suggested_products_list" name="Alternative Products in my cart">
|
||||
<xpath expr="//h5[hasclass('js_cart_lines')]" position="replace">
|
||||
<h5 class='js_cart_lines mt64 mb-3' t-if="suggested_products">Suggested Products</h5>
|
||||
<h5 class='js_cart_lines mt64 mb-3' t-if="suggested_products">Suggested Donations</h5>
|
||||
<!-- <h5 class='js_cart_lines mt64 mb-3' t-if="suggested_products">Suggested Products</h5> -->
|
||||
</xpath>
|
||||
<xpath expr="//table[@id='suggested_products']" position="attributes">
|
||||
<attribute name="class" remove="table-striped table-sm" separator=" "/>
|
||||
|
|
@ -1435,7 +1450,8 @@
|
|||
<xpath expr="//table[@id='suggested_products']/tbody" position="before">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th colspan="2">Product</th>
|
||||
<th colspan="2">Donation</th>
|
||||
<!-- <th colspan="2">Product</th> -->
|
||||
<th>Price</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -557,6 +557,10 @@
|
|||
data-customize-website-views="theme_prime.template_header_style_8"
|
||||
data-customize-website-variable="'prime_style_8'"
|
||||
data-img="/theme_prime/static/src/img/options/header_8.png"/>
|
||||
<we-button title="Prime Header Style - 7"
|
||||
data-customize-website-views="theme_prime.template_header_style_9"
|
||||
data-customize-website-variable="'prime_style_9'"
|
||||
data-img="/theme_prime/static/src/img/options/header_6.png"/>
|
||||
</xpath>
|
||||
<xpath expr="//we-select[@data-variable='footer-template']/we-button[last()]" position="after">
|
||||
<we-button title="Prime Footer Style - 1"
|
||||
|
|
|
|||
|
|
@ -173,8 +173,10 @@
|
|||
<a t-if="is_buy_now_active" role="button" id="buy_now" class="btn btn-primary-soft ml-0 ml-sm-2 btn-lg mt16 d-block d-sm-inline-block" href="#"><i class="dri dri-bolt"/> Buy Now</a>
|
||||
</div>
|
||||
</form>
|
||||
<p t-elif="not product.active" class="alert alert-warning">This product is no longer available.</p>
|
||||
<p t-else="" class="alert alert-warning">This product has no valid combination.</p>
|
||||
<p t-elif="not product.active" class="alert alert-warning">This donation is no longer available.</p>
|
||||
<p t-else="" class="alert alert-warning">This donation has no valid combination.</p>
|
||||
<!-- <p t-elif="not product.active" class="alert alert-warning">This product is no longer available.</p>
|
||||
<p t-else="" class="alert alert-warning">This product has no valid combination.</p> -->
|
||||
<hr/>
|
||||
<t t-if="product.dr_brand_id">
|
||||
<div class="row align-items-center">
|
||||
|
|
@ -287,8 +289,10 @@
|
|||
</a>
|
||||
</div>
|
||||
</form>
|
||||
<p t-elif="not product.active" class="alert alert-warning">This product is no longer available.</p>
|
||||
<p t-else="" class="alert alert-warning">This product has no valid combination.</p>
|
||||
<p t-elif="not product.active" class="alert alert-warning">This donation is no longer available.</p>
|
||||
<p t-else="" class="alert alert-warning">This donation has no valid combination.</p>
|
||||
<!-- <p t-elif="not product.active" class="alert alert-warning">This product is no longer available.</p>
|
||||
<p t-else="" class="alert alert-warning">This product has no valid combination.</p> -->
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
|
@ -314,7 +318,8 @@
|
|||
</div>
|
||||
<div id="product_details">
|
||||
<!-- TODO: Should be in theme not in dr_common -->
|
||||
<h4 class="mx-3 pt-1 mt-3 mb-1 text-truncate" itemprop="name" t-field="product.name">Product Name</h4>
|
||||
<h4 class="mx-3 pt-1 mt-3 mb-1 text-truncate" itemprop="name" t-field="product.name">Donation Name</h4>
|
||||
<!-- <h4 class="mx-3 pt-1 mt-3 mb-1 text-truncate" itemprop="name" t-field="product.name">Product Name</h4> -->
|
||||
<!-- <div class="mt-0" t-if="is_rating_active" t-raw="rating" /> -->
|
||||
<form t-if="product._is_add_to_cart_possible()" class="d_cart_update_form" action="/shop/cart/update" method="POST">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" />
|
||||
|
|
@ -352,14 +357,19 @@
|
|||
<i class="dri dri-cart"/>
|
||||
Add to Cart
|
||||
</a>
|
||||
<!-- <a t-if="is_buy_now_active" role="button" id="buy_now" class="btn btn-secondary py-3 btn-lg mt16 d-block d-sm-inline-block" href="#">
|
||||
<i class="dri dri-bolt"/>
|
||||
Buy Now</a> -->
|
||||
<a t-if="is_buy_now_active" role="button" id="buy_now" class="btn btn-secondary py-3 btn-lg mt16 d-block d-sm-inline-block" href="#">
|
||||
<i class="dri dri-bolt"/>
|
||||
Buy Now</a>
|
||||
Donate Now</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<p t-elif="not product.active" class="alert alert-warning">This product is no longer available.</p>
|
||||
<p t-else="" class="alert alert-warning">This product has no valid combination.</p>
|
||||
<p t-elif="not product.active" class="alert alert-warning">This donation is no longer available.</p>
|
||||
<p t-else="" class="alert alert-warning">This donation has no valid combination.</p>
|
||||
<!-- <p t-elif="not product.active" class="alert alert-warning">This product is no longer available.</p>
|
||||
<p t-else="" class="alert alert-warning">This product has no valid combination.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -374,7 +384,8 @@
|
|||
<div class="container-fluid px-0 tp-cart-sidebar">
|
||||
<div class="row no-gutters justify-content-between align-items-center border-bottom p-3">
|
||||
<div class="col-auto">
|
||||
<h5 class="mb-0">Your Cart</h5>
|
||||
<h5 class="mb-0">Your Donations Cart</h5>
|
||||
<!-- <h5 class="mb-0">Your Cart</h5> -->
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<a href="#" class="tp-close tp-remove-icon" title="Close">
|
||||
|
|
@ -388,10 +399,14 @@
|
|||
<t t-call="theme_prime.tp_svg_cart">
|
||||
<t t-set="_classes" t-value="'m-5'"/>
|
||||
</t>
|
||||
<h5 class="my-4">Your cart is empty!</h5>
|
||||
<h5 class="my-4">Your donation cart is empty!</h5>
|
||||
<a class="btn btn-primary" href="/shop">
|
||||
Donate Now
|
||||
</a>
|
||||
<!-- <h5 class="my-4">Your cart is empty!</h5>
|
||||
<a class="btn btn-primary" href="/shop">
|
||||
Shop Now
|
||||
</a>
|
||||
</a> -->
|
||||
</div>
|
||||
<t t-if="order and order.website_order_line">
|
||||
<div class="tp-cart-products">
|
||||
|
|
@ -471,7 +486,8 @@
|
|||
<div class="container-fluid px-0 tp-search-sidebar">
|
||||
<div class="row no-gutters justify-content-between align-items-center border-bottom p-3">
|
||||
<div class="col-auto">
|
||||
<h5 class="mb-0">Search Products</h5>
|
||||
<h5 class="mb-0">Search Donations</h5>
|
||||
<!-- <h5 class="mb-0">Search Products</h5> -->
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<a href="#" class="tp-close tp-remove-icon" title="Close">
|
||||
|
|
@ -506,7 +522,8 @@
|
|||
<div class="container-fluid px-0 tp-similar-products-sidebar">
|
||||
<div class="row bg-white no-gutters justify-content-between align-items-center border-bottom p-3">
|
||||
<div class="col-auto">
|
||||
<h5 class="mb-0">Similar Products</h5>
|
||||
<h5 class="mb-0">Similar Donations</h5>
|
||||
<!-- <h5 class="mb-0">Similar Products</h5> -->
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<a href="#" class="tp-close tp-remove-icon" title="Close">
|
||||
|
|
@ -556,7 +573,8 @@
|
|||
<t t-call="theme_prime.tp_svg_cart">
|
||||
<t t-set="_classes" t-value="'m-5'"/>
|
||||
</t>
|
||||
<h5 class="my-4 text-center">No similar products found!</h5>
|
||||
<h5 class="my-4 text-center">No similar donations found!</h5>
|
||||
<!-- <h5 class="my-4 text-center">No similar products found!</h5> -->
|
||||
</t>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue