[IMP] website: change some name button in website addons

bzr revid: chm@openerp.com-20130813115247-b8rq6hytqbwn4eog
This commit is contained in:
Christophe Matthieu 2013-08-13 13:52:47 +02:00
parent 475382b61c
commit e1958f2ad7
5 changed files with 27 additions and 41 deletions

View File

@ -15,7 +15,7 @@
<!-- Page -->
<template id="index" name="E-commerce">
<template id="index" name="Events">
<t t-call="website.layout">
<t t-set="head">
<script type="text/javascript" src="/website_event/static/src/js/website_event.js"></script>
@ -59,8 +59,8 @@
</t>
<h4 class="media-heading"><a t-att-href="'/event/%%s/' %% event_id.id"><span t-field="event_id.name"> </span></a></h4>
<a t-if="editable" href="#" t-att-data-id="event_id.id" class="pull-right">
<span t-att-class="'label label-success js_unpublish %%s' %% (not event_id.website_published and 'hidden' or '')">Click to Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (event_id.website_published and 'hidden' or '')">Click to Publish</span>
<span t-att-class="'label label-success js_unpublish %%s' %% (not event_id.website_published and 'hidden' or '')">Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (event_id.website_published and 'hidden' or '')">Publish</span>
</a>
<div>
<span t-field="event_id.type">: </span>
@ -149,8 +149,8 @@
</t>
<h4 class="media-heading"><a t-att-href="'/event/%%s/' %% event_id.id"><span t-field="event_id.name"> </span></a></h4>
<a t-if="editable" href="#" t-att-data-id="event_id.id" class="pull-right">
<span t-att-class="'label label-success js_unpublish %%s' %% (not event_id.website_published and 'hidden' or '')">Click to Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (event_id.website_published and 'hidden' or '')">Click to Publish</span>
<span t-att-class="'label label-success js_unpublish %%s' %% (not event_id.website_published and 'hidden' or '')">Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (event_id.website_published and 'hidden' or '')">Publish</span>
</a>
<h5 class="media-heading">
<span t-field="event_id.address_id"/><br/>

View File

@ -36,8 +36,8 @@
<div class="media-body">
<div t-if="editable" class="pull-right">
<a href="#" t-att-data-id="employee_id.id">
<span t-att-class="'label label-success js_unpublish %%s' %% (not employee_id.website_published and 'hidden' or '')">Click to Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (employee_id.website_published and 'hidden' or '')">Click to Publish</span>
<span t-att-class="'label label-success js_unpublish %%s' %% (not employee_id.website_published and 'hidden' or '')">Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (employee_id.website_published and 'hidden' or '')">Publish</span>
</a>
</div>
<h5 class="media-heading" t-field="employee_id.name"/>

View File

@ -67,8 +67,8 @@
<li t-foreach="blog_id.child_ids" t-as="comment" class="media">
<div class="media-body">
<a href="#" t-att-data-id="blog_id.id" class="pull-right" t-if="editable">
<span t-att-class="'label label-success js_unpublish %%s' %% (not comment.website_published and 'hidden' or '')">Click to Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (comment.website_published and 'hidden' or '')">Click to Publish</span>
<span t-att-class="'label label-success js_unpublish %%s' %% (not comment.website_published and 'hidden' or '')">Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (comment.website_published and 'hidden' or '')">Publish</span>
</a>
<t t-raw="comment.body"/>
<small class="pull-right muted text-right">
@ -89,8 +89,8 @@
<li t-foreach="blog_ids" t-as="blog" class="media well">
<div t-att-class="'media-body %%s' %% (blog.website_published and 'css_published' or '')">
<a href="#" t-att-data-id="blog.id" class="pull-right" t-if="editable">
<span t-att-class="'label label-success js_unpublish %%s' %% (not blog.website_published and 'hidden' or '')">Click to Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (blog.website_published and 'hidden' or '')">Click to Publish</span>
<span t-att-class="'label label-success js_unpublish %%s' %% (not blog.website_published and 'hidden' or '')">Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (blog.website_published and 'hidden' or '')">Publish</span>
</a>
<h4 class="media-heading" ><a t-att-href="'/blog/%%s/%%s#comment' %% (blog.res_id, blog.id)" t-field="blog.subject"></a></h4>
<div class="media">

