Pinakin Nayi (OpenERP) has proposed merging 
lp:~openerp-commiter/openobject-addons/trunk-tools-view-imp-dbr-survey-kanban-pna
 into lp:~openerp-dev/openobject-addons/trunk-tools-view-imp-dbr.

Requested reviews:
  Devishree Brahmbhatt (OpenERP) (dbr-openerp)

For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-tools-view-imp-dbr-survey-kanban-pna/+merge/113570

Hello ,

I Improved Survey Module Kanban view.

Thanks,
pna
-- 
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-tools-view-imp-dbr-survey-kanban-pna/+merge/113570
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-tools-view-imp-dbr.
=== modified file 'survey/static/src/css/survey.css'
--- survey/static/src/css/survey.css	2012-04-19 11:51:41 +0000
+++ survey/static/src/css/survey.css	2012-07-05 12:50:27 +0000
@@ -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;
+}
+

=== modified file 'survey/survey.py'
--- survey/survey.py	2012-06-28 10:29:42 +0000
+++ survey/survey.py	2012-07-05 12:50:27 +0000
@@ -68,6 +68,7 @@
         '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 = {

=== modified file 'survey/survey_view.xml'
--- survey/survey_view.xml	2012-07-05 07:02:51 +0000
+++ survey/survey_view.xml	2012-07-05 12:50:27 +0000
@@ -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>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to