[IMP] website_profile, website_slides: add user ranking and karma on elearning main pages
Purpose of this commit is to improve karma and gamification inclusion in
elearning [1].
* remove a border, replaced by a standard hr, in rank template. It allows to
reuse it easier as we don't necessarily want that border in other templates
using it;
Commit linked to task ID 1941250 and PR #31133.
[1] task ID 1922159 (landed at 5fa651cb01)
This commit is contained in:
@@ -127,7 +127,6 @@ $bronze: #eea91e;
|
||||
height: 128px;
|
||||
}
|
||||
}
|
||||
border-bottom: 1px solid lightgray;
|
||||
.o_wprofile_next_rank_progress {
|
||||
background-color: lightgray;
|
||||
.o_wprofile_next_rank_progress_bar {
|
||||
|
||||
@@ -181,6 +181,7 @@
|
||||
<th><span class="float-right" t-field="user.rank_id"/></th>
|
||||
</tr></tbody></table>
|
||||
<t t-call="website_profile.profile_next_rank_card"></t>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
@@ -149,6 +149,10 @@ div .o_wslides_home_main {
|
||||
background: linear-gradient(150deg, #875A7B 20%, #62495B 80%) !important;
|
||||
opacity: 0.95;
|
||||
|
||||
a {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
nav {
|
||||
.breadcrumb-item::before {
|
||||
font-weight: bold;
|
||||
|
||||
@@ -52,15 +52,11 @@
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
<div class="col-4 d-flex flex-row">
|
||||
<!-- karma -->
|
||||
<!-- <ul class="navbar-nav ml-auto float-right pt-2">
|
||||
<li class="nav-item">
|
||||
<a t-attf-href="/profile/user/#{user.id}?channel_id=#{channel.id}" t-attf-class="text-dark font-weight-bold nav-link}">
|
||||
<i class="fa fa-diamond text-secondary" /> <t t-esc="user_id.karma"/>
|
||||
</a>
|
||||
</li>
|
||||
</ul> -->
|
||||
<div class="col-6 d-flex flex-row align-items-center">
|
||||
<!-- karma / profile -->
|
||||
<a t-if="not is_public_user" t-att-href="'/profile/user/%s?channel_id=%s' % (user.id, channel.id)" class="font-weight-bold mr-3">
|
||||
<i class="fa fa-diamond" /> <t t-esc="user_id.karma"/>
|
||||
</a>
|
||||
<!-- search -->
|
||||
<form t-attf-action="/slides/#{slug(channel)}" role="search" method="get">
|
||||
<div class="input-group">
|
||||
@@ -73,7 +69,7 @@
|
||||
</div>
|
||||
</form>
|
||||
<!-- sort / filter -->
|
||||
<small class="dropdown float-right ml-2">
|
||||
<small class="dropdown float-right ml-3">
|
||||
<h6 class="m-0">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" id="slidesChannelDropdownSort"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
|
||||
@@ -142,6 +142,11 @@
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
<!-- karma / profile -->
|
||||
<a t-if="not is_public_user" t-att-href="'/profile/user/%s' % user.id" class="font-weight-bold mr-3">
|
||||
<i class="fa fa-diamond"/> <t t-esc="user_id.karma"/>
|
||||
</a>
|
||||
<!-- search box -->
|
||||
<form method="GET" class="form-inline justify-content-center">
|
||||
<div class="input-group">
|
||||
<input type="search" name="search" class="form-control"
|
||||
@@ -366,15 +371,18 @@
|
||||
<template id='slides_home_user_profile_small' name="User Profile">
|
||||
<div class="o_wslides_home_aside">
|
||||
<div class="row mt16 o_wslides_home_aside_title align-items-center">
|
||||
<div class="col">
|
||||
<div class="col-12">
|
||||
<t t-call="website_slides.slides_misc_user_image"/>
|
||||
<a t-att-href="'/slides'" class="float-right">Edit</a>
|
||||
<a t-att-href="'/profile/user/%s' % user.id" class="float-right">Edit</a>
|
||||
<h4 t-esc="user.name" class="font-weight-bold"/>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt8">
|
||||
<p class="col">INSERT DBE TEMPLATE HERE</p>
|
||||
<div class="col-12 mt8">
|
||||
<span class="font-weight-bold text-muted">Current rank:</span>
|
||||
<a href="/profile/ranks" class="float-right" t-field="user.rank_id"/>
|
||||
<t t-call="website_profile.profile_next_rank_card"/>
|
||||
<div t-field="user.next_rank_id.description_motivational"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user