Ajout de lien hypertext sur les questions dans la vue KANBAN des questions
[OpenERP/faq.git] / views / faq_view.xml
index b3871a9..9ff2916 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">
                                 </div>
 
                                 <div t-attf-class="oe_kanban_content faq_question_content">
-                                    <h1><t t-esc="record.name.value" /></h1>
-
+                                    <h1><a t-att-href="'#id='+record.id.value+'&amp;view_type=form&amp;model=faq.theme'">
+                                        <t t-esc="record.name.value" />
+                                    </a></h1>
                                     <t t-esc="record.description.value" />
 
                                     <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>
                         </t>
                         <t t-name="question_template.sub">
-                            <p><t t-esc="title"/> (ID : <t t-esc="id"/>)</p>
-                            <ul t-if="answers" >
+                            <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"/>
@@ -74,7 +77,9 @@
                             <ul t-if="answers == ''"><li>Pas de réponse pour cette question.</li></ul>
                         </t>
                         <t t-name="answer_template.sub">
-                            <t t-esc="title"/>
+                            <a t-att-href="'#id='+id+'&amp;view_type=form&amp;model=faq.answer'" >
+                                <t t-esc="title"/>
+                            </a>
                         </t>
 
 
             <field name="arch" type="xml">
                 <form string="Question Form" version="7.0">
                     <field name="name" />
+                    <field name="theme_id" />
                     <field name="description" />
                     <field name="answers" />
                 </form>
                 <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_kanban_card oe_semantic_html_override faq_question_panel">
                                 <div class="oe_dropdown_kanban">
 
                                     <div class="oe_dropdown_toggle">
                                 </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>
+                                        <a t-att-href="'#id='+record.id.value+'&amp;view_type=form&amp;model=faq.question'" >
+                                            <field name="name" /> (Thème : <field name="theme_id" />)
+                                        </a>
+                                    </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"/>
                             </div>
                         </t>
                         <t t-name="answer_template.sub">
-                            <t t-esc="title"/> (ID : <t t-esc="id"/>)
+                            <a t-att-href="'#id='+id+'&amp;view_type=form&amp;model=faq.answer'" >
+                                <t t-esc="title"/>
+                            </a>
                         </t>
                     </templates>
                 </kanban>