odoo/addons/gamification/static/src/xml/gamification.xml

101 lines
6.2 KiB
XML

<templates>
<t t-name="gamification.user_wall_sidebar" class="oe_gamification_user_wall_sidebar">
<div class="oe_gamification_suggestion"><em>No challenge suggestions</em></div>
<div class="oe_gamification_goal"><em>Your goal list is empty</em></div>
</t>
<t t-name="gamification.goal_list_to_do">
<div t-foreach="widget.goals_info.info" t-as="plan" class="oe_goal">
<div>
<h4 style="display:inline-block;"><t t-esc="plan.name" /></h4>
<a class="oe_update_plan oe_e" rol="button" t-attf-id="{plan.id}">e</a>
</div>
<t t-if="plan.visibility_mode == 'progressbar'">
<ul class="oe_goals_list">
<li t-foreach="plan.goals" t-as="goal" t-attf-class="#{goal.state == 'reached' ? 'oe_goal_reached' : ''}">
<div class="oe_goal_outer_box">
<div class="oe_goal_progress" t-attf-style="#{goal.type_display == 'progress' ? 'width: '+goal.completeness+'%;' : 'width:0;'}"></div>
<div class="oe_goal_inner_box">
<t t-if="goal.computation_mode != 'manually' and !goal.type_action">
<span t-att-title="goal.type_description"><t t-esc="goal.type_name" /></span>
</t>
<t t-if="goal.type_action">
<span t-att-title="goal.type_description"><a class="oe_goal_action" t-att-id="goal.id"><t t-esc="goal.type_name" /></a></span>
</t>
<t t-if="goal.computation_mode == 'manually' and !goal.type_action">
<span t-att-title="goal.type_description"><t t-esc="goal.type_name" /></span>
<a class="oe_goal_action oe_e" t-att-id="goal.id">&amp;</a>
</t>
<t t-if="goal.type_display == 'progress'">
<t t-if="goal.type_condition == 'higher'">
<t t-esc="goal.current" />/<span t-attf-class="#{goal.type_monetary ? 'oe_goal_field_monetary' : ''}"><t t-esc="goal.target_goal"/></span>
<t t-if="goal.type_unit"><t t-esc="goal.type_unit"/></t>
</t>
<t t-if="goal.type_condition == 'lower'">
<t t-esc="goal.current" /> (less than
<span t-attf-class="#{goal.type_monetary ? 'oe_goal_field_monetary' : ''}"><t t-esc="goal.target_goal"/></span>
<t t-if="goal.type_unit"><t t-esc="goal.type_unit"/></t>
)
</t>
</t>
</div>
</div>
</li>
</ul>
</t>
<t t-if="plan.visibility_mode == 'board'">
<table t-foreach="plan.planlines" t-as="planline" class="oe_goals_list">
<thead>
<tr>
<th colspan="4" t-attf-title="#{planline.type_description ? planline.type_description : ''}">
<strong><t t-esc="planline.type_name"/></strong>
<t t-if="planline.type_computation_mode == 'manually' or planline.type_action">
<a class="oe_goal_action oe_e" t-att-id="planline.own_goal_id">&amp;</a>
</t>
<br/>
<t t-if="planline.type_condition == 'higher'">
(Goal: max
</t>
<t t-if="planline.type_condition == 'lower'">
(Goal: min
</t>
<span t-attf-class="#{planline.type_monetary ? 'oe_goal_field_monetary' : ''}"><t t-esc="planline.target_goal" /></span><t t-if="planline.type_unit"> <t t-esc="planline.type_unit"/></t>)
</th>
</tr>
</thead>
<tbody>
<tr t-foreach="planline.goals" t-as="goal" t-attf-class="#{goal.id == planline.own_goal_id ? 'oe_bold' : ''}">
<div style="background: #fff;">
<th class="col0"><t t-esc="goal.rank" /></th>
<td class="col1"><img class="oe_user_avatar" t-attf-alt="#{goal.user_name}" t-attf-data-id="#{goal.user_id}"/></td>
<td class="col2">
<div class="oe_goal_outer_box">
<div class="oe_goal_progress" t-attf-style="#{planline.type_display == 'progress' ? 'width: '+goal.completeness+'%;' : 'width:0;'}"></div>
<div class="oe_goal_inner_box">
<t t-esc="goal.user_name"/><br/>
<span t-attf-class="#{planline.type_monetary ? 'oe_goal_field_monetary' : ''}"><t t-esc="goal.current" /></span><t t-if="planline.type_unit"> <t t-esc="planline.type_unit"/></t>
</div>
</div>
</td>
</div>
</tr>
</tbody>
</table>
</t>
</div>
</t>
<t t-name="gamification.challenge_suggestions">
<h3>Suggestions</h3>
<ul t-foreach="widget.challenge_suggestions.info" t-as="challenge" class="oe_goals_list">
<li>
<strong><a class="oe_challenge_reply" t-attf-title="#{challenge.description.value ? challenge.description.value : ''}" t-attf-id="{challenge.id}" title="more details..."><t t-esc="challenge.name"/></a></strong>
</li>
</ul>
</t>
</templates>