Push du travail en cours
authorAlicia FLOREZ <alicflorez@gmail.com>
Tue, 14 May 2013 07:44:46 +0000 (09:44 +0200)
committerAlicia FLOREZ <alicflorez@gmail.com>
Tue, 14 May 2013 07:44:46 +0000 (09:44 +0200)
static/css/faq.css
views/faq_view.xml

index dd5990b..ea873a5 100644 (file)
@@ -1,7 +1,8 @@
 .faq_question_panel {
-    color: green;
 }
 
 .oe_kanban_record {
-    width: 98%;
-}
\ No newline at end of file
+    width: 99%;
+}
+
+.oe_kanban_content{}
\ No newline at end of file
index eb38129..51c5259 100644 (file)
@@ -2,6 +2,7 @@
 <openerp>
     <data>
 
+        <!-- THEME VIEWS -->
 
         <record model="ir.ui.view" id="theme_form_view">
             <field name="name">theme.form</field>
@@ -45,7 +46,7 @@
 
                                     <h4>Questions</h4>
                                     <t t-foreach="record.questions.raw_value" t-as="question">
-                                        <p><t t-esc="question" /></p>
+                                        <p><t t-call="kanban-question" /></p>
                                     </t>
 
                                     <p>Domain: <t t-esc="record.questions.domain" /></p>
@@ -69,6 +70,8 @@
         </record>
 
 
+        <!-- QUESTIONS VIEWS -->
+
         <record model="ir.ui.view" id="question_form_view">
             <field name="name">question.form</field>
             <field name="model">faq.question</field>
         </record>
 
 
+        <record model="ir.ui.view" id="question_kanban_view">
+            <field name="name">question.kanban</field>
+            <field name="model">faq.question</field>
+            <field name="arch" type="xml">
+                <kanban>
+                    <templates>
+                        <t t-name="kanban-box">
+                            <div class="oe_kanban_card oe_semantic_html_override oe_kanban_global_click_edit faq_question_panel">
+                                <div class="oe_dropdown_kanban">
+
+                                    <div class="oe_dropdown_toggle">
+                                        <span class="oe_e">X</span>
+                                        <ul class="oe_dropdown_menu">
+                                            <li><a type="delete">Delete</a></li>
+                                           </ul>
+                                    </div>
+                                    <div class="oe_clear" />
+                                </div>
+
+                                <div t-attf-class="oe_kanban_content">
+                                    <h2><field name="name" /></h2>
+                                    <h4>Description</h4>
+                                    <field name="description" />
+                                    <field name="answers">
+                                        <tree string="Machin">
+                                            <field name="name" />
+                                        </tree>
+                                    </field>
+                                    <h4>Tests</h4>
+                                    <p>Domain: <t t-esc="record.answers.domain" />(<t t-esc="typeof record.answers.domain" />)</p>
+                                    <p>String: <t t-esc="record.answers.string" />(<t t-esc="typeof record.answers.string" />)</p>
+                                    <p>Views: <t t-esc="record.answers.views" />(<t t-esc="typeof record.answers.views" />)</p>
+                                    <p>Relation: <t t-esc="record.answers.relation" />(<t t-esc="typeof record.answers.relation" />)</p>
+                                    <p>Context: <t t-esc="record.answers.context" />(<t t-esc="typeof record.answers.context" />)</p>
+                                    <p>Relation_field: <t t-esc="record.answers.relation_field" />(<t t-esc="typeof record.answers.relation_field" />)</p>
+                                    <p>Selectable: <t t-esc="record.answers.selectable" />(<t t-esc="typeof record.answers.selectable" />)</p>
+                                    <p>Type: <t t-esc="record.answers.type" />(<t t-esc="typeof record.answers.type" />)</p>
+                                    <p>Value: <t t-esc="record.answers.value" />(<t t-esc="typeof record.answers.value" />)</p>
+                                    <p>Raw_value: <t t-esc="record.answers.raw_value" />(<t t-esc="typeof record.answers.raw_value" />)</p>
+
+                                    <p>View 0: <t t-esc="record.answers.views[0]" /></p>
+                                    <p>Context 0: <t t-esc="record.answers.context[0]" /></p>
+
+                                    <h4>RĂ©ponses</h4>
+                                    <ul t-name="Answers">
+                                        <li t-foreach="record.answers.raw_value" t-as="answer">
+                                            <span class="oe_tag" t-att-data-answer="answer"></span><!--
+                                            <t t-esc="answer"/>(<t t-esc="typeof answer"/>)
+                                            <t t-esc="kanban_image('faq.anwser', 'name', answer)"/>
+                                            11<t t-esc="answer.name"/>
+                                            12<t t-esc="answer[name]"/>
+                                            13<t t-esc="answer['name']"/>
+                                            14<t t-esc="answer.name.value"/>
+                                            15<t t-esc="answer[name].value"/>
+                                            16<t t-esc="answer['name'].value"/>
+                                            <t t-call="example_template.sub">
+                                                <t t-set="arg" t-value="answer_value"/>
+                                            </t>-->
+                                        </li>
+                                    </ul>
+                                </div>
+
+                            </div>
+                        </t>
+                            <t t-name="example_template.sub">
+                                21<t t-esc="arg.name"/>
+                                22<t t-esc="arg[name]"/>
+                                23<t t-esc="arg['name']"/><!--
+                                24<t t-esc="arg.name.value"/>
+                                25<t t-esc="arg[name].value"/>
+                                26<t t-esc="arg['name'].value"/>-->
+                            </t>
+                    </templates>
+                </kanban>
+            </field>
+        </record>
+
+
+        <!-- ANSWSERS VIEWS -->
+
         <record model="ir.ui.view" id="answer_form_view">
             <field name="name">answer.form</field>
             <field name="model">faq.answer</field>
         <record model="ir.actions.act_window" id="faq_questions_action">
             <field name="name">Questions</field>
             <field name="res_model">faq.question</field>
-            <field name="view_mode">tree,form</field>
+            <field name="view_mode">kanban,tree,form</field>
             <field name="help" type="html">
                 <p class="oe_view_nocontent_create">Create your first question</p>
             </field>
         <!--<record model="ir.actions.act_window" id="faq_answers_action">
             <field name="name">Answers</field>
             <field name="res_model">faq.answer</field>
-            <field name="view_mode">tree,form</field>
+            <field name="view_mode">kanban,tree,form</field>
             <field name="help" type="html">
                 <p class="oe_view_nocontent_create">Create your first answer</p>
             </field>
         <!--<menuitem id="faq_answers_menu" name="Answers" parent="faq_menu" action="faq_aswers_action" />-->
 
     </data>
-</openerp>
\ No newline at end of file
+</openerp>