+ <record model="ir.ui.view" id="theme_kanban_view">
+ <field name="name">theme.kanban</field>
+ <field name="model">faq.theme</field>
+ <field name="arch" type="xml">
+ <kanban>
+ <templates>
+ <field name="name" invisible="1" />
+ <field name="description" invisible="1" />
+ <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 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 faq_question_content">
+ <h1><a t-att-href="'#id='+record.id.value+'&view_type=form&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" 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"/>
+ <t t-set="answers" t-value="question.answer_items"/>
+ </t>
+ </li>
+ </ul>
+
+ <p t-if="record.question_items.value == ''">Pas de question pour ce thème.</p>
+
+ </div>
+ </div>
+ </t>
+ <t t-name="question_template.sub">
+ <a t-att-href="'#id='+id+'&view_type=form&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>
+ <ul t-if="answers == ''"><li>Pas de réponse pour cette question.</li></ul>
+ </t>
+ <t t-name="answer_template.sub">
+ <a t-att-href="'#id='+id+'&view_type=form&model=faq.answer'" >
+ <t t-esc="title"/>
+ </a>
+ </t>
+
+
+ <!-- Exemple sans le template
+ <t t-name="question_template.sub">
+ <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">
+ <t t-esc="answer.name"/> (ID : <t t-esc="answer.id"/>)
+ </li>
+ </ul>
+
+ <ul t-if="answers == ''"><li>Pas de réponse pour cette question.</li></ul>
+ </t>-->
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
+
+ <!-- QUESTIONS VIEWS -->