[IMP] website_sale: typo, label and add id/class to make js/xpath easy

This commit is contained in:
Jeremy Kersten
2017-02-24 20:28:26 +01:00
parent 1a86155d1c
commit bbd2d0e42f
+5 -5
View File
@@ -30,10 +30,10 @@
<template id="header" inherit_id="website.layout" name="Header Shop My Cart Link">
<xpath expr="//header//ul[@id='top_menu']/li" position="before">
<t t-set="website_sale_order" t-value="website.sale_get_order()" />
<li t-att-class="'' if website_sale_order and website_sale_order.cart_quantity else 'hidden'">
<li id="my_cart" t-att-class="'' if website_sale_order and website_sale_order.cart_quantity else 'hidden'">
<a href="/shop/cart">
<i class="fa fa-shopping-cart"></i>
My cart <sup t-attf-class="my_cart_quantity label label-primary" t-esc="website_sale_order and website_sale_order.cart_quantity or ''" />
My Cart <sup t-attf-class="my_cart_quantity label label-primary" t-esc="website_sale_order and website_sale_order.cart_quantity or ''" />
</a>
</li>
</xpath>
@@ -531,10 +531,10 @@
</xpath>
</template>
<template id="product_attributes" inherit_id="website_sale.product" customize_show="True" name="Product attributes">
<template id="product_attributes" inherit_id="website_sale.product" name="Product attributes">
<xpath expr="//p[@t-field='product.description_sale']" position="after">
<hr t-if="sum([(1 if len(l.value_ids)==1 else 0) for l in product.attribute_line_ids])" />
<p class="text-muted">
<hr t-if="sum([(1 if len(l.value_ids)==1 else 0) for l in product.attribute_line_ids])" id='hr_product_attributes_simple'/>
<p class="text-muted" id="product_attributes_simple">
<t t-foreach="product.attribute_line_ids.sorted(key=lambda x: x.attribute_id.sequence)" t-as="variant_id">
<t t-if="len(variant_id.value_ids)==1">
<span t-field="variant_id.attribute_id" />: <span t-field="variant_id.value_ids[0].name" /><br /></t>