View File

@ -137,8 +137,8 @@
<t t-set="shop_content">
<div class="oe_product_detail span8" id="product_detail">
<a href="#" t-att-data-id="product.id" class="pull-right" t-if="editable">
<span t-att-class="'label label-success js_unpublish %%s' %% (not product.website_published and 'hidden' or '')">Click to Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (product.website_published and 'hidden' or '')">Click to Publish</span>
<span t-att-class="'label label-success js_unpublish %%s' %% (not product.website_published and 'hidden' or '')">Unpublish</span>
<span t-att-class="'label label-important js_publish %%s' %% (product.website_published and 'hidden' or '')">Publish</span>
</a>
<h2 t-field="product.name"></h2>
@ -196,10 +196,10 @@
<t t-foreach="order.order_line" t-as="line">
<tr>
<td>
<a t-att-href="line.product_id"><img class="img-rounded" t-att-src="'data:image/png;base64,' + line.product_id.image"/></a>
<a t-att-href="'/shop/product/%%s/' %% line.product_id"><img class="img-rounded" t-att-src="'data:image/png;base64,' + line.product_id.image"/></a>
</td>
<td>
<a t-att-href="line.product_id"><span t-field="line.product_id.name"/></a><br/>
<a t-att-href="'/shop/product/%%s/' %% line.product_id"><span t-field="line.product_id.name"/></a><br/>
<small t-field="line.product_id.description_sale"/>
</td>
<td>
@ -441,41 +441,27 @@
<div class="container mt48 oe_website_sale">
<div class="row">
<div class="span4 oe_total">
<table class='table table-hover'>
<table class="table table-condensed">
<thead>
<tr>
<th width="80">Product</th>
<th></th>
<th width="80">Price</th>
<th width="140">Quantity</th>
<th>Product</th>
<th>Price</th>
<th>Qty.</th>
</tr>
</thead>
<tbody t-if="not order.order_line">
<tr><td colspan="4"><h3>Your cart is empty</h3></td></tr>
</tbody>
<tbody t-if="order.order_line">
<t t-foreach="order.order_line" t-as="line">
<tr>
<td>
<a t-att-href="line.product_id"><img class="img-rounded" t-att-src="'data:image/png;base64,' + line.product_id.image"/></a>
</td>
<td>
<a t-att-href="line.product_id"><span t-field="line.product_id.name"/></a><br/>
<small t-field="line.product_id.description_sale"/>
</td>
<td>
<span t-field="line.product_id.list_price"></span>
</td>
<td>
<span t-field="line.product_uom_qty"></span>
</td>
<td><t t-esc="line.name"/></td>
<td><t t-esc="line.product_uom_qty"/></td>
<td class="css_alignright"><t t-esc="line.product_id.list_price"/></td>
</tr>
</t>
</tbody>
<tfoot>
<tr> <td colspan="3">Subtotal </td> <td><t t-esc="order.amount_untaxed"/></td></tr>
<tr> <td colspan="3">Taxes </td> <td><t t-esc="order.amount_tax"/></td></tr>
<tr> <td colspan="3"><h4>Total</h4></td> <td><h4><t t-esc="order.amount_total"/></h4></td></tr>
<tr><th>Untaxed Amount</th><td></td><td><t t-esc="order.amount_untaxed"/></td></tr>
<tr><th>Taxes</th><td></td><td><t t-esc="order.amount_tax"/></td></tr>
<tr><th>Total</th><td></td><td><t t-esc="order.amount_total"/></td></tr>
</tfoot>
</table>
</div>

View File

@ -48,8 +48,8 @@ class product_product(osv.osv):
GROUP BY sol.product_id
ORDER BY COUNT(sol.order_id) DESC
LIMIT 8
""" % (id, id)
cr.execute(query)
"""
cr.execute(query, (id, id))
for p in cr.fetchall():
product_ids.append(p[0])