diff options
Diffstat (limited to 'addons/gamification')
| -rw-r--r-- | addons/gamification/static/src/less/gamification.less | 3 | ||||
| -rw-r--r-- | addons/gamification/views/badge.xml | 44 | ||||
| -rw-r--r-- | addons/gamification/views/challenge.xml | 8 | ||||
| -rw-r--r-- | addons/gamification/wizard/grant_badge.xml | 6 |
4 files changed, 35 insertions, 26 deletions
diff --git a/addons/gamification/static/src/less/gamification.less b/addons/gamification/static/src/less/gamification.less index a9440f5fd4f..f047f263764 100644 --- a/addons/gamification/static/src/less/gamification.less +++ b/addons/gamification/static/src/less/gamification.less @@ -21,6 +21,9 @@ } } } + .o_kanban_badge_description { + padding-bottom: 15px; + } .o_red { color: red; } diff --git a/addons/gamification/views/badge.xml b/addons/gamification/views/badge.xml index 1ef04703968..a2618ecfa29 100644 --- a/addons/gamification/views/badge.xml +++ b/addons/gamification/views/badge.xml @@ -51,27 +51,29 @@ </h1> </div> <group> - <field name="description" nolabel="1" placeholder="Badge Description" /> + <field name="description" nolabel="1" placeholder="Badge Description"/> </group> <group string="Granting"> <div class="oe_grey" colspan="2"> Security rules to define who is allowed to manually grant badges. Not enforced for administrator. </div> - <field name="rule_auth" widget="radio" /> - <field name="rule_auth_user_ids" attrs="{'invisible': [('rule_auth','!=','users')]}" widget="many2many_tags" /> - <field name="rule_auth_badge_ids" attrs="{'invisible': [('rule_auth','!=','having')]}" widget="many2many_tags" /> - <field name="rule_max" attrs="{'invisible': [('rule_auth','=','nobody')]}" /> - <field name="rule_max_number" attrs="{'invisible': ['|',('rule_max','=',False),('rule_auth','=','nobody')]}"/> - <label for="stat_my_monthly_sending"/> - <div> - <field name="stat_my_monthly_sending" attrs="{'invisible': [('rule_auth','=','nobody')]}" /> - <div attrs="{'invisible': [('remaining_sending','=',-1)]}" class="oe_grey"> - You can still grant <field name="remaining_sending" class="oe_inline"/> badges this month - </div> - <div attrs="{'invisible': [('remaining_sending','!=',-1)]}" class="oe_grey"> - No monthly sending limit + <group> + <field name="rule_auth" widget="radio"/> + <field name="rule_auth_user_ids" attrs="{'invisible': [('rule_auth','!=','users')]}" widget="many2many_tags" /> + <field name="rule_auth_badge_ids" attrs="{'invisible': [('rule_auth','!=','having')]}" widget="many2many_tags" /> + <field name="rule_max" attrs="{'invisible': [('rule_auth','=','nobody')]}" /> + <field name="rule_max_number" attrs="{'invisible': ['|',('rule_max','=',False),('rule_auth','=','nobody')]}"/> + <label for="stat_my_monthly_sending"/> + <div> + <field name="stat_my_monthly_sending" attrs="{'invisible': [('rule_auth','=','nobody')]}" /> + <div attrs="{'invisible': [('remaining_sending','=',-1)]}" class="oe_grey"> + You can still grant <field name="remaining_sending" class="oe_inline"/> badges this month + </div> + <div attrs="{'invisible': [('remaining_sending','!=',-1)]}" class="oe_grey"> + No monthly sending limit + </div> </div> - </div> + </group> </group> <group string="Rewards for challenges"> <field name="challenge_ids" widget="many2many_kanban" nolabel="1" context="{'default_reward_id': active_id}" /> @@ -110,7 +112,7 @@ <field name="rule_max_number" /> <templates> <t t-name="kanban-box"> - <div t-attf-class="oe_kanban_global_click #{record.stat_my.raw_value ? 'oe_kanban_color_5' : 'oe_kanban_color_white'}"> + <div t-attf-class="o_kanban_gamification oe_kanban_global_click #{record.stat_my.raw_value ? 'oe_kanban_color_5' : 'oe_kanban_color_white'}"> <div class="o_kanban_image"> <img t-att-src="kanban_image('gamification.badge', 'image', record.image.raw_value)" t-att-title="record.name.value"/> </div> @@ -129,12 +131,14 @@ <strong><t t-esc="record.stat_count.raw_value"/></strong> granted, <strong><t t-esc="record.stat_this_month.raw_value"/></strong> this month </div> - <div t-if="record.description.value"> + <div t-if="record.description.value" class="o_kanban_badge_description"> <em><field name="description"/></em> + <div> + <t t-foreach="record.unique_owner_ids.raw_value.slice(0,11)" t-as="owner"> + <img width="24" height="24" class="oe_kanban_avatar" t-att-src="kanban_image('res.users', 'image_small', owner)" t-att-data-member_id="owner"/> + </t> + </div> </div> - <t t-foreach="record.unique_owner_ids.raw_value.slice(0,11)" t-as="owner"> - <img width="24" height="24" class="oe_kanban_avatar" t-att-src="kanban_image('res.users', 'image_small', owner)" t-att-data-member_id="owner"/> - </t> <div t-if="record.remaining_sending.value != 0" class="o_kanban_button"> <button type="action" name="%(action_grant_wizard)d" class="oe_highlight btn btn-sm btn-primary">Grant</button> </div> diff --git a/addons/gamification/views/challenge.xml b/addons/gamification/views/challenge.xml index d8ba6619794..c38eb427997 100644 --- a/addons/gamification/views/challenge.xml +++ b/addons/gamification/views/challenge.xml @@ -111,9 +111,11 @@ <div class="oe_grey" colspan="4"> <p>Depending on the Display mode, reports will be individual or shared.</p> </div> - <field name="report_message_frequency" /> - <field name="report_template_id" attrs="{'invisible': [('report_message_frequency','=','never')]}" /> - <field name="report_message_group_id" attrs="{'invisible': [('report_message_frequency','=','never')]}" /> + <group colspan="4"> + <field name="report_message_frequency"/> + <field name="report_template_id" attrs="{'invisible': [('report_message_frequency','=','never')]}" /> + <field name="report_message_group_id" attrs="{'invisible': [('report_message_frequency','=','never')]}" /> + </group> </group> <group string="Reminders for Manual Goals"> <label for="remind_update_delay" /> diff --git a/addons/gamification/wizard/grant_badge.xml b/addons/gamification/wizard/grant_badge.xml index 58628e26d25..27ea32677c8 100644 --- a/addons/gamification/wizard/grant_badge.xml +++ b/addons/gamification/wizard/grant_badge.xml @@ -8,10 +8,10 @@ <field name="arch" type="xml"> <form string="Grant Badge To"> Who would you like to reward? + <field name="badge_id" invisible="1"/> <group> - <field name="user_id" nolabel="1" /> - <field name="badge_id" invisible="1"/> - <field name="comment" nolabel="1" placeholder="Describe what they did and why it matters (will be public)" class="oe_no_padding" /> + <field name="user_id" nolabel="1" colspan="4"/> + <field name="comment" nolabel="1" placeholder="Describe what they did and why it matters (will be public)" colspan="4"/> </group> <footer> <button string="Grant Badge" type="object" name="action_grant_badge" class="btn-primary" /> |
