[FIX] add template to client actions missing them for new rendering workflow
bzr revid: xmo@openerp.com-20110822133002-aszaynadwfiuqulf
This commit is contained in:
@@ -285,6 +285,7 @@ if (!openerp.base_dashboard) {
|
||||
openerp.base_dashboard = {};
|
||||
}
|
||||
openerp.base_dashboard.ConfigOverview = openerp.base.View.extend({
|
||||
template: 'ConfigOverview',
|
||||
init: function (parent, element_id) {
|
||||
this._super(parent, element_id);
|
||||
this.dataset = new openerp.base.DataSetSearch(
|
||||
@@ -312,7 +313,7 @@ openerp.base_dashboard.ConfigOverview = openerp.base.View.extend({
|
||||
})
|
||||
.groupBy(function (record) {return record.category})
|
||||
.value();
|
||||
this.$element.html(QWeb.render('ConfigOverview', {
|
||||
this.$element.html(QWeb.render('ConfigOverview.content', {
|
||||
completion: 100 * progress.done / progress.total,
|
||||
groups: grouped_todos
|
||||
}));
|
||||
@@ -347,6 +348,7 @@ openerp.base_dashboard.ConfigOverview = openerp.base.View.extend({
|
||||
openerp.base.client_actions.add(
|
||||
'board.home.applications', 'openerp.base_dashboard.ApplicationTiles');
|
||||
openerp.base_dashboard.ApplicationTiles = openerp.base.View.extend({
|
||||
template: 'ApplicationTiles',
|
||||
start: function () {
|
||||
var self = this;
|
||||
return new openerp.base.DataSetSearch(
|
||||
@@ -359,7 +361,7 @@ openerp.base_dashboard.ApplicationTiles = openerp.base.View.extend({
|
||||
}
|
||||
self.$element
|
||||
.append(QWeb.render(
|
||||
'ApplicationTiles', {rows: rows}))
|
||||
'ApplicationTiles.content', {rows: rows}))
|
||||
.find('.oe-dashboard-home-tile')
|
||||
.click(function () {
|
||||
var $this = $(this);
|
||||
@@ -372,6 +374,7 @@ openerp.base_dashboard.ApplicationTiles = openerp.base.View.extend({
|
||||
openerp.base.client_actions.add(
|
||||
'board.home.widgets', 'openerp.base_dashboard.Widgets');
|
||||
openerp.base_dashboard.Widgets = openerp.base.View.extend({
|
||||
template: 'HomeWidgets',
|
||||
start: function () {
|
||||
return new openerp.base.DataSetSearch(
|
||||
this, 'res.widget.user', null,
|
||||
|
||||
@@ -64,7 +64,8 @@
|
||||
</board>
|
||||
</form>
|
||||
</t>
|
||||
<div t-name="ConfigOverview" class="oe-dashboard-config-overview">
|
||||
<div t-name="ConfigOverview" class="oe-dashboard-config-overview"/>
|
||||
<t t-name="ConfigOverview.content">
|
||||
<div class="oe-config-progress">
|
||||
<h6 class="oe-config-progress-title">
|
||||
progress: <t t-esc="Math.round(completion)"/>%
|
||||
@@ -88,30 +89,28 @@
|
||||
</t>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div t-name="ApplicationTiles" class="oe-dashboard-home-tiles">
|
||||
<table width="100%">
|
||||
<tr t-foreach="rows" t-as="row">
|
||||
<td t-foreach="row" t-as="application" width="33.3%">
|
||||
<div class="oe-dashboard-home-tile"
|
||||
t-att-data-menuid="application.id">
|
||||
<div class="oe-dashboard-home-tile-icon">
|
||||
<img t-if="application.web_icon_data"
|
||||
t-att-src="'data:image/png;base64,' + application.web_icon_data"
|
||||
/><img t-if="application.web_icon_hover_data" class="hover"
|
||||
t-att-src="'data:image/png;base64,' + application.web_icon_hover_data"/>
|
||||
</div>
|
||||
<span><t t-esc="application.name"/></span>
|
||||
</t>
|
||||
<div t-name="ApplicationTiles" class="oe-dashboard-home-tiles"/>
|
||||
<table t-name="ApplicationTiles.content" width="100%">
|
||||
<tr t-foreach="rows" t-as="row">
|
||||
<td t-foreach="row" t-as="application" width="33.3%">
|
||||
<div class="oe-dashboard-home-tile"
|
||||
t-att-data-menuid="application.id">
|
||||
<div class="oe-dashboard-home-tile-icon">
|
||||
<img t-if="application.web_icon_data"
|
||||
t-att-src="'data:image/png;base64,' + application.web_icon_data"
|
||||
/><img t-if="application.web_icon_hover_data" class="hover"
|
||||
t-att-src="'data:image/png;base64,' + application.web_icon_hover_data"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div t-name="HomeWidgets" class="oe-dashboard-home-widgets">
|
||||
<div class="oe-dashboard-home-widgets-widget"
|
||||
t-foreach="widgets" t-as="widget">
|
||||
<h3><t t-esc="widget.title"/></h3>
|
||||
<iframe width="100%" frameborder="0" t-att-src="url + widget.id"/>
|
||||
</div>
|
||||
<span><t t-esc="application.name"/></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div t-name="HomeWidgets" class="oe-dashboard-home-widgets"/>
|
||||
<div t-name="HomeWidgets.content" class="oe-dashboard-home-widgets-widget"
|
||||
t-foreach="widgets" t-as="widget">
|
||||
<h3><t t-esc="widget.title"/></h3>
|
||||
<iframe width="100%" frameborder="0" t-att-src="url + widget.id"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user