[IMP] move button and add images
bzr revid: mat@openerp.com-20130318092130-f7r2618wtqkb9b3c
This commit is contained in:
parent
2027261af8
commit
7744fadcb9
|
@ -63,17 +63,17 @@
|
||||||
<field name="model">gamification.badge</field>
|
<field name="model">gamification.badge</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Badge" version="7.0">
|
<form string="Badge" version="7.0">
|
||||||
|
<header>
|
||||||
|
<button string="Send this Badge" type="action" name="%(action_grant_wizard)d" class="oe_highlight" attrs="{'invisible': [
|
||||||
|
'|',
|
||||||
|
('rule_auth', '=', 'nobody'),
|
||||||
|
'&',
|
||||||
|
('rule_max', '=', True),
|
||||||
|
('stat_this_month', '>=', 'rule_max_number')
|
||||||
|
]}" />
|
||||||
|
<button string="Check Badge" type="object" name="check_automatic" groups="base.group_no_one" />
|
||||||
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_right oe_button_box">
|
|
||||||
<button string="Send this Badge" type="action" name="%(action_grant_wizard)d" class="oe_highlight" attrs="{'invisible': [
|
|
||||||
'|',
|
|
||||||
('rule_auth', '=', 'nobody'),
|
|
||||||
'&',
|
|
||||||
('rule_max', '=', True),
|
|
||||||
('stat_this_month', '>=', 'rule_max_number')
|
|
||||||
]}" />
|
|
||||||
<button string="Check Badge" type="object" name="check_automatic" groups="base.group_no_one" />
|
|
||||||
</div>
|
|
||||||
<field name="image" widget='image' class="oe_left oe_avatar"/>
|
<field name="image" widget='image' class="oe_left oe_avatar"/>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only"/>
|
<label for="name" class="oe_edit_only"/>
|
||||||
|
@ -119,6 +119,8 @@
|
||||||
<field name="description"/>
|
<field name="description"/>
|
||||||
<field name="image"/>
|
<field name="image"/>
|
||||||
<field name="stat_my"/>
|
<field name="stat_my"/>
|
||||||
|
<field name="stat_count"/>
|
||||||
|
<field name="stat_count_distinct"/>
|
||||||
<templates>
|
<templates>
|
||||||
<t t-name="kanban-box">
|
<t t-name="kanban-box">
|
||||||
<div tclass="oe_kanban_card oe_kanban_global_click oe_kanban_goal oe_kanban_color_white">
|
<div tclass="oe_kanban_card oe_kanban_global_click oe_kanban_goal oe_kanban_color_white">
|
||||||
|
@ -126,10 +128,22 @@
|
||||||
<div class="oe_kanban_left">
|
<div class="oe_kanban_left">
|
||||||
<a type="open"><img t-att-src="kanban_image('gamification.badge', 'image', record.image.raw_value)" t-att-title="record.name.value" width="24" height="24" /></a>
|
<a type="open"><img t-att-src="kanban_image('gamification.badge', 'image', record.image.raw_value)" t-att-title="record.name.value" width="24" height="24" /></a>
|
||||||
</div>
|
</div>
|
||||||
<h4><a type="open"><field name="name"/></a></h4>
|
<h4>
|
||||||
|
<a type="open"><field name="name"/></a>
|
||||||
|
<t t-if="record.stat_my.value"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
|
||||||
|
WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QMSCREbCamR5gAAAXhJREFUOMuV0z9rlEEQBvDf7htF
|
||||||
|
FIwQBCvRQuFAJSJooY29VrH0E1hcCqNign8SYzAxRfTA0nyAg3wBK1GCKSwTK8G7j6AgiHl3LbLm
|
||||||
|
wOQu8Wl2mZ15Zp6ZnWC/GMcrjBvBdTRkX4P/QdNZrGKkWN7sn+CuE5IvsqOyKFnRMhb3DJwsZ2VV
|
||||||
|
5ZgoCt5qGdsyD8ITzGJSW3BVkAUdlZsu++0T/SU8xxQeuyj7LKEWJKcs6Px16y9harv0NVEQBZWm
|
||||||
|
BR33e26Dm/hMW3BLLUvW/XJBlM31XIZMlNsi7pWa5jGjIbiBXBLd8UL+N0e0WIInvMNp8+Wltqx2
|
||||||
|
SBJk06Z98HRnkUHTOZWPomEVojOiUZV26foP2XkHdD3aSRBxXDIsSRKyddmyGklQa5vRtbl7mypr
|
||||||
|
vrnisOBa0TuEgyBhziXwfneCrTG+9kDSkgQJSbaJ2ix42H9QYXvTakdEG4KThfanoKHS9XIvgt7K
|
||||||
|
jspW8F2wIbhtSRr0Vf4AD6Nod0TaN4kAAAAASUVORK5CYII=" alt="got-it" /></t>
|
||||||
|
</h4>
|
||||||
<t t-if="record.description.value">
|
<t t-if="record.description.value">
|
||||||
<em><field name="description"/></em>
|
<em><field name="description"/></em>
|
||||||
</t>
|
</t>
|
||||||
|
<p>Granted <t t-esc="record.stat_count.raw_value" />x (<t t-esc="record.stat_count_distinct.raw_value"/> pers.)</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
|
|
|
@ -299,7 +299,7 @@ class hr_employee(osv.osv):
|
||||||
res = super(hr_employee, self).message_post(cr, uid, employee_id, context=context, **kwargs)
|
res = super(hr_employee, self).message_post(cr, uid, employee_id, context=context, **kwargs)
|
||||||
return res
|
return res
|
||||||
else:
|
else:
|
||||||
raise osv.except_osv('Warning!', 'You need to be an employee to send messages to your followers.')
|
raise osv.except_osv('Warning!', 'Your user is not linked to an employee form, which is required to send messages to your followers.')
|
||||||
|
|
||||||
# if no overwrite, send message as usual
|
# if no overwrite, send message as usual
|
||||||
return super(hr_employee, self).message_post(cr, uid, thread_id, context=context, **kwargs)
|
return super(hr_employee, self).message_post(cr, uid, thread_id, context=context, **kwargs)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//page[@string='Public Information']" position="before">
|
<xpath expr="//page[@string='Public Information']" position="before">
|
||||||
<page string="Public Profile">
|
<page string="Badges">
|
||||||
<field name="badge_ids" widget="many2many_kanban" />
|
<field name="badge_ids" widget="many2many_kanban" />
|
||||||
</page>
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
Loading…
Reference in New Issue