[IMP] website_profile: minor changes about karma rank display and forum questions

PURPOSE

Overall improve profile related parts of eLearning user experience.

SPECIFICATIONS

Improve display and the text about the karma gain/rank
- remove the double quotes around the rank
- change the text after the xp gained in rank list
- rename Monthly / Weekly gains to this month / this week

Improve the margin between questions and questions categories
- set same margin between questions in different categories

LINKS

Task ID-2241513
PR #55698
This commit is contained in:
Patrick Hoste
2020-08-11 10:20:39 +00:00
committed by Thibault Delavallée
parent 414329dcf1
commit eff40d3c7d
2 changed files with 13 additions and 16 deletions
@@ -55,13 +55,13 @@
<xpath expr="//div[@id='profile_extra_info_tabcontent']" position="inside">
<t t-if="forum">
<div role="tabpanel" class="o_wforum_profile_tab tab-pane" id="questions">
<div class="mb32">
<div class="mb-4">
<h5 class="border-bottom pb-1">
Questions
<t t-call="website_forum.forum_filter_tag"/>
</h5>
<t t-if="questions">
<div class="mb4" t-foreach="questions" t-as="question">
<div class="mb-1" t-foreach="questions" t-as="question">
<t t-call="website_forum.display_post"/>
</div>
</t>
@@ -70,9 +70,9 @@
</t>
</div>
<t t-if="favourite">
<div class="mb4">
<div class="mb-4">
<h5 class="border-bottom pb-1">Favourite Questions</h5>
<div t-foreach="favourite" t-as="question">
<div class="mb-1" t-foreach="favourite" t-as="question">
<t t-call="website_forum.display_post">
<t t-set="hide_fav_icon" t-value="True"/>
</t>
@@ -80,23 +80,23 @@
</div>
</t>
<t t-if="followed">
<div class="mb4">
<div class="mb-4">
<h5 class="border-bottom pb-1">Followed Questions</h5>
<div t-foreach="followed" t-as="question" class="mb16">
<div class="mb-1" t-foreach="followed" t-as="question">
<t t-call="website_forum.display_post"/>
</div>
</div>
</t>
</div>
<div role="tabpanel" class="o_wforum_profile_tab tab-pane" id="answers">
<div class="mb32">
<div class="mb-4">
<h5 class="border-bottom pb-1">
Answers
<t t-call="website_forum.forum_filter_tag"/>
</h5>
<t t-if="answers">
<div t-foreach="answers" t-as="answer">
<div class="mb-1" t-foreach="answers" t-as="answer">
<t t-call="website_forum.display_post_answer"/>
</div>
</t>
@@ -106,13 +106,13 @@
</div>
</div>
<div role="tabpanel" class="o_wforum_profile_tab tab-pane" id="votes" t-if="uid == user.id">
<div class="mb32">
<div class="mb-4">
<h5 class="border-bottom pb-1">Votes</h5>
<t t-call="website_forum.user_votes"/>
</div>
</div>
<div role="tabpanel" class="o_wforum_profile_tab tab-pane" id="activity" t-if="uid == user.id">
<div class="mb32">
<div class="mb-4">
<h5 class="border-bottom pb-1">
Activities
<t t-call="website_forum.forum_filter_tag"/>
@@ -344,13 +344,11 @@
t-att-alt="(next_rank_id.name if next_rank_id else user.rank_id.name) + ' badge'"
t-att-style="'max-width: ' + (img_max_width if img_max_width else '50%;')"/>
<h4 class=" mb-0">
"
<span t-if="next_rank_id" t-field="next_rank_id.name"/>
<span t-else="" t-field="user.rank_id.name"/>
"
</h4>
<small>
<span class="font-weight-bold text-primary" t-field="user.karma"/>/
<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"/>
xp
@@ -597,10 +595,9 @@
<t t-if="user['karma_gain']">
<span class="badge badge-pill badge-success d-inline">+ <t t-esc="user['karma_gain']"/> XP</span>
<span class="text-muted pl-2 pr-3">
<t t-if="group_by == 'week'">Weekly </t>
<t t-elif="group_by == 'month'">Monthly </t>
<t t-if="group_by == 'week'">this week</t>
<t t-elif="group_by == 'month'">this month</t>
<t t-else="">All time </t>
gain
</span>
</t>
</td>