Browse Source

[MOD] xml of matrix template

pull/487/head
Sebastian Kennedy 7 years ago
parent
commit
1d25ec1c49
  1. 21
      web_widget_x2many_2d_matrix/static/src/xml/web_widget_x2many_2d_matrix.xml

21
web_widget_x2many_2d_matrix/static/src/xml/web_widget_x2many_2d_matrix.xml

@ -15,12 +15,23 @@
<tr t-foreach="widget.get_y_axis_values()" t-as="y" t-att-data-y="y">
<th><t t-esc="widget.get_y_axis_label(y)" /></th>
<td t-foreach="widget.get_x_axis_values()" t-as="x" t-att-class="'oe_list_field_cell' + (widget.is_numeric ? ' oe_number' : '')" t-att-data-x="x">
<span t-att-class="widget.get_xy_value_class()">
<t t-if="widget.row_xy_exists(x, y)">
<input class="edit" t-att-data-id="widget.get_xy_id(x, y)" t-att-value="widget.format_xy_value(widget.get_xy_value(x, y))" t-att="widget.get_xy_att(x, y)"/>
<span class="read"><t t-esc="widget.format_xy_value(widget.get_xy_value(x, y))" /></span>
<t t-if="widget.row_xy_exists(x, y) == false">
<span t-att-class="widget.get_xy_value_class()"/>
</t>
<t t-if="widget.row_xy_exists(x, y)">
<t t-if="widget.boolean_is_true(x, y)">
<span t-att-class="widget.get_xy_value_class()" style="background-color: rgba(153, 0, 204, 0.3);">
<input class="edit" t-att-data-id="widget.get_xy_id(x, y)" t-att-value="widget.format_xy_cell_value(widget.boolean_is_true(x, y),widget.get_xy_value(x, y))" t-att="widget.get_xy_att(x, y)"/>
<span class="read"><t t-esc="widget.format_xy_cell_value(widget.boolean_is_true(x, y),widget.get_xy_value(x, y))" /></span>
</span>
</t>
</span>
<t t-if="widget.boolean_is_true(x, y) != true">
<span t-att-class="widget.get_xy_value_class()">
<input class="edit" t-att-data-id="widget.get_xy_id(x, y)" t-att-value="widget.format_xy_value(widget.get_xy_value(x, y))" t-att="widget.get_xy_att(x, y)"/>
<span class="read"><t t-esc="widget.format_xy_cell_value(widget.boolean_is_true(x, y),widget.get_xy_value(x, y))" /></span>
</span>
</t>
</t>
</td>
<td t-if="widget.show_row_totals" class="row_total oe_number" t-att-data-y="y"/>
</tr>

Loading…
Cancel
Save