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

56 lines
3.3 KiB
XML

<templates>
<t t-name="gamification.user_wall_sidebar" class="oe_gamification_user_wall_sidebar">
<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">
<em><a class="oe_update_plan" rol="button" t-attf-id="{plan.id}">refresh</a></em>
<h3><t t-esc="plan.name"/></h3>
<t t-if="plan.visibility_mode == 'progressbar'">
<ul class="oe_goals_list">
<li t-foreach="plan.goals" t-as="goal">
<a class="oe_goal_action" t-att-id="goal.id">
<strong t-attf-class="#{goal.state == 'reached' ? 'oe_goal_reached' : goal.state == 'failed' ? 'oe_goal_failed' : ''}"><t t-esc="goal.type_name" /></strong>
</a>
<t t-if="goal.type_description">
<a class="oe_show_description" t-att-id="goal.id">?</a>
<p t-att-class="'oe_type_description oe_type_description_' + goal.id"><t t-esc="goal.type_description" /></p>
</t>
<p>
<t t-if="goal.type_condition == 'higher'">
<progress t-att-value="goal.completeness" max="100"/>
</t>
<t t-if="goal.type_condition == 'lower'">
<t t-esc="goal.current" /> (less than <t t-esc="goal.target_goal"/>)
</t>
<!-- <a class="oe_update_goal" rol="button" t-attf-id="{goal.id}">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QMWCRMG1/sI6gAAAR1JREFUKM910T9L1nEUBfCPP39S4pAuba0FDoEhbc6CLkEUvQMb7hKFDU29gCYPNFUoiH9WRwedhBB8CS1Bg7WEKKH12PJ94GnoTJfDOece7h3TkGQCk+hxVVVnjZ/Gz6q6TqJLMvTcxRG+4l0T38MXPE0yVlW6qhoa5jCLG/jQuEXM4BOWk+hb0n2sYQVdVX1uhvc4xRbe4rBPMo4n+I7NqroYqXmFXTzEC9zpcbOt3m8CIzVhkGSvGR50GMdtDPwfZzjHoGvCUyygH9YZqQW3MIXjHr9wgFU8axdRVZJMocNjHONbV1W/sYMf+Ig3SSZb8kts4xFeV9VF19JO8GpEdNnmFSxhv6oO8M+n1zGP51X1J8lsS1/FRpIe/gIpymSOkJCtuQAAAABJRU5ErkJggg==" alt="update" />
</a> -->
</p>
</li>
</ul>
</t>
<t t-if="plan.visibility_mode == 'board'">
<table width="100%" border="1" t-foreach="plan.planlines" t-as="planline">
<tr>
<th colspan="4"><t t-esc="planline.goal_type"/></th>
</tr>
<tr>
<th>#</th>
<th>Pers.</th>
<th>compl.</th>
<th>Current</th>
</tr>
<tr t-foreach="planline.goals" t-as="goal" t-attf-class="#{goal.completness >= 100 ? 'oe_bold' : ''}">
<td><t t-esc="goal.rank" /></td>
<td><t t-esc="goal.user_name" /></td>
<td><progress t-att-value="goal.completeness" max="100" /></td>
<td><t t-esc="goal.current" />/<t t-esc="goal.target_goal" /></td>
</tr>
</table>
</t>
</div>
</t>
</templates>