Browse Source
[IMP] Improve style of Mis report widget buttons. Add report name in the widget.
pull/189/head
[IMP] Improve style of Mis report widget buttons. Add report name in the widget.
pull/189/head
Adrien Peiffer (ACSONE)
9 years ago
3 changed files with 68 additions and 59 deletions
-
1mis_builder/models/mis_builder.py
-
5mis_builder/static/src/css/custom.css
-
121mis_builder/static/src/xml/mis_widget.xml
@ -1,68 +1,71 @@ |
|||
<template> |
|||
<t t-name="mis_builder.MisReport"> |
|||
<div class="oe_mis_builder_content"> |
|||
<div class="oe_mis_builder_buttons oe_right"> |
|||
<button class="oe_mis_builder_print"><img src="/web/static/src/img/icons/gtk-print.png"/> Print</button> |
|||
<button class="oe_mis_builder_export"><img src="/web/static/src/img/icons/gtk-go-down.png"/>Export</button> |
|||
<button style="display: none;" class="oe_mis_builder_settings"><img src="/web/static/src/img/icons/gtk-execute.png"/> Settings</button> |
|||
</div> |
|||
<table t-if="widget.mis_report_data" class="oe_list_content mis_builder"> |
|||
<thead> |
|||
<t t-foreach="widget.mis_report_data.header" t-as="h"> |
|||
<tr class="oe_list_header_columns"> |
|||
<th class="oe_list_header_char"> |
|||
<div> |
|||
<t t-esc="h_value.kpi_name"/> |
|||
</div> |
|||
</th> |
|||
<th t-foreach="h_value.cols" t-as="col" class="oe_list_header_char mis_builder_ralign" t-att-colspan="col.colspan"> |
|||
<div> |
|||
<t t-esc="col.name"/> |
|||
</div> |
|||
<t t-if="widget.mis_report_data"> |
|||
<h2><t t-esc="widget.mis_report_data.report_name" /></h2> |
|||
<div class="oe_mis_builder_buttons oe_right oe_button_box"> |
|||
<button class="oe_mis_builder_print btn btn-sm oe_button"><img src="/web/static/src/img/icons/gtk-print.png"/> Print</button> |
|||
<button class="oe_mis_builder_export btn btn-sm oe_button"><img src="/web/static/src/img/icons/gtk-go-down.png"/>Export</button> |
|||
<button style="display: none;" class="oe_mis_builder_settings btn btn-sm oe_button"><img src="/web/static/src/img/icons/gtk-execute.png"/> Settings</button> |
|||
</div> |
|||
<table class="oe_list_content mis_builder"> |
|||
<thead> |
|||
<t t-foreach="widget.mis_report_data.header" t-as="h"> |
|||
<tr class="oe_list_header_columns"> |
|||
<th class="oe_list_header_char"> |
|||
<div> |
|||
<t t-esc="h_value.kpi_name"/> |
|||
</div> |
|||
</th> |
|||
<th t-foreach="h_value.cols" t-as="col" class="oe_list_header_char mis_builder_ralign" t-att-colspan="col.colspan"> |
|||
<div> |
|||
<t t-esc="col.name"/> |
|||
</div> |
|||
<div> |
|||
<t t-esc="col.date"/> |
|||
</div> |
|||
</th> |
|||
</tr> |
|||
</t> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="widget.mis_report_data.content" t-as="c"> |
|||
<td t-att="{'style': c_value.default_style}"> |
|||
<div> |
|||
<t t-esc="col.date"/> |
|||
</div> |
|||
</th> |
|||
</tr> |
|||
</t> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="widget.mis_report_data.content" t-as="c"> |
|||
<td t-att="{'style': c_value.default_style}"> |
|||
<div> |
|||
<t t-esc="c_value.kpi_name"/> |
|||
</div> |
|||
</td> |
|||
<t t-foreach="c_value.cols" t-as="value"> |
|||
<td t-att="{'style': c_value.default_style}" class="mis_builder_ralign"> |
|||
<div t-att="{'style': value_value.style, 'title': value_value.val_c}"> |
|||
<t t-if="value_value.drilldown"> |
|||
<a href="javascript:void(0)" |
|||
class="mis_builder_drilldown" |
|||
t-att-data-drilldown="JSON.stringify(value_value.drilldown)" |
|||
t-att-data-period-id="JSON.stringify(value_value.period_id)" |
|||
t-att-data-expr="JSON.stringify(value_value.expr)" |
|||
> |
|||
<t t-esc="value_value.val_r"/> |
|||
</a> |
|||
</t> |
|||
<t t-if="!value_value.drilldown"> |
|||
<t t-esc="value_value.val_r"/> |
|||
</t> |
|||
<t t-esc="c_value.kpi_name"/> |
|||
</div> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
</tbody> |
|||
<tfoot> |
|||
<tr> |
|||
<td class="oe_list_footer" /> |
|||
<t t-foreach="widget.mis_report_data.header" t-as="f"> |
|||
<td t-foreach="f_value.cols" class="oe_list_footer" /> |
|||
</t> |
|||
</tr> |
|||
</tfoot> |
|||
</table> |
|||
<t t-foreach="c_value.cols" t-as="value"> |
|||
<td t-att="{'style': c_value.default_style}" class="mis_builder_ralign"> |
|||
<div t-att="{'style': value_value.style, 'title': value_value.val_c}"> |
|||
<t t-if="value_value.drilldown"> |
|||
<a href="javascript:void(0)" |
|||
class="mis_builder_drilldown" |
|||
t-att-data-drilldown="JSON.stringify(value_value.drilldown)" |
|||
t-att-data-period-id="JSON.stringify(value_value.period_id)" |
|||
t-att-data-expr="JSON.stringify(value_value.expr)" |
|||
> |
|||
<t t-esc="value_value.val_r"/> |
|||
</a> |
|||
</t> |
|||
<t t-if="!value_value.drilldown"> |
|||
<t t-esc="value_value.val_r"/> |
|||
</t> |
|||
</div> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
</tbody> |
|||
<tfoot> |
|||
<tr> |
|||
<td class="oe_list_footer" /> |
|||
<t t-foreach="widget.mis_report_data.header" t-as="f"> |
|||
<td t-foreach="f_value.cols" class="oe_list_footer" /> |
|||
</t> |
|||
</tr> |
|||
</tfoot> |
|||
</table> |
|||
</t> |
|||
</div> |
|||
</t> |
|||
</template> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue