diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-04-29 15:05:36 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-04-29 15:05:36 +0200 |
| commit | 6eaf93264b3f87c185ed4bf0ccf759a2c92138ad (patch) | |
| tree | e0c955732cff2c371c6e9753b113418a5c11d2a8 /addons/gamification/static | |
| parent | f99ce17ecf8234542914458b5b2ba1f101781f22 (diff) | |
| parent | 0c59ac9fcc684f805f6500915e852e2bda362258 (diff) | |
[IMP] small fixes
bzr revid: mat@openerp.com-20130429130536-gx2vtz8qgy3ogx5u
Diffstat (limited to 'addons/gamification/static')
| -rw-r--r-- | addons/gamification/static/src/css/gamification.css | 7 | ||||
| -rw-r--r-- | addons/gamification/static/src/xml/gamification.xml | 49 |
2 files changed, 31 insertions, 25 deletions
diff --git a/addons/gamification/static/src/css/gamification.css b/addons/gamification/static/src/css/gamification.css index 15a6daa48d2..cc20afede80 100644 --- a/addons/gamification/static/src/css/gamification.css +++ b/addons/gamification/static/src/css/gamification.css @@ -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 { diff --git a/addons/gamification/static/src/xml/gamification.xml b/addons/gamification/static/src/xml/gamification.xml index 97b69453490..1c655afbb64 100644 --- a/addons/gamification/static/src/xml/gamification.xml +++ b/addons/gamification/static/src/xml/gamification.xml @@ -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> |
