[WIP] attach dropdown menus to employees vignettes to easily change their visibility
bzr revid: abo@openerp.com-20120705172611-r8su5cz8j3rpyk7t
This commit is contained in:
parent
3019ad848c
commit
23aeb705be
|
@ -42,6 +42,9 @@ portal_crm (which creates the contact page) are installed.
|
|||
'css': [
|
||||
'static/src/css/portal_hr_employees.css',
|
||||
],
|
||||
'js': [
|
||||
'static/lib/jquery.expander/portal_hr_employees.js',
|
||||
],
|
||||
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -28,15 +28,25 @@
|
|||
<h1>Meet the team</h1>
|
||||
<field name="employee_ids" widget="many2many_kanban">
|
||||
<kanban>
|
||||
<field name="visibility"/>
|
||||
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_employee_vignette">
|
||||
<span class="oe_dropdown_toggle oe_dropdown_arrow">
|
||||
<ul class="oe_dropdown_menu">
|
||||
<li t-if="record.visibility.raw_value != 'private'"><a href="#" t-attf-data-id='{record.id}' class="oe_employee_make_private">Hide this employee</a></li>
|
||||
<li t-if="record.visibility.raw_value != 'public'"><a href="#" t-attf-data-id='{record.id}' class="oe_employee_make_public">Make this employee visible for everyone</a></li>
|
||||
<li t-if="record.visibility.raw_value != 'portal'"><a href="#" t-attf-data-id='{record.id}' class="oe_employee_make_portal">Make this employee visible for portal users</a></li>
|
||||
</ul>
|
||||
</span>
|
||||
|
||||
<div class="oe_employee_image">
|
||||
<a type="edit"><img t-att-src="kanban_image('hr.employee', 'photo', record.id.value)" class="oe_employee_picture"/></a>
|
||||
<img t-att-src="kanban_image('hr.employee', 'photo', record.id.value)" class="oe_employee_picture"/>
|
||||
</div>
|
||||
<div class="oe_employee_details">
|
||||
<h4>
|
||||
<a type="edit"><field name="name"/><t t-if="record.login.raw_value"> (<field name="login"/>)</t></a>
|
||||
<field name="name"/><t t-if="record.login.raw_value"> (<field name="login"/>)</t>
|
||||
</h4>
|
||||
<ul>
|
||||
<li t-if="record.job_id.raw_value"><field name="job_id"/></li>
|
||||
|
|
|
@ -9,3 +9,16 @@
|
|||
width: 65px;
|
||||
height: 65px;
|
||||
}
|
||||
|
||||
/* Dropdown menu */
|
||||
.openerp .oe_portal_crm_contact .oe_employee_vignette .oe_dropdown_toggle {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 5px;
|
||||
}
|
||||
.openerp .oe_portal_crm_contact .oe_employee_vignette .oe_dropdown_arrow:after {
|
||||
border-top: 4px solid transparent;
|
||||
}
|
||||
.openerp .oe_portal_crm_contact .oe_employee_vignette:hover .oe_dropdown_arrow:after {
|
||||
border-top: 4px solid #404040;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
openerp.portal_hr_employees = function(session) {
|
||||
|
||||
}
|
Loading…
Reference in New Issue