[IMP] website_sale: custom css for disable (not published) product

bzr revid: chm@openerp.com-20130902153030-5mv6u3ehqgemsbuh
This commit is contained in:
Christophe Matthieu 2013-09-02 17:30:30 +02:00
parent fec90fd789
commit 86631bae37
3 changed files with 9 additions and 3 deletions

View File

@ -1,2 +0,0 @@
sass:
sass --compass --trace -t expanded --watch ecommerce.sass:ecommerce.css

View File

@ -0,0 +1,4 @@
.thumbnail.disabled {
opacity: 0.5;
background: #eee;
}

View File

@ -95,6 +95,10 @@
<template id="products" page="True">
<t t-call="website_sale.layout">
<t t-set="head">
<link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>
<t t-raw="head or ''"/>
</t>
<t t-set="title">Product</t>
<t t-set="shop_content">
<t t-call="website.pager">
@ -106,7 +110,7 @@
<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 'alert alert-warning' or ''}" style="width: 170px; margin-left: 16px;">
<div t-attf-class="col-md-2 mb16 thumbnail text-center #{not product.website_published and 'disabled' or ''}" style="width: 170px; margin-left: 16px;">
<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')"/>