[IMP]survey-kanban-view

bzr revid: pna@tinyerp.com-20120705124305-am3bqq8v0yrqrc12
This commit is contained in:
Pinakin Nayi (OpenERP) 2012-07-05 18:13:05 +05:30
parent 870aa740d3
commit a11440cd40
3 changed files with 34 additions and 47 deletions

View File

@ -1,20 +1,3 @@
.oe_module_survey{
font-size: 12px;
border-style:dotted;
border-radius: 15px;
text-align: left;
height:145px;
width:220px;
}
.oe_survey_title{
font-size: 15px;
height: auto;
font-size: 16px;
font-weight:bold;
width: 205px;
}
.oe_survey_responsible{
height: auto;
width: 200px;
@ -26,12 +9,10 @@
width: 200px;
font-size: 14px;
}
.oe_survey_fill{
align:right;
padding: 1px 165px;
}
.oe_survey_rate{
font-size: 14px;
}
.oe_kanban_survey {
width: 300px;
}

View File

@ -68,6 +68,7 @@ class survey(osv.osv):
'users': fields.many2many('res.users', 'survey_users_rel', 'sid', 'uid', 'Users'),
'send_response': fields.boolean('Email Notification on Answer'),
'type': fields.many2one('survey.type', 'Type'),
'color': fields.integer('Color Index'),
'invited_user_ids': fields.many2many('res.users', 'survey_invited_user_rel', 'sid', 'uid', 'Invited User'),
}
_defaults = {

View File

@ -313,32 +313,37 @@
<kanban>
<field name="title"/>
<field name="date_open"/>
<field name="color"/>
<templates>
<t t-name="kanban-box">
<div class="oe_module_survey">
<a class="oe_module_icon">
<div class="oe_survey_title"><t t-esc="record.title.raw_value.toString()"/></div><br/>
<div class="oe_survey_responsible">
<t t-if="record.responsible_id.raw_value">By: <field name="responsible_id"/></t>
</div><br/>
<div class="oe_survey_start_date">
Open From:
<t t-if="record.date_open.raw_value">
<t t-esc="record.date_open.raw_value.getDate()"/>
<t t-esc="record.date_open.raw_value.toString('MMM')"/>,
<t t-esc="record.date_open.raw_value.getFullYear()"/>
</t>
</div><br/>
<div class="oe_survey_rate">
Rate:
<div class="oe_survey_fill" >
<button type="object" name="fill_survey" class="">
<span>Fill</span>
</button>
</div>
</div>
</a>
</div>
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_survey oe_kanban_auto_height">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<span class="oe_e">i</span>
<ul class="oe_dropdown_menu">
<li><a type="edit">Edit...</a></li>
<li><a type="delete">Delete</a></li>
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
</ul>
</div>
<div class="oe_kanban_content">
<h3 class="oe_kanban_ellipsis"><field name="title"/></h3>
<div class="oe_survey_responsible">
<t t-if="record.responsible_id.raw_value">By: <field name="responsible_id"/></t>
</div><br/>
<div class="oe_survey_start_date">
Open From:
<t t-if="record.date_open.raw_value">
<t t-esc="record.date_open.raw_value.getDate()"/>
<t t-esc="record.date_open.raw_value.toString('MMM')"/>,
<t t-esc="record.date_open.raw_value.getFullYear()"/>
</t>
</div><br/>
<div class="oe_survey_rate">
Rate:
<a name="fill_survey" type="object">Fill</a>
</div>
</div>
</div>
</t>
</templates>
</kanban>