diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-04-25 10:52:17 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-04-25 10:52:17 +0200 |
| commit | 5794e60f148fc0a3500be3d7082eff4fa8366854 (patch) | |
| tree | 9f7399e9549cb2923a1ac2676120616a45aaedc2 /addons/gamification/static/src/xml | |
| parent | 4bcaa718bd1f45c79a688c1a47d0a69cae0348ae (diff) | |
[IMP] better design
bzr revid: mat@openerp.com-20130425085217-bmt8tsdbtrfn7j7d
Diffstat (limited to 'addons/gamification/static/src/xml')
| -rw-r--r-- | addons/gamification/static/src/xml/gamification.xml | 74 |
1 files changed, 41 insertions, 33 deletions
diff --git a/addons/gamification/static/src/xml/gamification.xml b/addons/gamification/static/src/xml/gamification.xml index 6d6edfbd49a..9e35b2d51bf 100644 --- a/addons/gamification/static/src/xml/gamification.xml +++ b/addons/gamification/static/src/xml/gamification.xml @@ -4,7 +4,6 @@ <div class="oe_gamification_goal"><em>Your goal list is empty</em></div> </t> <t t-name="gamification.goal_list_to_do"> - <h3>Challenges</h3> <div t-foreach="widget.goals_info.info" t-as="plan" class="oe_goal"> <div> <h4 style="display:inline-block;"><t t-esc="plan.name" /></h4> @@ -13,31 +12,39 @@ <t t-if="plan.visibility_mode == 'progressbar'"> - <div class="oe_goals_list"> - <div t-attf-class="#{goal.type_display == 'progress' ? 'oe_goal_outer_box' : ''}" t-foreach="plan.goals" t-as="goal" t-attf-style="#{goal.type_display == 'progress' ? 'width: '+goal.completeness+'%;' : ''}"> - <div class="oe_goal_inner_box"> - <strong t-attf-class="#{goal.state == 'reached' ? 'oe_goal_reached' : ''}" t-att-title="goal.type_description"><t t-esc="goal.type_name" /></strong> - <t t-if="goal.computation_mode == 'manually' or goal.type_action"> - <a class="oe_goal_action oe_e" t-att-id="goal.id">&</a> - </t><br/> - - <t t-if="goal.type_display == 'progress'"> - <t t-if="goal.type_condition == 'higher'"> - <t t-esc="goal.current" />/<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> - <t t-if="goal.type_condition == 'lower'"> - - <t t-esc="goal.current" /> (less than - <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> - </t> - </div> - </div> - </div> + <ul class="oe_goals_list"> + <li t-foreach="plan.goals" t-as="goal" t-attf-class="#{goal.state == 'reached' ? 'oe_goal_reached' : ''}"> + <div class="oe_goal_outer_box"> + <div class="oe_goal_progress" t-attf-style="#{goal.type_display == 'progress' ? 'width: '+goal.completeness+'%;' : 'width:0;'}"></div> + <div class="oe_goal_inner_box"> + <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"> + <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.computation_mode == 'manually' and !goal.type_action"> + <span t-att-title="goal.type_description"><t t-esc="goal.type_name" /></span> + <a class="oe_goal_action oe_e" t-att-id="goal.id">&</a> + </t> + <t t-if="goal.type_display == 'progress'"> + <t t-if="goal.type_condition == 'higher'"> + <t t-esc="goal.current" />/<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> + <t t-if="goal.type_condition == 'lower'"> + + <t t-esc="goal.current" /> (less than + <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> + </t> + </div> + </div> + </li> + </ul> </t> <t t-if="plan.visibility_mode == 'board'"> <table t-foreach="plan.planlines" t-as="planline" class="oe_goals_list"> @@ -63,13 +70,14 @@ <tr t-foreach="planline.goals" t-as="goal" t-attf-class="#{goal.id == planline.own_goal_id ? 'oe_bold' : ''}"> <div style="background: #fff;"> <th class="col0"><t t-esc="goal.rank" /></th> - <td><img class="oe_user_avatar" t-attf-alt="#{goal.user_name}" t-attf-data-id="#{goal.user_id}"/></td> - <td class="col1"> - <div class="oe_goal_outer_box" t-attf-style="width: #{goal.completeness}%;"> - <div class="oe_goal_inner_box"> - <t t-esc="goal.user_name"/><br/> - <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> - </div> + <td class="col1"><img class="oe_user_avatar" t-attf-alt="#{goal.user_name}" t-attf-data-id="#{goal.user_id}"/></td> + <td class="col2"> + <div class="oe_goal_outer_box"> + <div class="oe_goal_progress" t-attf-style="#{planline.type_display == 'progress' ? 'width: '+goal.completeness+'%;' : 'width:0;'}"></div> + <div class="oe_goal_inner_box"> + <t t-esc="goal.user_name"/><br/> + <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> + </div> </div> </td> </div> |
