You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

131 lines
10 KiB

<templates>
<t t-name="mail_wall_widgets.UserWallSidebar" class="oe_mail_wall_widgets_user_wall_sidebar">
<div>
<div class="oe_mail_wall_widgets"></div>
</div>
</t>
<t t-name="mail_wall_widgets.Widget">
<div class="oe_goal">
<div>
<a class="oe_update_challenge oe_e" rol="button" t-attf-id="{info.id}" t-attf-model="{info.model}">e</a>
<h4><t t-esc="info.data.name" /><t t-if="info.data.total_count or info.data.total_count==0"> (<t t-esc="info.data.total_count"/>)</t></h4>
</div>
<t t-if="info.model=='mail.wall.widgets.widget' and info.data.type == 'list'">
<div class="oe_table oe_goals_list" t-att-data-model="info.data.model" t-att-data-domain="info.data.domain">
<div t-foreach="info.data.groups" t-as="group" t-if="group.lines.length or group.mandatory" t-attf-class="list_group #{group.class or ''}">
<div t-if="group.label" class="group_label">
<t t-esc="group.label"/>
</div>
<div t-foreach="group.lines" t-as="line" t-attf-class="oe_row oe_goal_outer_box oe_open_record record #{line.state == 'reached' ? 'oe_goal_reached' : ''} #{line.display_mode != 'progress' ? 'oe_no_progress' : ''}" t-att-data-id="line.id" >
<t t-if="line.display_mode == 'progress'">
<div class="oe_goal_progress_background"></div>
<div class="oe_goal_progress" t-attf-style="#{line.display_mode == 'progress' ? 'width: '+line.completeness+'%;' : 'width:0;'}"></div>
<div class="oe_cell oe_goal_current" ><span t-attf-class="#{line.monetary ? 'oe_goal_field_monetary' : 'oe_goal_field_float'}" t-attf-data-id="#{line.monetary ? info.currency : ''}" t-attf-data-precision="#{info.data.precision or ''}"><t t-esc="line.current" /></span></div>
</t>
<div class="oe_cell">
<span t-att-title="line.description"><t t-raw="line.name" /></span>
</div>
</div>
<t t-if="!group.lines.length">
<div class="empty_list">No records</div>
</t>
</div>
<div t-if="info.data.more" class="oe_row oe_goal_outer_box oe_open_record_list">
<div class="oe_goal_progress_background"></div>
<div class="more">
More...
</div>
</div>
</div>
</t>
<t t-if="info.model=='mail.wall.widgets.widget' and info.data.type == 'funnel'">
<div class="oe_table oe_goals_list funnel" t-att-data-model="info.data.model" t-att-data-domain="info.data.domain">
<div t-foreach="info.data.stages" t-as="line" t-attf-class="oe_row oe_goal_outer_box oe_open_record_list_funnel record #{line.state == 'reached' ? 'oe_goal_reached' : ''} #{line.display_mode != 'progress' ? 'oe_no_progress' : ''}" t-att-data-id="line.id" t-att-data-domain="line.domain" >
<t t-if="line.display_mode == 'progress'">
<div class="oe_goal_progress_background"></div>
<div class="oe_goal_progress" t-attf-style="#{line.display_mode == 'progress' ? 'width: '+line.rel_value+'%;' : 'width:0;'}"></div>
<div class="oe_cell oe_goal_current"><span class="oe_goal_field_float" t-attf-data-precision="#{info.data.precision or ''}"><t t-esc="line.rel_value" /></span><span class="small">%</span></div>
</t>
<div class="oe_cell">
<span t-att-title="line.description"><b><t t-raw="line.name" /></b></span> - <span t-attf-class="#{line.monetary ? 'oe_goal_field_monetary' : 'oe_goal_field_float'}" t-attf-data-id="#{line.monetary ? info.currency : ''}" t-attf-data-precision="#{info.data.precision or ''}"><t t-esc="line.abs_value" /></span><t t-if="line.suffix"> <t t-esc="line.suffix"/></t>
</div>
</div>
</div>
</t>
<t t-if="info.model=='mail.wall.widgets.widget' and info.data.type == 'slice'">
<div class="oe_table oe_goals_list funnel" t-att-data-model="info.data.model" t-att-data-domain="info.data.domain">
<t t-set="line" t-value="info.data"/>
<div t-attf-class="oe_row oe_goal_outer_box oe_open_record_list record #{line.state == 'reached' ? 'oe_goal_reached' : ''} #{line.display_mode != 'progress' ? 'oe_no_progress' : ''}" t-att-data-id="line.id" t-att-data-domain="line.won_domain" >
<t t-if="line.display_mode == 'progress'">
<div class="oe_goal_progress_background"></div>
<div class="oe_goal_progress" t-attf-style="#{line.display_mode == 'progress' ? 'width: '+line.slice+'%;' : 'width:0;'}"></div>
<div class="oe_cell oe_goal_current"><t t-esc="line.slice" /><span class="small">%</span></div>
</t>
<div class="oe_cell">
<span t-att-title="line.description"><b><span t-attf-class="#{line.monetary ? 'oe_goal_field_monetary' : ''}" t-attf-data-id="#{line.monetary ? info.currency : ''}"><t t-esc="line.won" /></span></b></span> from <span t-attf-class="#{line.monetary ? 'oe_goal_field_monetary' : 'oe_goal_field_float'}" t-attf-data-id="#{line.monetary ? info.currency : ''}" t-attf-data-precision="#{info.data.precision or ''}"><t t-esc="line.total" /></span><t t-if="line.suffix"> <t t-esc="line.suffix"/></t>
</div>
</div>
</div>
</t>
<t t-if="0 and challenge.visibility_mode == 'ranking'">
<div t-foreach="challenge.lines" t-as="line" class="oe_goals_list oe_table">
<div class="oe_row">
<div class="oe_cell oe_thead" colspan="3" t-attf-title="#{line.description ? line.description : ''}">
<strong><t t-esc="line.name"/></strong>
<br/>
<div class="oe_grey">
<t t-if="line.definition_condition == 'higher'">
Target:
</t>
<t t-if="line.definition_condition == 'lower'">
Target: &lt;=
</t>
<span t-attf-class="#{line.monetary ? 'oe_goal_field_monetary' : ''}" t-attf-data-id="#{line.monetary ? challenge.currency : ''}"><t t-esc="line.target" /></span><t t-if="line.suffix"> <t t-esc="line.suffix"/></t>
</div>
</div>
</div>
<div t-foreach="line.goals" t-as="goal" t-attf-class="#{goal.id == line.own_goal_id ? 'oe_bold' : ''}">
<div t-attf-class="oe_row oe_goal_outer_box #{goal.state == 'reached' ? 'oe_goal_reached' : ''} #{line.display_mode != 'progress' ? 'oe_no_progress' : ''}">
<t t-if="line.display_mode == 'progress'">
<div class="oe_goal_progress_background"></div>
<div class="oe_goal_progress" t-attf-style="#{line.display_mode == 'progress' ? 'width: '+goal.completeness+'%;' : 'width:0;'}"></div>
</t>
<div class="oe_cell col0"><t t-esc="goal.rank" /></div>
<div class="oe_cell col1"><img class="oe_user_avatar" t-attf-alt="#{goal.name}" t-attf-data-id="#{goal.user_id}"/></div>
<div class="oe_cell col2">
<t t-if="line.display_mode == 'progress'">
<!-- progress, action on current value -->
<t t-esc="goal.name"/><br/>
<t t-if="goal.id != line.own_goal_id or (line.computation_mode != 'manually' and !line.action)">
<span t-attf-class="#{line.monetary ? 'oe_goal_field_monetary' : ''}" t-attf-data-id="#{line.monetary ? challenge.currency : ''}"><t t-esc="goal.current" /></span><t t-if="line.suffix"> <t t-esc="line.suffix"/></t>
</t>
<t t-if="goal.id == line.own_goal_id and (line.action or line.computation_mode == 'manually')">
<a class="oe_goal_action" t-att-id="line.own_goal_id">
<span t-attf-class="#{line.monetary ? 'oe_goal_field_monetary' : ''}" t-attf-data-id="#{line.monetary ? challenge.currency : ''}"><t t-esc="goal.current" /></span><t t-if="line.suffix"> <t t-esc="line.suffix"/></t>
</a>
</t>
</t>
<t t-if="line.display_mode != 'progress'">
<!-- not progress, action on user name -->
<t t-if="goal.id != line.own_goal_id or (line.computation_mode != 'manually' and !line.action)">
<t t-esc="goal.name"/>
</t>
<t t-if="goal.id == line.own_goal_id and (line.action or line.computation_mode == 'manually')">
<a class="oe_goal_action" t-att-id="line.own_goal_id"><t t-esc="goal.name"/></a>
</t>
</t>
</div>
</div>
</div>
</div>
</t>
</div>
</t>
</templates>