summaryrefslogtreecommitdiff
path: root/addons/gamification
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-08-10 17:01:05 +0200
committerChristophe Simonis <chs@odoo.com>2017-08-10 17:01:05 +0200
commit48b2ce60ed12b9b0f3aaa0322465504798bd154e (patch)
tree0ac2c53a78f678ad4701943eb9eab6a4c8f5ff48 /addons/gamification
parent298eaca4d1e268c43185e9c1dd6d6973e02d9b57 (diff)
parent85571bb78c9acc4e867cc3b480be9236a756fc22 (diff)
[MERGE] forward port branch saas-16 up to 85571bb78c9
Diffstat (limited to 'addons/gamification')
-rw-r--r--addons/gamification/data/goal_base.xml21
1 files changed, 11 insertions, 10 deletions
diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml
index 3b983ebd256..de76683ddc0 100644
--- a/addons/gamification/data/goal_base.xml
+++ b/addons/gamification/data/goal_base.xml
@@ -98,7 +98,7 @@
</table>
% else:
<span style="color:#A8A8A8;font-size:13px;">
- The following message contains the current progress for the challenge <strong>${object.name}</strong>.
+ Challenge: <strong>${object.name}</strong>.
</span>
% for line in challenge_lines:
<!-- Header + Button table -->
@@ -113,7 +113,7 @@
% if len(line['goals'])>2:
<table cellspacing="0" cellpadding="0" width="100%" style="margin-top:10px;">
<tr><td style="padding:0 30px;">
- <table cellspacing="0" cellpadding="0" width="100%">
+ <table cellspacing="0" cellpadding="0" width="100%" style="table-layout: fixed;">
<tr>
% set top_goals = [line['goals'][1], line['goals'][0], line['goals'][2]]
% for goal in top_goals:
@@ -144,9 +144,10 @@
<div style="height:${heightA}px;">
${extra_div | safe}
<div style="height:55px;">
- <img style="margin-bottom:5px;width:50px;height:50px;border-radius:50%;" src="/web/image?model=res.users&amp;field=image_small&amp;id=${goal['user_id']}" alt=""/>
+ % set path = object.env['res.users'].browse(goal['user_id']).partner_id.image_small
+ <img style="margin-bottom:5px;width:50px;height:50px;border-radius:50%;" src="data:image/jpeg;base64,${path}" alt="${goal['name']}"/>
</div>
- <div align="center" style ="color:${bgColor};">
+ <div align="center" style ="color:${bgColor};height:20px">
${goal['name']}
</div
</div>
@@ -177,8 +178,8 @@
<table cellspacing="0" cellpadding="0" width="100%" style="margin-top:30px;margin-bottom:5px;color:#666666;">
<thead>
<tr style="color:#9A6C8E; font-size:12px;">
- <th style="width:10%;text-align:center;">Rank</th>
- <th style="width:15%;text-align:left;">Name</th>
+ <th style="width:15%;text-align:center;">Rank</th>
+ <th style="width:25%;text-align:left;">Name</th>
<th style="width:30%;text-align:right;">Performance
% if line['suffix']:
(${line['suffix']})
@@ -199,12 +200,12 @@
% set tdColor = 'gray'
% set mutedColor = '#AAAAAA'
% set tdPercentageColor = '#9A6C8E'
- <td width="10%" align="center" valign="middle" style="background-color:${tdBgColor};padding :5px 0;font-size:20px;">${goal['rank']+1}
+ <td width="15%" align="center" valign="middle" style="background-color:${tdBgColor};padding :5px 0;font-size:20px;">${goal['rank']+1}
</td>
- <td width="15%" align="left" valign="middle" style="background-color:${tdBgColor};padding :5px 0;font-size:13px;">${goal['name']}</td>
- <td width="20%" align="right" style="background-color:${tdBgColor};padding:5px 0;line-height:1;">${"%.2f" % goal['current']}<br/><span style="font-size:13px;color:${mutedColor};">on ${"%.2f" % line['target']}</span>
+ <td width="25%" align="left" valign="middle" style="background-color:${tdBgColor};padding :5px 0;font-size:13px;">${goal['name']}</td>
+ <td width="30%" align="right" style="background-color:${tdBgColor};padding:5px 0;line-height:1;">${"%.2f" % goal['current']}<br/><span style="font-size:13px;color:${mutedColor};">on ${"%.2f" % line['target']}</span>
</td>
- <td width="20%" style="color:${tdPercentageColor};background-color:${tdBgColor};padding-right:15px;font-size:22px;" align="right"><strong>${goal['completeness'] | int}%</strong></td>
+ <td width="30%" style="color:${tdPercentageColor};background-color:${tdBgColor};padding-right:15px;font-size:22px;" align="right"><strong>${goal['completeness'] | int}%</strong></td>
</tr>
<tr>
<td colspan="5" style="height:1px;background-color:#DADADA;"></td>