[IMP] website_sale: prduct boxes have the same size

bzr revid: chm@openerp.com-20130903082814-uuh11ttoyvjpvjox
This commit is contained in:
Christophe Matthieu 2013-09-03 10:28:14 +02:00
parent cf9ab25816
commit 8314c4ef9d
4 changed files with 57 additions and 17 deletions

View File

@ -141,7 +141,7 @@
<i class="icon-time"></i> <span t-field="event_id.date_end"> </span>
<t t-if="event_id.organizer_id">
<h6>Organized by:</h6>
<pre><t t-field="event_id.organizer_id"/><br/><span>&amp;#x2706;</span> <span t-field="event_id.phone"></span><br/><i class="icon-envelope"></i> <span t-field="event_id.email"></span></pre>
<pre><t t-field="event_id.organizer_id"/><t t-if="event_id.phone"><br/><span>&amp;#x2706;</span> <span t-field="event_id.phone"></span></t><t t-if="event_id.email"><br/><i class="icon-envelope"></i> <span t-field="event_id.email"></span></t></pre>
</t>
</address>
</div>

View File

@ -9,4 +9,39 @@
}
.thumbnail:hover > .css_unpublish, .thumbnail:hover > .css_publish {
display: block;
}
.css_product {
width: 170px;
margin-left: 16px;
}
.css_product .css_content {
height: 174px;
margin-bottom: 6px;
}
.ellipsis {
overflow: hidden;
position: relative;
}
.ellipsis .end {
position: absolute;
bottom: 0;
right: 0;
text-align: right;
width: 26px;
background-size: 100% 100%;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAABCAMAAACfZeZEAAAABGdBTUEAALGPC/xhBQAAAwBQTFRF////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wDWRdwAAAP90Uk5TgsRjMZXhS30YrvDUP3Emow1YibnM9+ggOZxrBtpRRo94gxItwLOoX/vsHdA2yGgL8+TdKUK8VFufmHSGgAQWJNc9tk+rb5KMCA8aM0iwpWV6dwP9+fXuFerm3yMs0jDOysY8wr5FTldeoWKabgEJ8RATG+IeIdsn2NUqLjQ3OgBDumC3SbRMsVKsValZplydZpZpbJOQco2KdYeEe36BDAL8/vgHBfr2CvTyDu8R7esU6RcZ5ecc4+Af3iLcJSjZ1ivT0S/PMs3LNck4x8U7wz7Bv0G9RLtHuEq1TbJQr1OtVqqnWqRdoqBhnmSbZ5mXapRtcJGOc4t2eYiFfH9AS7qYlgAAARlJREFUKM9jqK9fEGS7VNrDI2+F/nyB1Z4Fa5UKN4TbbeLY7FW0Tatkp3jp7mj7vXzl+4yrDsYoVx+JYz7mXXNSp/a0RN25JMcLPP8umzRcTZW77tNyk63tdprzXdmO+2ZdD9MFe56Y9z3LUG96mcX02n/CW71JH6Qmf8px/cw77ZvVzB+BCj8D5vxhn/vXZh6D4uzf1rN+Cc347j79q/zUL25TPrJMfG/5LvuNZP8rixeZz/mf+vU+Vut+5NL5gPOeb/sd1dZbTs03hBuvmV5JuaRyMfk849nEM7qnEk6IHI8/qn049hB35QGHiv0yZXuMdkXtYC3ebrglcqvYxoj1muvC1nDlrzJYGbpcdHHIMo2FwYv+j3QAAOBSfkZYITwUAAAAAElFTkSuQmCC);
background: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), to(white), color-stop(50%, white));
background: -moz-linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);
background: -o-linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);
background: -ms-linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);
background: linear-gradient(to right, rgba(255, 255, 255, 0), white 50%, white);
}
.ellipsis .fill {
background: #fff;
height: 100%;
position: absolute;
width: 100%;
}

View File

@ -22,4 +22,5 @@ $(document).ready(function () {
$(document).on('mouseup', '.js_publish', function (ev) {
$(ev.currentTarget).parents(".thumbnail").toggleClass("disabled");
});
});

View File

@ -110,23 +110,24 @@
<div class="clearfix"/>
<div class='row grid grid-align-top'>
<t t-foreach="products" t-as="product">
<div t-attf-class="col-md-2 mb16 thumbnail text-center #{not product.website_published and 'disabled' or ''}" style="width: 170px; margin-left: 16px;">
<div t-attf-class="css_product col-md-2 mb16 thumbnail text-center #{not product.website_published and 'disabled' or ''}">
<t t-call="website.publish"><t t-set="object" t-value="product"/></t>
<a t-attf-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&amp;category_id=%s' % category_id) or ''}">
<h5 t-field="product.name"> </h5>
<img class="img-rounded" t-att-src="product.img('image_small')"/>
</a>
<div class="ellipsis css_content">
<a t-attf-href="/shop/product/#{ product.id }/?#{ search and ('search=%s' % search) or ''}#{ category_id and ('&amp;category_id=%s' % category_id) or ''}">
<h5 t-field="product.name"> </h5>
<img class="img-rounded" t-att-src="product.img('image_small')"/>
</a>
<small t-field="product.description_sale"></small>
<span class="end">&amp;#133;</span><span class="fill"></span>
</div>
<div>
<div t-field="product.description_sale"></div>
<div>
<t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
<small class="text-error" style="text-decoration: line-through;"><t t-esc="product.product_variant_ids[0].lst_price" /></small>
</t>
<b><t t-esc="product.product_variant_ids[0].price" /></b>
</div>
<div class="mb8 mt8">
<a t-attf-href="./add_cart/?product_id=#{ product.id }" class="btn btn-default btn-sm btn-success">Add to cart</a>
</div>
<t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
<small class="text-error" style="text-decoration: line-through;"><t t-esc="product.product_variant_ids[0].lst_price" /></small>
</t>
<b><t t-esc="product.product_variant_ids[0].price" /></b>
</div>
<div class="mb8 mt8">
<a t-attf-href="./add_cart/?product_id=#{ product.id }" class="btn btn-default btn-sm btn-success">Add to cart</a>
</div>
</div>
</t>
@ -162,7 +163,10 @@
<button class="btn btn-sm btn-success">Add to cart</button>
</form>
<img class="media-object img-responsive" t-att-src="product.img('image_medium')"/>
<div t-field="product.website_description"></div>
<h2 t-if="editable">Description for Quotations</h2>
<div t-if="editable" t-field="product.description_sale"><br/></div>
<h2 t-if="editable">Description</h2>
<div t-field="product.website_description"><br/></div>
<div>
<t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
<h5 class="text-error" style="text-decoration: line-through;"><t t-esc="product.product_variant_ids[0].lst_price" /></h5>