[IMP] tweak css

bzr revid: mat@openerp.com-20130425154028-rt3uv8mtykl9ff2g
This commit is contained in:
Martin Trigaux 2013-04-25 17:40:28 +02:00
parent e920347b01
commit d14496e578
5 changed files with 87 additions and 64 deletions

View File

@ -27,7 +27,7 @@
<record model="gamification.goal.type" id="type_base_company_data">
<field name="name">Set your Company Data</field>
<field name="description">Specify at least a website</field>
<field name="description">Write some information about your company (specify at least a name)</field>
<field name="computation_mode">count</field>
<field name="display_mode">checkbox</field>
<field name="model_id" eval="ref('base.model_res_company')" />
@ -69,7 +69,7 @@
</record>
<record model="gamification.goal.type" id="type_nbr_following">
<field name="name"># Mail Group Following</field>
<field name="name">Mail Group Following</field>
<field name="description">Follow mail groups to receive news</field>
<field name="computation_mode">python</field>
<field name="compute_code">self.number_following(cr, uid, 'mail.group')</field>
@ -79,7 +79,7 @@
<!-- plans -->
<record model="gamification.goal.plan" id="plan_base_discover">
<field name="name">Set up your Profile</field>
<field name="name">Manage your Personal 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">Configure OpenERP</field>
<field name="name">Manage your Company Profile</field>
<field name="period">once</field>
<field name="visibility_mode">progressbar</field>
<field name="report_message_frequency">never</field>

View File

@ -201,7 +201,7 @@ class gamification_goal_plan(osv.Model):
'reward_failure': False,
}
_sort = 'end_date start_date name'
_sort = 'end_date, start_date, name'
def write(self, cr, uid, ids, vals, context=None):
"""Overwrite the write method to add the user of groups"""

View File

