odoo/addons/web_kanban/static/src/xml/web_kanban.xml

43 lines
1.8 KiB
XML

<template>
<t t-name="KanbanView">
<table style="width:100%;" class="oe_kanban_view">
<tr>
<td>
<div class="oe_form_header">
<button type="button" class="oe_kanban_button_new">New</button>
</div>
</td>
</tr>
<tr>
<td t-foreach="data" t-as="columns" class="oe_table_column" t-att-id="'column_' + columns.value">
<img t-att-id="columns.value" class="fold-columns-icon" src="/web_kanban/static/src/img/minus-icon.png"/>
<div class="oe_fold_column oe_column_heading" t-att-id="'column_' + columns.value">
<t t-if="columns.value and columns.header" t-esc="columns.header"/>
</div>
<div t-foreach="columns.aggregates" t-as="aggregate">
<i><u><t t-esc="aggregate"/>:</u> <t t-esc="aggregate_value"/></i>
</div>
</td>
</tr>
<tr>
<td t-foreach="data" t-as="columns" class="oe_column oe_table_column" t-att-id="'column_' + columns.value" t-attf-style="width: #{Math.round(99 / data.length)}%">
<p class="oe_vertical_text" t-att-id="'column_' + columns.value"><t t-esc="columns.header"/></p>
<div t-foreach="columns.records" t-as="record" class="oe_fold_column oe_kanban_record" t-att-id="'main_' + record.id"/>
</td>
</tr>
</table>
</t>
<t t-name="KanbanColorPicker">
<table cellspacing="0" cellpadding="0" border="0" class="oe_kanban_color_picker">
<tr>
<t t-foreach="colors" t-as="color">
<td t-att-bgcolor="color">
<a href="#" t-att-data-color="color_index + 1"/>
</td>
<t t-if="((color_index + 1) % Math.round(colors.length / columns)) == 0">&lt;/tr&gt;&lt;tr&gt;</t>
</t>
</tr>
</table>
</t>
</template>