[IMP] small fixes

bzr revid: mat@openerp.com-20130429130536-gx2vtz8qgy3ogx5u
This commit is contained in:
Martin Trigaux 2013-04-29 15:05:36 +02:00
commit 6eaf93264b
6 changed files with 39 additions and 34 deletions

View File

@ -159,9 +159,8 @@
<div class="oe_grey">Can not grant</div>
</t>
<p>
<strong>Stats</strong><br/>
Total: <t t-esc="record.stat_count.raw_value"/><br/>
This month: <t t-esc="record.stat_this_month.raw_value"/>
<strong><t t-esc="record.stat_count.raw_value"/></strong> granted,<br/>
<strong><t t-esc="record.stat_this_month.raw_value"/></strong> this month
</p>
</div>
<div class="oe_kanban_badge_avatars">

View File

@ -59,7 +59,7 @@ class gamification_goal_type(osv.Model):
return res
_columns = {
'name': fields.char('Goal Type Name', required=True, translate=True),
'name': fields.char('Goal Type', required=True, translate=True),
'description': fields.text('Goal Description'),
'monetary': fields.boolean('Monetary Value', help="The target and current value are defined in the company currency."),
@ -95,7 +95,7 @@ class gamification_goal_type(osv.Model):
help="Technical filters rules to apply",
required=True),
'compute_code': fields.char('Compute Code',
help="The name of the python method that will be executed to verify if a user can receive this badge."),
help="The name of the python method that will be executed to compute the current value. See the file gamification/goal_type_data.py for examples."),
'condition': fields.selection([
('higher', 'The higher the better'),

View File

@ -79,7 +79,7 @@
<!-- plans -->
<record model="gamification.goal.plan" id="plan_base_discover">
<field name="name">Manage your Personal Profile</field>
<field name="name">Complete your Profile</field>
<field name="period">once</field>
<field name="visibility_mode">progressbar</field>
<field name="report_message_frequency">never</field>
@ -89,7 +89,7 @@
</record>
<record model="gamification.goal.plan" id="plan_base_configure">
<field name="name">Manage your Company Profile</field>
<field name="name">Setup your Company</field>
<field name="period">once</field>
<field name="visibility_mode">progressbar</field>
<field name="report_message_frequency">never</field>

View File

@ -249,8 +249,8 @@
</group>
<group string="Formating Options">
<field name="display_mode" widget="radio" />
<field name="unit" class="oe_inline"/>
<field name="monetary" class="oe_inline"/>
<field name="unit" placeholder="e.g. days"/>
<field name="monetary"/>
</group>
<group string="Clickable Goals">
<field name="action_id" class="oe_inline"/>

View File

@ -119,7 +119,7 @@
.openerp .oe_mail_wall_aside .oe_goals_list .oe_cell.oe_goal_current {
font-size: 150%;
font-weight: bold;
min-width: 20px;
min-width: 50px;
padding: 0 5px;
}
.openerp .oe_mail_wall_aside .oe_goals_list .oe_no_progress.oe_goal_reached .oe_cell {
@ -160,10 +160,7 @@
padding-left: 0;
margin-top: 5px;
margin-bottom: 10px;
width: 95%;
}
.openerp .oe_mail_wall_aside .oe_goals_list .oe_row {
margin-bottom: 10px;
width: 100%;
}
.openerp .oe_mail_wall_aside .oe_goals_list .oe_thead {

View File

@ -16,29 +16,28 @@
<t t-if="goal.type_display == 'progress'">
<div class="oe_goal_progress_background"></div>
<div class="oe_goal_progress" t-attf-style="#{goal.type_display == 'progress' ? 'width: '+goal.completeness+'%;' : 'width:0;'}"></div>
<div class="oe_cell oe_goal_current"><t t-esc="goal.current" /></div>
</t>
<t t-if="goal.type_display == 'progress'">
<div class="oe_cell oe_goal_current"><t t-esc="goal.current" /></div>
<div class="oe_cell">
<t t-if="goal.computation_mode != 'manually' and !goal.type_action">
<span t-att-title="goal.type_description"><t t-esc="goal.type_name" /></span>
</t>
<div class="oe_cell">
<t t-if="goal.computation_mode != 'manually' and !goal.type_action">
<span t-att-title="goal.type_description"><t t-esc="goal.type_name" /></span>
</t>
<t t-if="goal.type_action or goal.computation_mode == 'manually'">
<span t-att-title="goal.type_description"><a class="oe_goal_action" t-att-id="goal.id"><t t-esc="goal.type_name" /></a></span>
</t>
<t t-if="goal.type_display == 'progress'">
<t t-if="goal.type_action or goal.computation_mode == 'manually'">
<span t-att-title="goal.type_description"><a class="oe_goal_action" t-att-id="goal.id"><t t-esc="goal.type_name" /></a></span>
</t>
<t t-if="goal.type_display == 'progress'"><br/>
<div class="oe_grey">
<t t-if="goal.type_condition == 'higher'">
(target:
Target:
</t>
<t t-if="goal.type_condition == 'lower'">
(target less than:
Target less than:
</t>
<span t-attf-class="#{goal.type_monetary ? 'oe_goal_field_monetary' : ''}"><t t-esc="goal.target_goal"/></span>
<t t-if="goal.type_unit"><t t-esc="goal.type_unit"/></t>)
</t>
</div>
<t t-if="goal.type_unit"><t t-esc="goal.type_unit"/></t>
</div>
</t>
</div>
</div>
</div>
</t>
@ -61,7 +60,7 @@
</div>
</div>
<div t-foreach="planline.goals" t-as="goal" t-attf-class="#{goal.id == planline.own_goal_id ? 'oe_bold' : ''}">
<div class="oe_row oe_goal_outer_box">
<div t-attf-class="oe_row oe_goal_outer_box #{goal.state == 'reached' ? 'oe_goal_reached' : ''} #{goal.type_display != 'progress' ? 'oe_no_progress' : ''}">
<t t-if="planline.type_display == 'progress'">
<div class="oe_goal_progress_background"></div>
<div class="oe_goal_progress" t-attf-style="#{planline.type_display == 'progress' ? 'width: '+goal.completeness+'%;' : 'width:0;'}"></div>
@ -70,8 +69,9 @@
<div class="oe_cell col0"><t t-esc="goal.rank" /></div>
<div class="oe_cell col1"><img class="oe_user_avatar" t-attf-alt="#{goal.user_name}" t-attf-data-id="#{goal.user_id}"/></div>
<div class="oe_cell col2">
<t t-esc="goal.user_name"/><br/>
<t t-if="planline.type_display == 'progress'"><br/>
<!-- progress, action on current value -->
<t t-esc="goal.user_name"/>
<t t-if="goal.id != planline.own_goal_id or (planline.computation_mode != 'manually' and !planline.type_action)">
<span t-attf-class="#{planline.type_monetary ? 'oe_goal_field_monetary' : ''}"><t t-esc="goal.current" /></span><t t-if="planline.type_unit"> <t t-esc="planline.type_unit"/></t>
</t>
@ -80,8 +80,17 @@
<span t-attf-class="#{planline.type_monetary ? 'oe_goal_field_monetary' : ''}"><t t-esc="goal.current" /></span><t t-if="planline.type_unit"> <t t-esc="planline.type_unit"/></t>
</a>
</t>
</t>
<t t-if="planline.type_display != 'progress'">
<!-- not progress, action on user name -->
<t t-if="goal.id != planline.own_goal_id or (planline.computation_mode != 'manually' and !planline.type_action)">
<t t-esc="goal.user_name"/>
</t>
<t t-if="goal.id == planline.own_goal_id and (planline.type_action or planline.computation_mode == 'manually')">
<a class="oe_goal_action" t-att-id="planline.own_goal_id"><t t-esc="goal.user_name"/></a>
</t>
</t>
</div>
</div>
</div>
</div>