[ADD] project: task kanban view: user avatar is now used instead of gravatar. It now takes all height in the right-side of the context box, instead of only the right-side of title box. Added a css file for new style definitions.
bzr revid: tde@openerp.com-20120308094503-cv1xt4as5lymxe95
This commit is contained in:
@@ -130,7 +130,6 @@
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="type">kanban</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<kanban>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
|
||||
@@ -67,6 +67,9 @@ Dashboard for project members that includes:
|
||||
'test/project_process.yml',
|
||||
'test/task_process.yml',
|
||||
],
|
||||
'css': [
|
||||
'static/src/css/project_task.css',
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'application': True,
|
||||
|
||||
@@ -344,44 +344,46 @@
|
||||
<t t-if="record.kanban_state.raw_value === 'done'" t-set="border">oe_kanban_color_green</t>
|
||||
<div t-attf-class="#{kanban_color(record.color.raw_value)} #{border || ''}">
|
||||
<div class="oe_kanban_box oe_kanban_color_border">
|
||||
<table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
|
||||
<tr>
|
||||
<td align="left" valign="middle" width="16">
|
||||
<a t-if="record.priority.raw_value == 1" icon="star-on" type="object" name="set_normal_priority"/>
|
||||
<a t-if="record.priority.raw_value != 1" icon="star-off" type="object" name="set_high_priority" style="opacity:0.6; filter:alpha(opacity=60);"/>
|
||||
</td>
|
||||
<td align="left" valign="middle" class="oe_kanban_title" tooltip="task_details">
|
||||
<field name="name"/>
|
||||
</td>
|
||||
<td valign="top" width="22">
|
||||
<img t-att-src="kanban_gravatar(record.user_email.value, 22)" class="oe_kanban_gravatar" t-att-title="record.user_id.value"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
|
||||
<div class="oe_kanban_description">
|
||||
<t t-esc="kanban_text_ellipsis(record.description.value, 160)"/>
|
||||
<i t-if="record.date_deadline.raw_value">
|
||||
<t t-if="record.description.raw_value">, </t>
|
||||
<field name="date_deadline"/>
|
||||
</i>
|
||||
<span class="oe_kanban_project_times" style="white-space: nowrap; padding-left: 5px;">
|
||||
<t t-set="hours" t-value="record.remaining_hours.raw_value"/>
|
||||
<t t-set="times" t-value="[
|
||||
[1, (hours gte 1 and hours lt 2)]
|
||||
,[2, (hours gte 2 and hours lt 5)]
|
||||
,[5, (hours gte 5 and hours lt 10)]
|
||||
,[10, (hours gte 10)]
|
||||
]"/>
|
||||
<t t-foreach="times" t-as="time"
|
||||
><a t-if="!time[1]" t-attf-data-name="set_remaining_time_#{time[0]}"
|
||||
type="object" class="oe_kanban_button"><t t-esc="time[0]"/></a
|
||||
><b t-if="time[1]" class="oe_kanban_button oe_kanban_button_active"><t t-esc="Math.round(hours)"/></b
|
||||
></t>
|
||||
<a name="do_open" states="draft" string="Validate planned time and open task" type="object" class="oe_kanban_button oe_kanban_button_active">!</a>
|
||||
</span>
|
||||
<div class="oe_proj_task_avatar_box">
|
||||
<img t-att-src="kanban_image('res.users', 'avatar_mini', record.user_id.raw_value[0])" class="oe_kanban_avatar" t-att-title="record.user_id.value"/>
|
||||
</div>
|
||||
<div class="oe_proj_task_content_box">
|
||||
<table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
|
||||
<tr>
|
||||
<td align="left" valign="middle" width="16">
|
||||
<a t-if="record.priority.raw_value == 1" icon="star-on" type="object" name="set_normal_priority"/>
|
||||
<a t-if="record.priority.raw_value != 1" icon="star-off" type="object" name="set_high_priority" style="opacity:0.6; filter:alpha(opacity=60);"/>
|
||||
</td>
|
||||
<td align="left" valign="middle" class="oe_kanban_title" tooltip="task_details">
|
||||
<field name="name"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
|
||||
<div class="oe_kanban_description">
|
||||
<t t-esc="kanban_text_ellipsis(record.description.value, 160)"/>
|
||||
<i t-if="record.date_deadline.raw_value">
|
||||
<t t-if="record.description.raw_value">, </t>
|
||||
<field name="date_deadline"/>
|
||||
</i>
|
||||
<span class="oe_kanban_project_times" style="white-space: nowrap; padding-left: 5px;">
|
||||
<t t-set="hours" t-value="record.remaining_hours.raw_value"/>
|
||||
<t t-set="times" t-value="[
|
||||
[1, (hours gte 1 and hours lt 2)]
|
||||
,[2, (hours gte 2 and hours lt 5)]
|
||||
,[5, (hours gte 5 and hours lt 10)]
|
||||
,[10, (hours gte 10)]
|
||||
]"/>
|
||||
<t t-foreach="times" t-as="time"
|
||||
><a t-if="!time[1]" t-attf-data-name="set_remaining_time_#{time[0]}"
|
||||
type="object" class="oe_kanban_button"><t t-esc="time[0]"/></a
|
||||
><b t-if="time[1]" class="oe_kanban_button oe_kanban_button_active"><t t-esc="Math.round(hours)"/></b
|
||||
></t>
|
||||
<a name="do_open" states="draft" string="Validate planned time and open task" type="object" class="oe_kanban_button oe_kanban_button_active">!</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="oe_kanban_clear"/>
|
||||
</div>
|
||||
<div class="oe_kanban_clear"/>
|
||||
</div>
|
||||
<div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
|
||||
<div class="oe_kanban_left">
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
.openerp .oe_proj_task_content_box {
|
||||
margin-right: 41px;
|
||||
}
|
||||
|
||||
.openerp .oe_proj_task_avatar_box {
|
||||
float: right;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.openerp .oe_kanban_avatar {
|
||||
display: block;
|
||||
width: 40px;
|
||||
height: auto;
|
||||
clip: rect(5px, 40px, 45px, 0px);
|
||||
}
|
||||
|
||||
.openerp .oe_kanban_avatar_wide {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
clip: rect(0px, 45px, 40px, 05px);
|
||||
}
|
||||
Reference in New Issue
Block a user