[REF] gamification: review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984 task-2938963 Part-of: odoo/odoo#97192
This commit is contained in:
@@ -44,10 +44,5 @@ Both goals and badges are flexibles and can be adapted to a large range of modul
|
||||
'data/gamification_karma_rank_demo.xml',
|
||||
'data/gamification_karma_tracking_demo.xml',
|
||||
],
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'gamification/static/src/**/*',
|
||||
],
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
.o_kanban_gamification {
|
||||
img.o_kanban_badge_avatars {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
padding-left: 0;
|
||||
margin-top: 8px;
|
||||
border-radius: 2px;
|
||||
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
||||
object-fit: cover;
|
||||
}
|
||||
.o_kanban_content {
|
||||
.o_goal_state_block {
|
||||
width: 200px;
|
||||
height: 130px;
|
||||
margin: auto;
|
||||
margin-bottom: -20px;
|
||||
text-align: center;
|
||||
.o_goal_state {
|
||||
font-size: 2.5em;
|
||||
font-weight: bold;
|
||||
padding-top: 13px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.o_kanban_badge_description {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
.o_red {
|
||||
color: red;
|
||||
}
|
||||
.o_green {
|
||||
color: green;
|
||||
}
|
||||
.o_orange {
|
||||
color: orange;
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@
|
||||
<strong><t t-esc="record.granted_count.raw_value"/></strong> granted,
|
||||
<strong><t t-esc="record.stat_this_month.raw_value"/></strong> this month
|
||||
</div>
|
||||
<div t-if="!widget.isHtmlEmpty(record.description.value)" class="o_kanban_badge_description">
|
||||
<div t-if="!widget.isHtmlEmpty(record.description.value)" class="o_kanban_badge_description pb-3">
|
||||
<em t-out="record.description.value"/>
|
||||
<div>
|
||||
<t t-foreach="record.unique_owner_ids.raw_value.slice(0,11)" t-as="owner" t-key="owner">
|
||||
|
||||
@@ -173,12 +173,12 @@
|
||||
<img class="o_image_24_cover" t-att-src="kanban_image('res.users', 'avatar_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value"/>
|
||||
</div>
|
||||
<field name="user_id" />
|
||||
<div class="o_goal_state_block">
|
||||
<div class="o_goal_state_block pt-3 fs-1 fw-bolder text-center">
|
||||
<t t-if="record.definition_display.raw_value == 'boolean'">
|
||||
<div class="o_goal_state text-center">
|
||||
<t t-if="record.state.raw_value=='reached'"><i role="img" class="o_green fa fa-check fa-3x" title="Goal Reached" aria-label="Goal Reached"/></t>
|
||||
<t t-if="record.state.raw_value=='reached'"><i role="img" class="text-success fa fa-check fa-3x" title="Goal Reached" aria-label="Goal Reached"/></t>
|
||||
<t t-if="record.state.raw_value=='inprogress'"><i role="img" class="fa fa-clock-o fa-3x" title="Goal in Progress" aria-label="Goal in Progress"/></t>
|
||||
<t t-if="record.state.raw_value=='failed'"><i role="img" class="o_red fa fa-times fa-3x" title="Goal Failed" aria-label="Goal Failed"/></t>
|
||||
<t t-if="record.state.raw_value=='failed'"><i role="img" class="text-danger fa fa-times fa-3x" title="Goal Failed" aria-label="Goal Failed"/></t>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="record.definition_display.raw_value == 'progress'">
|
||||
@@ -186,7 +186,7 @@
|
||||
<field name="current" widget="gauge" options="{'max_field': 'target_goal', 'label_field': 'definition_suffix', 'style': 'width:160px; height: 120px;'}" />
|
||||
</t>
|
||||
<t t-if="record.definition_condition.raw_value != 'higher'">
|
||||
<div t-attf-class="o_goal_state #{record.current.raw_value == record.target_goal.raw_value+1 ? 'o_orange' : record.current.raw_value > record.target_goal.raw_value ? 'o_red' : 'o_green'}">
|
||||
<div t-attf-class="o_goal_state #{record.current.raw_value == record.target_goal.raw_value+1 ? 'text-warning' : record.current.raw_value > record.target_goal.raw_value ? 'text-danger' : 'text-success'}">
|
||||
<t t-esc="record.current.raw_value" />
|
||||
</div>
|
||||
<em>Target: less than <t t-esc="record.target_goal.raw_value" /></em>
|
||||
|
||||
Reference in New Issue
Block a user