[IMP] Survey header navigation.

bzr revid: tta@openerp.com-20120704091704-rv662eai8vvacpte
This commit is contained in:
Tejas Tank 2012-07-04 14:47:04 +05:30
commit 7fe009bfaf
5 changed files with 21 additions and 52 deletions

View File

@ -58,5 +58,6 @@ Partners are also sent mails with user name and password for the invitation of t
'auto_install': False,
'certificate' : '001131639736864143245',
'images': ['images/survey_answers.jpeg','images/survey_pages.jpeg','images/surveys.jpeg'],
'css' : ['static/css/survey.css'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,14 @@
.oe_survey_title {
font-weight: bold;
font-size: 22px;
margin: 8px 0px 8px 0px;
color: #5B5B5B;
}
.oe_survey_title_height{
height: 33px;
}
.oe_survey_title_page {
font-size: 14px;
}

View File

@ -1,37 +0,0 @@
.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;
font-size: 14px;
}
.oe_survey_start_date{
height: auto;
width: 200px;
font-size: 14px;
}
.oe_survey_fill{
align:right;
padding: 1px 165px;
}
.oe_survey_rate{
font-size: 14px;
}

View File

@ -147,24 +147,16 @@ class survey_question_wiz(osv.osv_memory):
if flag:
pag_rec = page_obj.browse(cr, uid, p_id, context=context)
xml_form = etree.Element('form', {'string': tools.ustr(sur_rec.title)})
xml_header = etree.SubElement(xml_form, 'header', {'col': '6', 'colspan': '4'})
xml_header = etree.SubElement(xml_form, 'header', {'col': '6', 'colspan': '4' ,'class': 'oe_survey_title_height'})
xml_header_title = etree.SubElement(xml_header, 'group', {'col': '6', 'colspan': '6'})
############# PAGE HEADER : START ###################
#etree.SubElement(xml_group, 'field', {'name': 'progress_bar_' + tools.ustr(page_number) , 'widget':'progressbar'})
#fields['progress_bar_' + tools.ustr(page_number)] = {'type':'float', 'string':"Progress", 'views':{}}
# etree.SubElement(xml_group, 'label', {'string': tools.ustr(tools.ustr(pag_rec.note)), 'align':"0.0"})
etree.SubElement(xml_header_title, 'label', {'string': tools.ustr(pag_rec.title) ,'colspan': '2' ,'class':'oe_horizontal_separator'})
xml_header_group = etree.SubElement(xml_header_title, 'group', {'col': '4', 'colspan': '2'})
#xml_header_page = etree.SubElement(xml_header_title, 'group', {'col': '1', 'colspan': '1'})
etree.SubElement(xml_header_title, 'label', {'string': tools.ustr(pag_rec.title) ,'colspan': '2' ,'class' : 'oe_survey_title'})
xml_header_group = etree.SubElement(xml_header_title, 'group', {'col': '4', 'colspan': '1'})
xml_group = etree.SubElement(xml_form, 'group', {'col': '8', 'colspan': '4'})
etree.SubElement(xml_header_group, 'label', {'string': tools.ustr(page_number+ 1) + "/" + tools.ustr(total_pages), 'class':"oe_right"})
etree.SubElement(xml_header_group, 'button', {'special': "cancel",'string':"Exit", 'class':"oe_right"})
if pre_button:
etree.SubElement(xml_header_group, 'button', {'colspan':"1",'name':"action_previous",'string':"Previous",'type':"object", 'class':"oe_right"})
etree.SubElement(xml_header_group, 'button', {'name':"action_previous",'string':"Previous",'type':"object", 'class':"oe_right"})
but_string = "Next"
if int(page_number) + 1 == total_pages:
but_string = "Done"
@ -176,9 +168,7 @@ class survey_question_wiz(osv.osv_memory):
etree.SubElement(xml_header_group, 'button', {'special': "cancel", 'string' : 'Done', 'context' : tools.ustr(context), 'class':"oe_right"})
else:
etree.SubElement(xml_header_group, 'button', {'name':"action_next",'string': tools.ustr(but_string) ,'type':"object",'context' : tools.ustr(context), 'class':"oe_right"})
# etree.SubElement(xml_header_page, 'label', {'string': tools.ustr(page_number+ 1) + "/" + tools.ustr(total_pages), 'class':"oe_right"})
############# PAGE HEADER : END ###################
etree.SubElement(xml_header_group, 'label', {'string': tools.ustr(page_number+ 1) + "/" + tools.ustr(total_pages), 'class':"oe_right oe_survey_title_page"})
if context.has_key('active') and context.get('active',False) and context.has_key('edit'):
etree.SubElement(xml_form, 'separator', {'string' : '','colspan': '4'})

View File

@ -28,6 +28,7 @@
</record>
<record id="action_view_survey_question_message" model="ir.actions.act_window">
<field name="name">Answer Survey</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">survey.question.wiz</field>
<field name="view_type">form</field>