Ajout de lien hypertext sur les réponses dans la vue KANBAN des thèmes
[OpenERP/faq.git] / views / faq_view.xml
index bd3daaf..acf489f 100644 (file)
@@ -27,7 +27,7 @@
                         <field name="questions" invisible="1" />
                         <field name="question_items" invisible="1" />
                         <t t-name="kanban-box">
-                            <div class="oe_kanban_card oe_semantic_html_override oe_resource_details oe_kanban_global_click_edit faq_question_panel">
+                            <div class="oe_kanban_card oe_semantic_html_override oe_resource_details faq_question_panel">
                                 <div class="oe_dropdown_kanban">
 
                                     <div class="oe_dropdown_toggle">
@@ -46,8 +46,8 @@
 
                                     <h2>Questions :</h2>
 
-                                    <ul t-if="record.question_items.value">
-                                        <li t-foreach="record.question_items.value" t-as="question" t-att-class="question_parity">
+                                    <ul t-if="record.question_items.value" t-att-class="question_parity">
+                                        <li t-foreach="record.question_items.value" t-as="question" class="question_frame">
                                             <t t-call="question_template.sub">
                                                 <t t-set="title" t-value="question.name"/>
                                                 <t t-set="id" t-value="question.id"/>
 
                                 </div>
                             </div>
-                        </t><!--
+                        </t>
                         <t t-name="question_template.sub">
-                            <p><t t-esc="title"/> (ID : <t t-esc="id"/>)</p>
-                            <ul t-if="answers">
-                                <li t-foreach="answers" t-as="answer" t-att-class="answer_parity">
-                                    <t t-call="answer2_template.sub">
+                            <a t-att-href="'#id='+id+'&amp;view_type=form&amp;model=faq.question'" >
+                                <t t-esc="title"/>
+                            </a>
+                            <ul t-if="answers!=''">
+                                <li t-foreach="answers" t-as="answer" class="bullet">
+                                    <t t-call="answer_template.sub">
                                         <t t-set="title" t-value="answer.name"/>
                                         <t t-set="id" t-value="answer.id"/>
                                     </t>
                                 </li>
                             </ul>
-                            <p t-if="answers == ''">Pas de réponse pour cette question.</p>
+                            <ul t-if="answers == ''"><li>Pas de réponse pour cette question.</li></ul>
                         </t>
-                        <t t-name="answer2_template.sub">
-                            <t t-esc="title"/> (ID : <t t-esc="id"/>)
-                        </t>-->
+                        <t t-name="answer_template.sub">
+                            <a t-att-href="'#id='+id+'&amp;view_type=form&amp;model=faq.answer'" >
+                                <t t-esc="title"/>
+                            </a>
+                        </t>
+
+
+                        <!-- Exemple sans le template
                         <t t-name="question_template.sub">
-                            <b><t t-esc="title"/> (ID : <t t-esc="id"/>)</b>
+                            <h4><t t-esc="title"/> (ID : <t t-esc="id"/>)</h4>
 
                             <ul t-if="answers">
                                 <li t-foreach="answers" t-as="answer" t-att-class="answer_parity">
@@ -86,7 +93,7 @@
                             </ul>
 
                             <ul t-if="answers == ''"><li>Pas de réponse pour cette question.</li></ul>
-                        </t>
+                        </t>-->
                     </templates>
                 </kanban>
             </field>
                                 </div>
 
                                 <div t-attf-class="oe_kanban_content">
-                                    <h2><field name="name" /></h2>
-                                    <h4>Thème : <field name="theme_id" /></h4>
-                                    <h4>Question :</h4>
-                                    <field name="description" />
+                                    <h2><field name="name" /> (Thème : <field name="theme_id" />)</h2>
+                                    <h3><field name="description" /></h3>
 
                                     <h4>Réponses :</h4>
                                     <field name="answer_items" invisible="1" />
                                     <ul t-if="record.answer_items.value">
-                                        <li t-foreach="record.answer_items.value" t-as="answer" t-att-class="answer_parity">
+                                        <li t-foreach="record.answer_items.value" t-as="answer"  class="bullet">
                                             <t t-call="answer_template.sub">
                                                 <t t-set="title" t-value="answer.name"/>
                                                 <t t-set="id" t-value="answer.id"/>