93 lines
4.6 KiB
XML
93 lines
4.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<!-- Layout add nav and footer -->
|
|
<template id="header_footer_custom" inherit_id="website.layout"
|
|
name="Footer Documentation Link">
|
|
<xpath expr="//footer//ul[@name='products']" position="inside">
|
|
<li><a href="/forum/how-to">Documentation</a></li>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- Page Index -->
|
|
<template id="documentation" name="Documentation Index">
|
|
<t t-call="website.layout">
|
|
<t t-set="head">
|
|
<link rel='stylesheet' href='/website_forum_doc/static/src/css/website_doc.css'/>
|
|
<script type="text/javascript" src="/website_forum_doc/static/src/js/website_doc.js"/>
|
|
</t>
|
|
<div class="container mt16 document">
|
|
<div class="col-md-3 mt32 css_noprint bs-sidebar menu-tree">
|
|
<t t-call="website_doc.side_panel"><t t-set="documentation" t-value="documentaion_toc"/></t>
|
|
</div>
|
|
<div class="col-md-9 mt32 document_page">
|
|
<strong><h2 t-esc="topic.name" class="text-center"/></strong>
|
|
<div t-foreach="topic.post_ids" t-as="post">
|
|
<h2><p class="faq-question" t-esc="post.name"/></h2>
|
|
<div t-if="post.pertinent_answer_id">
|
|
<p><t t-raw="post.pertinent_answer_id.content"/></p>
|
|
</div>
|
|
<div class="pull-right">
|
|
<a t-attf-href="/forum/#{ slug(post.forum_id) }/question/#{ slug(post) }">Read More About This..</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="oe_structure"/>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
|
|
<!--MENU LIST-->
|
|
<template id="side_panel">
|
|
<ul class="nav nav-pills nav-stacked">
|
|
<t t-foreach="documentation" t-as="toc">
|
|
<li t-attf-class="tree_toggler #{ topic==toc and 'active' or ''}">
|
|
<a t-attf-href="/forum/how-to/#{ slug(toc) }" t-if="not toc.child_ids">
|
|
<t t-esc="toc.name"/>
|
|
</a>
|
|
<a t-attf-href="" t-if="toc.child_ids">
|
|
<t t-esc="toc.name"/>
|
|
</a>
|
|
<t t-if="toc.child_ids">
|
|
<t t-call="website_doc.side_panel"><t t-set="documentation" t-value="toc.child_ids"/></t>
|
|
</t>
|
|
</li>
|
|
</t>
|
|
</ul>
|
|
</template>
|
|
|
|
<!--TOC ON FORUM POST-->
|
|
<template id="forum_question_right_column" inherit_id="website_forum.header" name="Table of Content">
|
|
<xpath expr="//script[@src='/website_forum/static/src/js/website_forum.js']" position="after">
|
|
<script type="text/javascript" src="/website_doc/static/src/js/website_doc.js"/>
|
|
</xpath>
|
|
<xpath expr="//div[@id='about_forum']" position="before">
|
|
<div t-if="header.get('question_data')" groups="website_doc.group_documentaion_moderator">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading" id="about_forum">
|
|
<h3 class="panel-title">Documentation</h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
<form t-attf-action="/forum/#{ slug(forum) }/question/#{ slug(question) }/toc" role="form" method="post">
|
|
<div class="input-group navbar-right">
|
|
<select class="form-control" name="content">
|
|
<option value=""></option>
|
|
<t t-foreach="documentaion_toc or []" t-as="toc">
|
|
<option t-att-value="toc.id" t-att-selected="toc.id == question.toc_id.id"><t t-esc="toc.name"/></option>
|
|
</t>
|
|
</select>
|
|
<span class="input-group-btn">
|
|
<button class="btn btn-primary ">save</button>
|
|
</span>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
|
|
</data>
|
|
</openerp>
|