[IMP] base: website_profile: improve the rank layout
Currently if a user is having huge number of karma/xp (for example 10000), when viewing the website profile, these numbers overlap the design of a next rank layout card. This commit formats the karma/xp into decimal number (allowing up to two decimal points so that the information is meaningful) and thus reducing the space being occupied by large numbers. task-2792149 Part-of: odoo/odoo#87996
This commit is contained in:
@@ -339,9 +339,15 @@
|
||||
<span t-else="" t-field="user.rank_id.name"/>
|
||||
</h4>
|
||||
<small>
|
||||
<span class="font-weight-bold text-primary" t-field="user.karma"/> /
|
||||
<span t-if="next_rank_id" class="font-weight-bold" t-field="next_rank_id.karma_min"/>
|
||||
<span t-else="" class="font-weight-bold" t-field="user.rank_id.karma_min"/>
|
||||
<span class="font-weight-bold text-primary"
|
||||
t-field="user.karma"
|
||||
t-options="{'format_decimalized_number': True, 'precision_digits': 2}"/> /
|
||||
<span t-if="next_rank_id" class="font-weight-bold"
|
||||
t-field="next_rank_id.karma_min"
|
||||
t-options="{'format_decimalized_number': True, 'precision_digits': 2}"/>
|
||||
<span t-else="" class="font-weight-bold"
|
||||
t-field="user.rank_id.karma_min"
|
||||
t-options="{'format_decimalized_number': True, 'precision_digits': 2}"/>
|
||||
xp
|
||||
</small>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user