[FIX] website_profile: correctly display rank position image in top 3 users
As user is a loop variable we can directly use its index instead of a rank position that is not always correctly computed when not being logged due to access rights issues. Linked to task 2005840 Related to PR #34220
This commit is contained in:
@@ -510,7 +510,7 @@
|
||||
<div class="card-body">
|
||||
<div class="d-inline-block position-relative">
|
||||
<img class="rounded-circle img-fluid" t-att-src="'/profile/avatar/%s?field=image_medium%s' % (user['id'], '&res_model=%s&res_id=%s' % (record._name, record.id) if record else '')"/>
|
||||
<img class="position-absolute" t-attf-src="/website_profile/static/src/img/rank_#{user['position']}.svg" alt="User rank" style="bottom: 0; right: -10px"/>
|
||||
<img class="position-absolute" t-attf-src="/website_profile/static/src/img/rank_#{user_index + 1}.svg" alt="User rank" style="bottom: 0; right: -10px"/>
|
||||
</div>
|
||||
<h3 class="mt-2 mb-0" t-esc="user['name']"></h3>
|
||||
<span class="badge badge-danger font-weight-normal px-2" t-if="not user['website_published']">Unpublished</span>
|
||||
|
||||
Reference in New Issue
Block a user