@ -1,7 +1,7 @@
/* Kanban views */
.openerp .oe_kanban_view .oe_kanban_card.oe_kanban_goal {
width: 230px;
min-height: 200px;
width: 230px;
min-height: 200px;
}
.openerp .oe_kanban_view .oe_kanban_card.oe_kanban_badge {
width: 250px;
@ -59,30 +59,42 @@
margin-left: -6px;
}
/* Mail Sidebar */
/*
============
Mail Sidebar
============
*/
.openerp .oe_mail_wall .oe_mail_wall_aside {
margin-top: 15px;
position: relative;
display: inline-block;
vertical-align: top;
width: 280px;
/*background: #EDEDF6;*/
background-color: #f8f8f8;
border: solid 1px rgba(0,0,0,0.03);
background-color: #EDEDF6;
/*border: solid 1px rgba(0,0,0,0.03);*/
border-radius: 2px;
}
.openerp .oe_mail_wall_aside > div {
padding: 5px 5px 0 15px;
border-bottom: solid 3px white;
border-radius: 2px;
}
.openerp .oe_mail_wall_aside .oe_goal {
border-bottom: solid 3px white;
}
.openerp .oe_mail_wall_aside h3 {
font-size: 1.3em;
margin-left: -7px;
font-variant: small-caps;
text-transform: capitalize;
/*font-variant: small-caps;
text-transform: capitalize;*/
line-height: 1em;
}
.openerp .oe_mail_wall_aside .oe_goal {
width: 100%;
padding: 5px 5px 0 15px;
}
.openerp .oe_mail_wall_aside .oe_goal h4 {
font-size: 110%;
}
/*.openerp .oe_mail_wall_aside .oe_goal a {
color: #4c4c4c;;
@ -91,23 +103,34 @@
list-style-type: none;
padding-left: 0;
margin-top: 5px;
margin-bottom: 15px;
margin-bottom: 10px;
}
.openerp .oe_mail_wall_aside table.oe_goals_list {
width: 95%;
/*border: 1px dotted rgb(221, 221, 221);
border-color: rgba(133, 133, 133, 0.3);*/
border: solid 1px rgba(0,0,0,0.05);
/*border: solid 1px rgba(0,0,0,0.05);*/
}
.openerp .oe_mail_wall_aside .oe_goals_list > li {
padding-bottom: 8px;
vertical-align: middle;
}
.openerp .oe_mail_wall_aside .oe_goals_list > li.oe_no_progress {
padding-bottom: 2px;
}
.openerp .oe_mail_wall_aside .oe_goals_list > li::before {
content: "\0BB \020";
font-size: 175%;
}
.openerp .oe_mail_wall_aside .oe_goals_list > li.oe_goal_reached::before {
color: rgb(27, 70, 7);
content: "✓";
/*font-size: 65%;*/ /* reduce font to have the same size as "\0BB \020" */
margin-right: -4px;
}
.openerp .oe_mail_wall_aside .oe_goals_list li .oe_goal_current {
font-size: 150%;
font-weight: bold;
}
.openerp .oe_mail_wall_aside .oe_gamification_goal .oe_goal_reached .oe_goal_inner_box {
text-decoration: line-through;
}
@ -116,10 +139,9 @@
display: inline-block;
position: relative;
height: 100%;
width: 90%;
width: 80%;
z-index: 0;
vertical-align: top;
padding-bottom: 5px;
vertical-align: middle;
}
.openerp .oe_mail_wall .oe_mail_wall_aside table .oe_goal_outer_box {
width: 100%;
@ -129,9 +151,10 @@
border-color: rgba(133, 133, 133, 0.3);
}*/
.openerp .oe_mail_wall .oe_mail_wall_aside .oe_goal_progress_background {
background-color: rgb(231, 190, 190);
/*background-color: rgb(231, 190, 190);*/
background-color: white;
position: absolute;
height: 4px;
height: 3px;
width: 100%;
z-index: -2;
top: 0; left: 0;
@ -139,8 +162,8 @@
.openerp .oe_mail_wall .oe_mail_wall_aside .oe_goal_progress {
/*background: rgb(183, 231, 179);*/
/*background: rgba(183, 231, 179, 0.5);*/
/*background-color: #7c7bad;*/
background-color: rgb(88, 155, 91);
background-color: #7c7bad;
position: absolute;
height: 3px;
width: 0;
@ -150,9 +173,12 @@
.openerp .oe_mail_wall_aside .oe_goals_list .oe_goal_inner_box {
display: inline-block;
height: 100%;
padding-top: 3px;
margin-top: 6px;
line-height: 1em;
}
.openerp .oe_mail_wall_aside .oe_goals_list .oe_goal_inner_box.oe_no_progress {
margin-top: 0;
}
.openerp .oe_mail_wall_aside .oe_goals_list .oe_goal_inner_box strong {
padding-left: 5px;
}
@ -184,7 +210,7 @@
height: 24px;
}
.openerp .oe_mail_wall_aside table.oe_goals_list .col0 {
font-size: 160%;
font-size: 200%;
font-weight: bold;
}
.openerp .oe_mail_wall_aside table.oe_goals_list .col1 {

View File

@ -11,65 +11,53 @@
</div>
<t t-if="plan.visibility_mode == 'progressbar'">
<ul class="oe_goals_list">
<li t-foreach="plan.goals" t-as="goal" t-attf-class="#{goal.state == 'reached' ? 'oe_goal_reached' : ''}">
<li t-foreach="plan.goals" t-as="goal" t-attf-class="#{goal.state == 'reached' ? 'oe_goal_reached' : ''} #{goal.type_display != 'progress' ? 'oe_no_progress' : ''}">
<t t-if="goal.type_display == 'progress'"><span class="oe_goal_current"><t t-esc="goal.current" /></span></t>
<div class="oe_goal_outer_box">
<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>
</t>
<div class="oe_goal_inner_box">
<div t-attf-class="oe_goal_inner_box #{goal.type_display != 'progress' ? 'oe_no_progress' : ''}">
<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">
<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.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">&amp;</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>
(target:
</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>
)
(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>
</div>
</li>
</ul>
</t>
<t t-if="plan.visibility_mode == 'board'">
<table t-foreach="plan.planlines" t-as="planline" class="oe_goals_list">
<thead>
<tr>
<th colspan="3" t-attf-title="#{planline.type_description ? planline.type_description : ''}">
<t t-if="planline.computation_mode != 'manually' and !planline.type_action">
<strong><t t-esc="planline.type_name"/></strong>
</t>
<t t-if="planline.type_action">
<strong><a class="oe_goal_action" t-att-id="planline.own_goal_id"><t t-esc="planline.type_name"/></a></strong>
</t>
<strong><t t-esc="planline.type_name"/></strong>
<t t-if="planline.computation_mode == 'manually' and !planline.type_action">
<strong><t t-esc="planline.type_name"/></strong>
<a class="oe_goal_action oe_e" t-att-id="planline.own_goal_id">&amp;</a>
</t>
<br/>
<t t-if="planline.type_condition == 'higher'">
(Goal: max
Target:
</t>
<t t-if="planline.type_condition == 'lower'">
(Goal: min
Target (less than):
</t>
<span t-attf-class="#{planline.type_monetary ? 'oe_goal_field_monetary' : ''}"><t t-esc="planline.target_goal" /></span><t t-if="planline.type_unit"> <t t-esc="planline.type_unit"/></t>)
</th>
@ -88,7 +76,14 @@
</t>
<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>
<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>
<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">
<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>
</div>
</div>
</td>
@ -101,12 +96,14 @@
</t>
<t t-name="gamification.challenge_suggestions">
<h3>Suggestions</h3>
<ul t-foreach="widget.challenge_suggestions.info" t-as="challenge" class="oe_goals_list">
<li>
<strong><a class="oe_challenge_reply" t-attf-title="#{challenge.description.value ? challenge.description.value : ''}" t-attf-id="{challenge.id}" title="more details..."><t t-esc="challenge.name"/></a></strong>
</li>
</ul>
<div class="oe_goal">
<h3>Suggestions</h3>
<ul t-foreach="widget.challenge_suggestions.info" t-as="challenge" class="oe_goals_list">
<li>
<strong><a class="oe_challenge_reply" t-attf-title="#{challenge.description.value ? challenge.description.value : ''}" t-attf-id="{challenge.id}" title="more details..."><t t-esc="challenge.name"/></a></strong>
</li>
</ul>
</div>
</t>
</templates>

View File

@ -15,7 +15,7 @@
</record>
<record model="gamification.goal.type" id="type_crm_nbr_new_leads">
<field name="name"># New Leads</field>
<field name="name">New Leads</field>
<field name="description">Based on the creation date</field>
<field name="computation_mode">count</field>
<field name="unit">leads</field>
@ -50,7 +50,7 @@
<record model="gamification.goal.type" id="type_crm_nbr_call">
<field name="name"># Logged Calls</field>
<field name="name">Logged Calls</field>
<field name="description">Log a certain number of calls to reach this goal</field>
<field name="computation_mode">count</field>
<field name="unit">calls</field>
@ -60,7 +60,7 @@
</record>
<record model="gamification.goal.type" id="type_crm_nbr_new_opportunities">
<field name="name"># New Opportunities</field>
<field name="name">New Opportunities</field>
<field name="description">Based on the opening date</field>
<field name="computation_mode">count</field>
<field name="unit">opportunities</field>
@ -70,7 +70,7 @@
</record>
<record model="gamification.goal.type" id="type_crm_nbr_sale_order_created">
<field name="name"># New Sales Orders</field>
<field name="name">New Sales Orders</field>
<field name="description">Based on the creation date</field>
<field name="computation_mode">count</field>
<field name="unit">orders</field>
@ -80,7 +80,7 @@
</record>
<record model="gamification.goal.type" id="type_crm_nbr_paid_sale_order">
<field name="name"># Paid Sales Orders</field>
<field name="name">Paid Sales Orders</field>
<field name="description">Based on the invoice date</field>
<field name="computation_mode">count</field>
<field name="unit">orders</field>
@ -101,7 +101,7 @@
<record model="gamification.goal.type" id="type_crm_nbr_customer_refunds">
<field name="name"># Customer Refunds</field>
<field name="name">Customer Refunds</field>
<field name="description">Refund the least customers (lower than)</field>
<field name="computation_mode">count</field>
<field name="condition">lower</field>