1 <?xml version="1.0" encoding="utf-8"?>
5 <!-- Layout add nav and footer -->
6 <template id="header_footer_custom" inherit_id="website.layout"
7 name="Footer Documentation Link">
8 <xpath expr="//footer//ul[@name='products']" position="inside">
9 <li><a href="/forum/how-to">Documentation</a></li>
14 <template id="toc" name="Documentation Index">
15 <t t-set="level" t-value="level+1"/>
16 <t t-foreach="titles" t-as="title">
17 <div t-attf-class="h#{str(level) + (level<3 and ' page-header' or '')}">
18 <t t-esc="title.name"/>
19 <small t-if="len(title.post_ids)">
20 <t t-esc="len(title.post_ids)"/>
21 <t t-if="len(title.post_ids)==1">essay</t>
22 <t t-if="len(title.post_ids)>1">essays</t>
26 <ul t-if="title.post_ids" class="mt32">
27 <li t-foreach="title.post_ids" t-as="post">
28 <a t-attf-href="/forum/how-to/#{slug(title)}/#{slug(post)}" t-field="post.name"/>
32 <t t-set="titles" t-value="title.child_ids"/>
33 <t t-call="website_forum_doc.toc"/>
37 <template id="breadcrumb" name="Documentation Breadcrumb">
38 <t t-if="toc.parent_id">
39 <t t-call="website_forum_doc.breadcrumb">
40 <t t-set="toc" t-value="toc.parent_id"/>
44 <a t-attf-href="/forum/how-to/#{ slug(toc) }" t-field="toc.name"/>
48 <template id="documentation" name="Documentation Index">
49 <t t-call="website.layout">
50 <section class="container mt16" t-if="toc">
52 <div class="col-md-9">
53 <ol class="breadcrumb mb0">
54 <t t-call="website_forum_doc.breadcrumb">
55 <t t-set="toc" t-value="toc.parent_id"/>
58 <span t-field="toc.name"/>
62 <div class="col-md-3 text-right">
67 <section class="container">
68 <t t-set="level" t-value="toc and 1 or 0"/>
69 <h1 class="page-header" t-if="toc">
72 <t t-set="titles" t-value="sections"/>
73 <t t-call="website_forum_doc.toc"/>
75 <div class="oe_structure"/>
79 <template id="documentation_post" name="Documentation Question">
80 <t t-call="website.layout">
81 <section class="container mt16" t-if="toc">
83 <div class="col-sm-8">
84 <ol class="breadcrumb mb0">
85 <t t-call="website_forum_doc.breadcrumb">
86 <t t-set="toc" t-value="toc.parent_id"/>
89 <a t-attf-href="/forum/how-to/#{ slug(toc) }" t-field="toc.name"/>
93 <div class="col-sm-4 text-right" t-if="forum">
94 <form class="navbar-form navbar-right mt0" role="search" t-attf-action="/forum/#{ slug(forum) }" method="get">
95 <div class="form-group">
96 <input type="search" class="form-control"
97 name="search" placeholder="Search..."
98 t-att-value="search or ''"/>
99 <button type="submit" class="btn btn-default">Search</button>
106 <section class="container">
108 <div class="col-sm-9">
109 <h1 class="page-header" t-field="post.name"/>
110 <blockquote t-if="bool(post.content)">
111 <t t-raw="post.content"/>
114 <t t-if="post.child_ids">
115 <t t-raw="post.child_ids[0].content"/>
117 <div t-if="len(toc.post_ids)>1">
118 <h2 class="page-header">Related topics</h2>
120 <t t-foreach="toc.post_ids" t-as="topic">
121 <li t-if="post.id != topic.id">
122 <a t-attf-href="/forum/how-to/#{slug(toc)}/#{slug(topic)}" t-field="post.name"/>
127 </div><div class="col-sm-3">
128 <div class="panel panel-default mt48" id="about_doc">
129 <div class="panel-heading">
130 <h3 class="panel-title">Need more info?</h3>
132 <div class="panel-body">
133 <div class="text-muted">
134 This documentation page has been extracted
135 from the Q&A section where you can
136 discuss it and get feedback.
138 &nbsp; <a t-attf-href="/forum/#{slug(forum)}/question/#{slug(post)}" class="fa fa-arrow-right mt16"> Related question</a>
144 <div class="oe_structure mt16 mb16"/>
149 <!--TOC ON FORUM POST-->
150 <template id="forum_question_right_column" inherit_id="website_forum.header" name="Table of Content">
151 <xpath expr="//script[@src='/website_forum/static/src/js/website_forum.js']" position="after">
152 <script type="text/javascript" src="/website_doc/static/src/js/website_doc.js"/>
154 <xpath expr="//div[@id='about_forum']" position="before">
155 <div t-if="header.get('question_data')" groups="website_doc.group_documentaion_moderator">
156 <div class="panel panel-default">
157 <div class="panel-heading" id="about_forum">
158 <h3 class="panel-title">Documentation</h3>
160 <div class="panel-body">
161 <form t-attf-action="/forum/#{ slug(forum) }/question/#{ slug(question) }/toc" role="form" method="post">
162 <div class="input-group navbar-right">
163 <select class="form-control" name="content">
164 <option value=""></option>
165 <t t-foreach="documentaion_toc or []" t-as="toc">
166 <option t-att-value="toc.id" t-att-selected="toc.id == question.toc_id.id"><t t-esc="toc.name"/></option>
169 <span class="input-group-btn">
170 <button class="btn btn-primary ">save</button>