diff options
| author | David Beguin <dbe@odoo.com> | 2019-03-29 12:06:25 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-11-22 15:30:53 +0000 |
| commit | 5ac64d6e02bc8bc0fbdddd73cfc561023b58e566 (patch) | |
| tree | 925344b1b7d33475f1dc524591faf6819c501864 /addons/website_profile/views/website_profile.xml | |
| parent | 1f52435966edeb1d57ef8bccce7f82eb0b08a2ae (diff) | |
[IMP] website_slides_survey: add certification badges section to ranks badge page
This commit adds a section to distinguish the certification badges from the
other badges users may obtain in eLearning. Certification badges are available
on the ranks page, linked to a running survey. Clicking on them directly
redirects into the linked course.
Task ID : 1961053
PR #32594
Diffstat (limited to 'addons/website_profile/views/website_profile.xml')
| -rw-r--r-- | addons/website_profile/views/website_profile.xml | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/addons/website_profile/views/website_profile.xml b/addons/website_profile/views/website_profile.xml index 1b3c85ea599..50694cbcbfe 100644 --- a/addons/website_profile/views/website_profile.xml +++ b/addons/website_profile/views/website_profile.xml @@ -423,33 +423,40 @@ </template> <template id="badge_content" name="Badges Page content"> - <div class="row"> - <div class="col-12"> - <h1 class="mt-4 mt-lg-2">Badges</h1> - <p class="lead"> - Besides gaining reputation with your questions and answers, - you receive badges for being especially helpful.<br class="d-none d-lg-inline-block"/>Badges - appear on your profile page, and your posts. - </p> + <div id="website_profile_badges"> + <div class="row"> + <div class="col-12"> + <h1 class="mt-4 mt-lg-2">Badges</h1> + <p class="lead"> + Besides gaining reputation with your questions and answers, + you receive badges for being especially helpful.<br class="d-none d-lg-inline-block"/>Badges + appear on your profile page, and your posts. + </p> + </div> </div> - </div> - <table class="table table-sm mb64"> - <tr t-foreach="badges" t-as="badge"> - <td class="align-middle"> - <img t-if="not badge.image_1920 and badge.level" t-attf-src="/website_profile/static/src/img/badge_#{badge.level}.svg" - class="my-1" style="height:2.5em" t-att-alt="badge.name"/> - <img t-else="" t-att-src="website.image_url(badge, 'image_1024')" class="my-1" style="height:2.5em" t-att-alt="badge.name"/> - <h6 t-field="badge.name" class="d-inline my-0"/> - </td> - <td class="align-middle d-none d-md-table-cell"> + <div class="row col-12 align-items-center p-0" t-foreach="badges" t-as="badge"> + <div class="col-3 d-flex align-items-center"> + <t t-call="website_profile.badge_header"/> + </div> + <div class="col-6"> + <span t-field="badge.description"/> + </div> + <div class="col-3 text-right"> <b t-esc="badge.granted_users_count"/> <i class="text-muted"> awarded users</i> - </td> - <td class="align-middle"> - <span t-field="badge.description"/> - </td> - </tr> - </table> + </div> + </div> + </div> + </template> + + <template id="badge_header"> + <img t-if="not badge.image_1920 and badge.level" t-attf-src="/website_profile/static/src/img/badge_#{badge.level}.svg" + class="my-1 mr-1 wprofile_badge_img" t-att-alt="badge.name"/> + <img t-else="" t-att-src="website.image_url(badge, 'image_1024')" class="my-1 mr-1 wprofile_badge_img" t-att-alt="badge.name"/> + <a t-if="badge_url" t-att-href="badge_url"> + <h6 t-field="badge.name" class="d-inline my-0"/> + </a> + <h6 t-else="" t-field="badge.name" class="d-inline my-0"/> </template> <!--Private profile--> |
