summaryrefslogtreecommitdiff
path: root/addons/website_profile/views/website_profile.xml
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-08-08 11:52:13 +0200
committerChristophe Simonis <chs@odoo.com>2019-08-08 11:52:13 +0200
commitb792ba7d9a80e856e3c69c2852e6d44b78d0e13f (patch)
treea3ee5b7ef9f9317866deeb2b3e5964020c87b8fb /addons/website_profile/views/website_profile.xml
parent22e0f88bce5bf162a6c67e915a3c27b101f74f2b (diff)
parent752b2553c6fad061ebf23e13585f7b7489b20840 (diff)
[MERGE] forward port branch saas-12.3 up to 752b2553c6f
Diffstat (limited to 'addons/website_profile/views/website_profile.xml')
-rw-r--r--addons/website_profile/views/website_profile.xml20
1 files changed, 11 insertions, 9 deletions
diff --git a/addons/website_profile/views/website_profile.xml b/addons/website_profile/views/website_profile.xml
index c28712f06ac..458ba979ff8 100644
--- a/addons/website_profile/views/website_profile.xml
+++ b/addons/website_profile/views/website_profile.xml
@@ -272,7 +272,7 @@
</tr>
<tr>
<th><small class="font-weight-bold">Badges</small></th>
- <td t-if="user.badge_ids" t-esc="len(user.badge_ids)"/>
+ <td t-if="user.badge_ids" t-esc="len(user.badge_ids.filtered(lambda b: b.badge_id.website_published))"/>
<td t-else="">0</td>
</tr>
</tbody>
@@ -362,20 +362,22 @@
<template id="user_badges" name="User Bagdes">
<div t-if="user.badge_ids" class="row mx-n1">
- <div class="col px-1 mb-2 col-xl-4" t-foreach="user.badge_ids" t-as="badge">
+ <t t-foreach="user.badge_ids" t-as="badge">
<t t-if="badge.badge_id.website_published">
- <div class="card">
- <div class="card-body p-2 pr-3">
- <div class="media align-items-center">
- <img height="38" t-attf-src="/web/image/gamification.badge/#{badge.badge_id.id}/image_small" class="mr-2"/>
- <div class="media-body text-nowrap">
- <h6 class="my-0" t-field="badge.badge_id.name"/>
+ <div class="col px-1 mb-2 col-xl-4">
+ <div class="card">
+ <div class="card-body p-2 pr-3">
+ <div class="media align-items-center">
+ <img height="38" t-attf-src="/web/image/gamification.badge/#{badge.badge_id.id}/image_small" class="mr-2"/>
+ <div class="media-body text-nowrap">
+ <h6 class="my-0" t-field="badge.badge_id.name"/>
+ </div>
</div>
</div>
</div>
</div>
</t>
- </div>
+ </t>
</div>
<div class="mb-3" t-if="not user.badge_ids">
<p class="text-muted">No badge yet</p>