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-sm-8">
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-sm-4 text-right">
63 <form class="navbar-form navbar-right mt0" role="search" t-attf-action="/forum/#{ slug(forum) }" method="get">
64 <div class="form-group">
65 <input type="search" class="form-control"
66 name="search" placeholder="Search..."
67 t-att-value="search or ''"/>
68 <button type="submit" class="btn btn-default">Search</button>
74 <section class="container">
75 <t t-set="level" t-value="toc and 1 or 0"/>
76 <h1 class="page-header" t-if="toc">
79 <t t-set="titles" t-value="sections"/>
80 <t t-call="website_forum_doc.toc"/>
82 <div class="oe_structure"/>
86 <template id="documentation_post" name="Documentation Question">
87 <t t-call="website.layout">
88 <section class="container mt16" t-if="toc">
90 <div class="col-sm-8">
91 <ol class="breadcrumb mb0">
92 <t t-call="website_forum_doc.breadcrumb">
93 <t t-set="toc" t-value="toc.parent_id"/>
96 <a t-attf-href="/forum/how-to/#{ slug(toc) }" t-field="toc.name"/>
100 <div class="col-sm-4 text-right" t-if="forum">
101 <form class="navbar-form navbar-right mt0" role="search" t-attf-action="/forum/#{ slug(forum) }" method="get">
102 <div class="form-group">
103 <input type="search" class="form-control"
104 name="search" placeholder="Search..."
105 t-att-value="search or ''"/>
106 <button type="submit" class="btn btn-default">Search</button>
113 <section class="container">
115 <div class="col-sm-9">
116 <h1 class="page-header" t-field="post.name"/>
117 <blockquote t-if="bool(post.content)">
118 <t t-raw="post.content"/>
121 <t t-if="post.child_ids">
122 <t t-raw="post.child_ids[0].content"/>
124 <div t-if="len(toc.post_ids)>1">
125 <h2 class="page-header">Related topics</h2>
127 <t t-foreach="toc.post_ids" t-as="topic">
128 <li t-if="post.id != topic.id">
129 <a t-attf-href="/forum/how-to/#{slug(toc)}/#{slug(topic)}" t-field="post.name"/>
134 </div><div class="col-sm-3">
135 <div class="panel panel-default mt48" id="about_doc">
136 <div class="panel-heading">
137 <h3 class="panel-title">Need more info?</h3>
139 <div class="panel-body">
140 <div class="text-muted">
141 This documentation page has been extracted
142 from the Q&A section where you can
143 discuss it and get feedback.
145 &nbsp; <a t-attf-href="/forum/#{slug(forum)}/question/#{slug(post)}" class="fa fa-arrow-right mt16"> Related question</a>
151 <div class="oe_structure mt16 mb16"/>
156 <!--TOC ON FORUM POST-->
157 <template id="forum_question_right_column" inherit_id="website_forum.header" name="Table of Content">
158 <xpath expr="//script[@src='/website_forum/static/src/js/website_forum.js']" position="after">
159 <script type="text/javascript" src="/website_doc/static/src/js/website_doc.js"/>
161 <xpath expr="//div[@id='about_forum']" position="before">
162 <div t-if="header.get('question_data')" groups="website_doc.group_documentaion_moderator">
163 <div class="panel panel-default">
164 <div class="panel-heading" id="about_forum">
165 <h3 class="panel-title">Documentation</h3>
167 <div class="panel-body">
168 <form t-attf-action="/forum/#{ slug(forum) }/question/#{ slug(question) }/toc" role="form" method="post">
169 <div class="input-group navbar-right">
170 <select class="form-control" name="content">
171 <option value=""></option>
172 <t t-foreach="documentaion_toc or []" t-as="toc">
173 <option t-att-value="toc.id" t-att-selected="toc.id == question.toc_id.id"><t t-esc="toc.name"/></option>
176 <span class="input-group-btn">
177 <button class="btn btn-primary ">save</button>