[MERGE] forward port of branch 8.0 up to 591e329
[odoo/odoo.git] / addons / website_forum / views / website_forum.xml
index abb5048..9ded2c9 100644 (file)
@@ -2,6 +2,32 @@
 <openerp>
     <data>
 
+<!-- Editor custom -->
+<template id="assets_editor" inherit_id="website.assets_editor" name="Forum Editor Assets" groups="base.group_user">
+    <xpath expr="." position="inside">
+        <script type="text/javascript" src="/website_forum/static/src/js/website_forum.editor.js"/>
+    </xpath>
+</template>
+
+<!-- Front-end custom css / js + ckeditor lib and customization -->
+<template id="assets_frontend" inherit_id="website.assets_frontend" name="Forum Assets">
+    <xpath expr="." position="inside">
+        <link rel='stylesheet' href="/web/static/lib/jquery.textext/jquery.textext.css"/>
+        <link rel='stylesheet' href='/website_forum/static/src/css/website_forum.css'/>
+        <script type="text/javascript" src="/website_forum/static/src/js/website_forum.js"/>
+        <script type="text/javascript" src="/web/static/lib/jquery.textext/jquery.textext.js"/>
+        <script type="text/javascript">
+            var CKEDITOR_BASEPATH = '/web/static/lib/ckeditor/';
+        </script>
+        <script type="text/javascript" src="/web/static/lib/ckeditor/ckeditor.js"></script>
+         <script type="text/javascript">
+                CKEDITOR.config.toolbar = [['Bold','Italic','Underline','Strike'],['NumberedList','BulletedList', 'Blockquote']
+                ,['Outdent','Indent','Link','Unlink','Image'],] ;
+        </script>
+
+    </xpath>
+</template>
+
 <!-- Layout add nav and footer -->
 <template id="header_footer_custom" inherit_id="website.footer_default"
     name="Footer Questions Link">
     </form>
 </template>
 
-<template id="assets_frontend" inherit_id="website.assets_frontend" name="website_forum assets">
-    <xpath expr="." position="inside">
-        <link rel='stylesheet' href="/web/static/lib/jquery.textext/jquery.textext.css"/>
-        <link rel='stylesheet' href='/website_forum/static/src/css/website_forum.css'/>
-        <script type="text/javascript" src="/web/static/lib/jquery.textext/jquery.textext.js"/>
         <script type="text/javascript" src="/web/static/lib/select2/select2.js"></script>
         <link rel="stylesheet" href="/web/static/lib/select2/select2.css"/>
         <link rel="stylesheet" href="/website/static/lib/select2-bootstrap-css/select2-bootstrap.css"/>
         <script type="text/javascript" src="/website_forum/static/src/js/website_forum.js"/>
-    </xpath>
-</template>
-
-<template id="assets_editor" inherit_id="website.assets_editor" name="Forum Editor" groups="base.group_user">
-    <xpath expr="." position="inside">
-        <script type="text/javascript" src="/website_forum/static/src/js/website.tour.forum.js"/>
-        <script type="text/javascript" src="/website_forum/static/src/js/website_forum.editor.js"/>
-    </xpath>
-</template>
-
 <!-- Page Index -->
 <template id="header" name="Forum Index">
     <t t-call="website.layout">
-        <t t-set="head">
-            <script type="text/javascript" src="/web/static/lib/ckeditor/ckeditor.js"/>
-            <script type="text/javascript">
-                CKEDITOR.config.toolbar = [['Bold','Italic','Underline','Strike'],['NumberedList','BulletedList', 'Blockquote']
-                ,['Outdent','Indent','Link','Unlink','Image'],] ;
-            </script>
-        </t>
+        <div t-if="is_public_user and not no_introduction_message" class="alert alert-success alert-dismissable">
+            <div class="container">
+                <h1 class="mt0">Welcome!</h1>
+                <div t-field="forum.description"/>
+                <a class='btn btn-primary' t-attf-href="/web?redirect=#{ request.httprequest.url }">Register</a>
+                <button type="button" class="btn btn-link js_close_intro" data-dismiss="alert" aria-hidden="true">Hide Intro</button>
+            </div>
+        </div>
         <div class="container mt16 website_forum">
             <div class="navbar navbar-default">
                 <div class="navbar-header">
                     <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#oe-help-navbar-collapse">
                         <span class="sr-only">Toggle navigation</span>
                         <span class="icon-bar"></span>
-                        <!-- <span class="icon-bar"></span> -->
                         <span class="icon-bar"></span>
                     </button>
                     <a class="navbar-brand" t-attf-href="/forum/#{slug(forum)}">
                 </div>
                 <div class="collapse navbar-collapse" id="oe-help-navbar-collapse">
                     <ul class="nav navbar-nav">
-                        <li t-att-class="filters in ('all', 'unanswered','followed','question','tag') and 'active' or '' ">
-                            <a t-attf-href="/forum/#{ slug(forum) }">Questions</a>
+                        <li t-att-class="sorting == 'relevancy desc' and 'active' or '' ">
+                            <a t-attf-href="/forum/#{ slug(forum) }?{{ keep_query( 'search', 'post_type', 'filters', sorting='relevancy desc') }}">Trending</a>
+                        </li>
+                        <li t-att-class="sorting == 'create_date desc' and 'active' or '' ">
+                            <a t-attf-href="/forum/#{ slug(forum) }?{{ keep_query( 'search', 'post_type', 'filters', sorting='create_date desc') }}">Newest</a>
                         </li>
                         <li t-att-class="searches.get('users') and 'active' or '' ">
                             <a t-attf-href="/forum/#{ slug(forum) }/users">People</a>
                         </li>
                     </ul>
                     <form class="navbar-form navbar-right" role="search" t-attf-action="/forum/#{ slug(forum) }" method="get">
-                        <div class="form-group">
-                            <input type="search" class="form-control"
-                                name="search" placeholder="Search a question..."
-                                t-att-value="search or ''"/>
-                            <button type="submit" class="btn btn-default">Search</button>
+                        <div class="input-group">
+                            <input type="search" class="form-control" name="search" t-att-value="search or ''"/>
+                            <span class="input-group-btn">
+                                <button type="submit" class="btn btn-default">Search</button>
+                            </span>
                         </div>
                     </form>
                 </div>
         </div>
 
         <div id="wrap" class="container">
-            <div class="row">
+            <div class="row mb16">
                 <div class="col-sm-9">
                     <div t-foreach="notifications or []" t-as="notification" class="alert alert-success alert-dismissable">
                         <button type="button" class="close notification_close" t-att-id="notification.id" data-dismiss="alert" aria-hidden="true">&amp;times;</button>
                     <t t-raw="0"/>
                 </div>
                 <div class="col-sm-3" id="right-column">
-                    <a t-if="not header.get('ask_hide')"
-                       t-attf-class="btn btn-primary btn-lg btn-block mb16 #{(user.karma &lt; forum.karma_ask) and 'karma_required' or ''}"
-                       t-attf-href="/forum/#{slug(forum)}/ask"
-                       t-attf-data-karma="#{forum.karma_ask}">Ask a Question</a>
+                    <div t-if="not header.get('ask_hide')" t-attf-class="btn-group btn-block mb16 #{(user.karma &lt; forum.karma_ask) and 'karma_required' or ''}" t-attf-data-karma="#{forum.karma_ask}">
+                        <a type="button" class="btn btn-primary btn-lg col-sm-10" t-attf-href="/forum/#{slug(forum)}/ask?post_type=#{forum.default_post_type}">
+                            <t t-if="forum.default_post_type == 'question'">Ask a Question</t>
+                            <t t-if="forum.default_post_type == 'link'">Submit a Link</t>
+                            <t t-if="forum.default_post_type == 'discussion'">New Discussion</t>
+                        </a>
+                        <button type="button" class="btn btn-primary btn-lg col-sm-2 dropdown-toggle" data-toggle="dropdown">
+                            <span class="caret"></span>
+                            <span class="sr-only">Select Post</span>
+                        </button>
+                        <ul class="dropdown-menu" role="menu">
+                            <li t-if="forum.allow_question"><a t-attf-href="/forum/#{slug(forum)}/ask?post_type=question">Ask a Question</a></li>
+                            <li t-if="forum.allow_link"><a t-attf-href="/forum/#{slug(forum)}/ask?post_type=link">Submit a Link</a></li>
+                            <li t-if="forum.allow_discussion"><a t-attf-href="/forum/#{slug(forum)}/ask?post_type=discussion">New Discussion</a></li>
+                        </ul>
+                    </div>
                     <div class="panel panel-default">
                         <div class="panel-heading">
                             <h3 class="panel-title">Keep Informed</h3>
                     </div>
                     <div class="panel panel-default" id="about_forum">
                         <div class="panel-heading">
-                            <h3 class="panel-title">About This Forum</h3>
+                            <h3 class="panel-title">About This Community</h3>
                         </div>
                         <div class="panel-body">
                             <t t-raw="forum.description"/>
 
 <!-- Display a post -->
 <template id="display_post">
-    <div class="question row">
-        <div class="col-md-2 hidden-xs text-center">
-            <div t-attf-class="box #{question.is_correct and 'oe_green' or 'oe_grey'} #{(question.child_count == 0) and 'text-muted' or ''}">
-                <span t-esc="question.child_count"/>
-                <div t-if="question.child_count&gt;1" class="subtitle">Answers</div>
-                <div t-if="question.child_count&lt;=1" class="subtitle">Answer</div>
-            </div>
+    <div class="question">
+        <div class="pull-left">
+            <t t-call="website_forum.vote">
+                <t t-set="post" t-value="question"/>
+            </t>
         </div>
-        <div class="col-md-10 clearfix">
+        <div class="question-block">
             <div class="question-name">
-                <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
-                    <span t-if="not question.active"><b> [Deleted]</b></span>
-                    <span t-if="question.state == 'close'"><b> [Closed]</b></span>
+                <t t-if="question.post_type == 'link'">
+                    <a t-att-href="question.content_link" t-raw="question.name" target="_blank"/>
+                </t>
+                <t t-if="question.post_type in ('question', 'discussion')">
+                    <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
+                </t>
+                <span t-if="not question.active"><b> [Deleted]</b></span>
+                <span t-if="question.state == 'close'"><b> [Closed]</b></span>
             </div>
             <t t-foreach="question.tag_ids" t-as="question_tag">
                 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{slug(question_tag)}/questions">
-                    <span t-attf-class="pull-right badge #{tag and tag.name == question_tag.name and 'badge-active' ''}" t-field="question_tag.name"
+                    <span t-attf-class="pull-right label #{tag and tag.name == question_tag.name and 'label-primary' or 'label-default'}" t-field="question_tag.name"
                         style="margin-right: 4px;"/>
                 </a>
             </t>
-            <div class="text-muted">
-                by <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
-                    t-field="question.create_uid" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
-                    style="display: inline-block;"/>
-                on <span t-field="question.write_date" t-field-options='{"format":"short"}'/>
-                <span class="visible-xs">
-                    <b t-esc="question.child_count or 0"/>
-                    <t t-if="question.child_count&gt;1">answers</t>
-                    <t t-if="question.child_count==1">answers</t>
-                </span>
-                with <b t-field="question.views"/> views
-                <span t-if="question.vote_count&gt;0"> and
-                    <b t-esc="question.vote_count or 0"/>
-                    <t t-if="question.vote_count&gt;1">votes</t>
-                    <t t-if="question.vote_count==1">vote</t>
-                </span>
-            </div>
+            <small class="text-muted">
+                By <span t-field="question.create_uid" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}' style="display: inline-block;"/>
+                • <span t-field="question.write_date" t-field-options='{"format":"short"}'/>
+                • <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }">
+                    <t t-esc="question.child_count"/>
+                    <t t-if="question.child_count&gt;1">comments</t>
+                    <t t-if="question.child_count&lt;=1">comment</t>
+                </a>
+            </small>
         </div>
     </div>
 </template>
 <!-- Display a post as an answer -->
 <template id="display_post_answer">
     <div class="clearfix">
-        <div t-attf-class="pull-left text-center mb16 box #{len(answer.vote_ids) and 'oe_green' or 'oe_grey'}">
+        <div t-attf-class="pull-left text-center mb16 #{len(answer.vote_ids) and 'oe_green' or 'oe_grey'}">
             <div t-esc="len(answer.vote_ids)"/>
         </div>
         <div class="question-name" style="margin-left: 32px;">
 <!-- Specific Forum Layout -->
 <template id="forum_index" name="Forum">
     <t t-call="website_forum.header">
-        <h1 class="page-header mt0">
-            <t t-esc="question_count"/> <span>Questions</span>
+        <h2 class="page-header mt0">
+            <t t-esc="question_count"/>
+                <span t-if="post_type not in ('link','question','discussion')">Posts</span>
+                <span t-if="post_type == 'question'">Questions</span>
+                <span t-if="post_type == 'link'">Links</span>
+                <span t-if="post_type == 'discussion'">Threads</span>
             <t t-esc="search"/>
             <small class="dropdown" t-if="filters in ('all', 'unanswered','followed', 'tag')">
               <a href="#" class="dropdown-toggle" data-toggle="dropdown">
-                  <t t-if="filters == 'all'">All</t>
                   <t t-if="filters == 'unanswered'">Unanswered</t>
                   <t t-if="filters == 'followed'">Followed</t>
                   <t t-if="tag"><span t-field="tag.name"/></t>
-                  <t t-if="sorting == 'date'"> by activity date</t>
-                  <t t-if="sorting == 'creation'"> by creation date</t>
-                  <t t-if="sorting == 'answered'"> by most answered</t>
-                  <t t-if="sorting == 'vote'"> by most voted</t>
+                  <t t-if="sorting == 'relevancy desc'"> by relevancy</t>
+                  <t t-if="sorting == 'write_date desc'"> by activity date</t>
+                  <t t-if="sorting == 'create_date desc'"> by newest</t>
+                  <t t-if="sorting == 'child_count desc'"> by most answered</t>
+                  <t t-if="sorting == 'vote_count desc'"> by most voted</t>
                   <b class="caret"/>
               </a>
               <ul class="dropdown-menu">
                   <li t-if="uid" t-att-class="filters == 'followed' and 'active' or '' ">
                       <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='followed')">Followed</a>
                   </li>
-                  <li class="dropdown-header">Tags</li>
+                  <li t-if="tag" class="dropdown-header">Tags</li>
                   <li t-if="tag" t-att-class="tag and 'active' or '' ">
                       <a href=""><t t-esc="tag.name"/></a>
                   </li>
                   <li class="dropdown-header">Sort by</li>
-                  <li t-att-class="sorting == 'date' and 'active' or '' ">
-                      <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='date')">Last activity date</a>
+                  <li t-att-class="sorting == 'relevancy desc' and 'active' or '' ">
+                      <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='relevancy desc')">Relevancy</a>
+                  </li>
+                  <li t-att-class="sorting == 'write_date desc' and 'active' or '' ">
+                      <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='write_date desc')">Last activity date</a>
                   </li>
-                  <li t-att-class="sorting == 'creation' and 'active' or '' ">
-                      <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='creation')">Newest</a>
+                  <li t-att-class="sorting == 'create_date desc' and 'active' or '' ">
+                      <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='create_date desc')">Newest</a>
                   </li>
-                  <li t-att-class="sorting == 'answered' and 'active' or '' ">
-                      <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='answered')">Most answered</a>
+                  <li t-att-class="sorting == 'child_count desc' and 'active' or '' ">
+                      <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='child_count desc')">Most answered</a>
                   </li>
-                  <li t-att-class="sorting == 'vote' and 'active' or '' ">
-                      <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='vote')">Most voted</a>
+                  <li t-att-class="sorting == 'vote_count desc' and 'active' or '' ">
+                      <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='vote_count desc')">Most voted</a>
                   </li>
               </ul>
             </small>
-        </h1>
+        </h2>
         <div t-foreach="question_ids" t-as="question" class="mb16">
             <t t-call="website_forum.display_post"/>
         </div>
     </t>
 </template>
 
+<!-- Edition: Post Article -->
+<template id="new_link">
+    <t t-call="website_forum.header">
+        <h1 class="mt0">Submit a Link</h1>
+        <p class="mb32">
+            Share an awesome link. Your post will appear in the 'Newest' top-menu.
+            If the community vote on your post, it will get traction by being promoted
+            in the homepage.
+        </p><p>
+            We keep a high level of quality in showcased posts, around 20% of the submited
+            posts will be featured.
+        </p>
+        <form t-attf-action="/forum/#{ slug(forum) }/new?post_type=link" method="post" role="form" class="tag_text form-horizontal">
+            <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
+            <div class="form-group">
+                <label class="col-sm-2 control-label" for="content_link">URL to Share</label>
+                <div class="col-sm-8">
+                    <input type="text" name="content_link" required="True" t-attf-value="#{post_name}"
+                        class="form-control mb16 link_url" placeholder="e.g. https://www.odoo.com"/>
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-2 control-label" for="post_name">Post Title</label>
+                <div class="col-sm-8">
+                    <input type="text" name="post_name" required="True" t-attf-value="#{content}"
+                        class="form-control"/>
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-2 control-label" for="post_tags">Tags</label>
+                <div class="col-sm-8">
+                    <input type="hidden" name="karma_retag" t-attf-value="#{forum.karma_retag}" id="karma_retag"/>
+                    <input type="text" name="post_tags" class="form-control js_select2"/>
+                </div>
+            </div>
+            <div class="form-group">
+                <div class="col-sm-offset-2 col-sm-8">
+                    <button class="btn btn-primary" disabled="True" id="btn_post_your_article">Post</button>
+                </div>
+            </div>
+        </form>
+    </t>
+</template>
+
+<!-- Edition: Post your Discussion Topic -->
+<template id="new_discussion">
+    <t t-call="website_forum.header">
+        <h1 class="mt0">New Topic</h1>
+        <p>
+            <b>Share</b> Something Awesome.
+        </p>
+        <form t-attf-action="/forum/#{slug(forum)}/new?post_type=discussion" method="post" role="form" class="tag_text">
+            <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
+                class="form-control mb16" placeholder="Your Discussion Title..."/>
+            <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
+            <textarea name="content" id="content" required="True" class="form-control load_editor">
+                <t t-esc="question_content"/>
+            </textarea>
+            <br/>
+            <input type="hidden" name="karma_retag" t-attf-value="#{forum.karma_retag}" id="karma_retag"/>
+            <input type="text" name="post_tags" placeholder="Tags" class="form-control js_select2"/>
+            <br/><br/>
+            <button class="btn btn-primary">Post Your Topic</button>
+        </form>
+    </t>
+</template>
+
 <!-- Edition: ask your question -->
-<template id="ask_question">
+<template id="new_question">
     <t t-call="website_forum.header">
-        <h1 class="mt0">Ask your Question</h1>
+        <h1 class="mt0">Ask Your Question</h1>
+        <p>
+            To improve your chance getting an answer:
+        </p>
         <ul>
-            <li> please, try to make your question interesting to others </li>
-            <li> provide enough details and, if possible, give an example </li>
-            <li> be clear and concise, avoid unnecessary introductions (Hi, ... Thanks...) </li>
+            <li>Set a clear, explicit and concise question title
+                (check
+                <a href="#" data-placement="top" data-toggle="popover" data-content="Inventory Date Problem, Task remaining hours, Can you help solve solve my tax computation problem in Canada?" title="Click to get bad question samples">bad examples</a>
+                and
+                <a href="#" data-placement="bottom" data-toggle="popover" data-content="How to create a physical inventory at an anterior date?, How is the 'remaining hours' field computed on tasks?, How to configure TPS and TVQ's canadian taxes?" title="Click to get good question titles">good examples</a>
+                ),
+            </li>
+            <li>Avoid unnecessary introductions (Hi,... Please... Thanks...),</li>
+            <li>Provide enough details and, if possible, give an example.</li>
         </ul>
-        <form t-attf-action="/forum/#{ slug(forum) }/question/new" method="post" role="form" class="tag_text">
-            <input type="text" name="question_name" required="True" t-attf-value="#{question_name}"
-                class="form-control" placeholder="Enter your Question"/>
-            <h5 class="mt20">Please enter a descriptive question (should finish with a '?')</h5>
+        <form t-attf-action="/forum/#{slug(forum)}/new?post_type=question" method="post" role="form" class="tag_text">
+            <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
+                class="form-control mb16" placeholder="Your Question Title..."/>
             <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
-            <input type="hidden" name="karma_retag" t-attf-value="#{forum.karma_retag}" id="karma_retag"/>
-            <textarea name="content" required="True" class="form-control load_editor">
+
+            <textarea name="content" required="True" id="content" class="form-control load_editor">
                 <t t-esc="question_content"/>
             </textarea>
             <br/>
-            <input type="hidden" name="tag_type" value="select2"/>
-            <input type="hidden" name="question_tags" placeholder="Tags" class="form-control js_select2"/>
-            <br/>
+            <input type="hidden" name="karma_retag" t-attf-value="#{forum.karma_retag}" id="karma_retag"/>
+            <input type="hidden" name="post_tags" placeholder="Tags" class="form-control js_select2"/>
+            <br/><br/>
             <button t-attf-class="btn btn-primary #{(user.karma &lt; forum.karma_ask) and 'karma_required' or ''}"
-                id="btn_ask_your_question" t-att-data-karma="forum.karma_ask">Post Your Question</button>
+                t-att-data-karma="forum.karma_ask">Post Your Question</button>
         </form>
-        <script type="text/javascript">
-            CKEDITOR.replace("content");
-        </script>
     </t>
 </template>
 
 <!-- Edition: edit a post -->
 <template id="edit_post">
     <t t-call="website_forum.header">
-        <h3 t-if="not is_answer">Edit question</h3>
-        <h3 t-if="is_answer">Edit answer</h3>
+        <h3 t-if="not is_answer">Edit <span t-field="post.post_type"/></h3>
+        <h3 t-if="is_answer">Edit reply</h3>
         <form t-attf-action="/forum/#{slug(forum)}/post/#{slug(post)}/save" method="post" role="form" class="tag_text">
             <div t-if="not is_answer">
-                <input type="text" name="question_name" id="question_name" required="True"
-                    t-attf-value="#{post.name}" class="form-control" placeholder="Edit your Question"/>
-                <h5 class="mt20">Please enter a descriptive question (should finish by a '?')</h5>
+                <input type="text" name="post_name" required="True"
+                    t-attf-value="#{post.name}" class="form-control mb8" placeholder="Edit your Post"/>
+                <h5 t-if="post.post_type == 'question'" class="mt20">Please enter a descriptive question (should finish by a '?')</h5>
             </div>
             <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
             <input type="hidden" name="karma_retag" t-attf-value="#{forum.karma_retag}" id="karma_retag"/>
-            <textarea name="content" required="True" class="form-control load_editor">
+            <textarea name="content" id="content" required="True" class="form-control load_editor">
                 <t t-esc="post.content"/>
             </textarea>
             <div t-if="not is_answer">
                 <br/>
-                <input type="hidden" name="tag_type" value="select2"/>
-                <input type="hidden" name="question_tag" class="form-control col-md-9 js_select2" placeholder="Tags" value="see data init value" t-attf-data-init-value="#{tags}"/>
+                <input type="hidden" name="karma_retag" t-attf-value="#{forum.karma_retag}" id="karma_retag"/>
+                <input type="text" name="post_tag" class="form-control col-md-9 js_select2" placeholder="Tags" t-attf-data-init-value="#{tags}"/>
                 <br/>
             </div>
             <button class="btn btn-primary btn-lg">Save</button>
         </form>
-        <script type="text/javascript">
-            CKEDITOR.replace("content");
-        </script>
     </t>
 </template>
 
-<!-- Moderation: close a question -->
-<template id="close_question">
+<!-- Moderation: close a post -->
+<template id="close_post">
     <t t-call="website_forum.header">
-        <h1 class="mt0">Close question</h1>
+        <h1 class="mt0">Close Post</h1>
         <p class="text-muted">
-            If you close this question, it will be hidden for most users. Only
-            users having a high karma can see closed questions to moderate
+            If you close this post, it will be hidden for most users. Only
+            users having a high karma can see closed posts to moderate
             them.
         </p>
         <form t-attf-action="/forum/#{ slug(forum) }/question/#{slug(question)}/close" method="post" role="form" class="form-horizontal mt32 mb64">
             <input name="post_id" t-att-value="question.id" type="hidden"/>
             <div class="form-group">
-                <label class="col-md-3 control-label" for="reason">Question:</label>
+                <label class="col-md-3 control-label" for="reason">Post:</label>
                 <div class="col-md-8 mt8">
                     <span t-field="question.name"/>
                 </div>
             </div>
             <div class="form-group">
                 <div class="col-md-offset-3 col-md-8">
-                    <button class="btn btn-primary">Close question</button>
+                    <button class="btn btn-primary">Close post</button>
                     <span class="text-muted">or</span>
-                    <a class="btn btn-link" t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }">back to question</a>
+                    <a class="btn btn-link" t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }">back to post</a>
                 </div>
             </div>
         </form>
     </t>
 </template>
 
+<!-- Edition: post a reply -->
+<template id="post_reply">
+    <div class="css_editable_mode_hidden">
+        <form t-attf-id="reply#{ object._name.replace('.','') + '-' + str(object.id) }" class="collapse oe_comment_grey"
+            t-attf-action="/forum/#{ slug(forum) }/#{slug(object)}/reply" method="post" role="form">
+            <h3 class="mt8">Your Reply</h3>
+            <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
+            <textarea name="content" t-attf-id="content-#{str(object.id)}" class="form-control load_editor" required="True"/>
+            <button class="btn btn-primary">Post Comment</button>
+        </form>
+    </div>
+</template>
+
 <!-- Edition: post an answer -->
 <template id="post_answer">
-    <h3 class="mt10">Your answer</h3>
-    <p>
+    <h3 class="mt8">Your Answer</h3>
+    <p t-if="question.post_type == 'question'">
         <b>Please try to give a substantial answer.</b> If you wanted to comment on the question or answer, just
         <b>use the commenting tool.</b> Please remember that you can always <b>revise your answers</b>
         - no need to answer the same question twice. Also, please <b>don't forget to vote</b>
         - it really helps to select the best questions and answers!
     </p>
-    <form t-attf-action="/forum/#{ slug(forum) }/post/#{slug(question)}/new" method="post" role="form">
+    <form t-attf-action="/forum/#{ slug(forum) }/#{slug(question)}/reply" method="post" role="form">
         <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
-        <textarea name="content" class="form-control load_editor" required="True"/>
+        <textarea name="content" t-attf-id="content-#{str(question.id)}" class="form-control load_editor" required="True"/>
         <button t-attf-class="btn btn-primary mt16 #{not question.can_answer and 'karma_required' or ''}"
-                id="btn_ask_your_question" t-att-data-karma="question.karma_answer">Post Your Answer</button>
+            t-att-data-karma="question.forum_id.karma_answer">Post Answer</button>
     </form>
-    <script type="text/javascript">
-        CKEDITOR.replace("content");
-    </script>
 </template>
 
 <template id="vote">
-    <div t-attf-class="box oe_grey">
-        <a t-attf-class="vote_up fa fa-thumbs-up no-decoration #{post.user_vote == 1 and 'text-success' or ''} #{((post.user_vote == 1 and not post.can_downvote) or not post.can_upvote) and 'karma_required' or ''}"
-            t-attf-data-karma="#{post.user_vote == 1 and post.karma_downvote or post.karma_upvote}"
+    <div class="vote text-center">
+        <a t-attf-class="vote_up fa fa-caret-up no-decoration #{post.user_vote == 1 and 'text-success' or ''} #{((post.user_vote == 1 and not post.can_downvote) or not post.can_upvote) and 'karma_required' or ''}"
+            t-attf-data-karma="#{post.user_vote == 1 and post.forum_id.karma_downvote or post.forum_id.karma_upvote}"
             t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/upvote"/>
-        <span id="vote_count" t-esc="post.vote_count"/>
-        <a t-attf-class="vote_down fa fa-thumbs-down no-decoration #{post.user_vote == -1 and 'text-warning' or ''} #{((post.user_vote == -1 and not post.can_upvote) or not post.can_downvote) and 'karma_required' or ''}"
-            t-attf-data-karma="#{post.user_vote == -1 and post.karma_upvote or post.karma_downvote}"
+        <div class="vote_count text-muted" t-esc="post.vote_count"/>
+        <a t-attf-class="vote_down fa fa-caret-down no-decoration #{post.user_vote == -1 and 'text-warning' or ''} #{((post.user_vote == -1 and not post.can_upvote) or not post.can_downvote) and 'karma_required' or ''}"
+            t-attf-data-karma="#{post.user_vote == -1 and post.forum_id.karma_upvote or post.forum_id.karma_downvote}"
             t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/downvote"/>
-        <div t-if="vote_count &gt; 1" class="subtitle">
-            votes
-        </div>
-        <div t-if="vote_count &lt; 2" class="subtitle">
-            vote
-        </div>
+        <t t-raw="0"/>
     </div>
 </template>
 
 <!-- Specific Post Layout -->
 <template id="post_description_full" name="Question Navigation">
     <t t-call="website_forum.header">
-        <div t-attf-class="row question #{not question.active and 'alert alert-danger' or ''}">
-            <div class="col-md-2 hidden-xs text-center">
+        <div t-attf-class="question">
+            <div class="pull-left">
                 <t t-call="website_forum.vote">
                     <t t-set="post" t-value="question"/>
+                    <div class="mt4">
+                        <a t-attf-data-href="/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
+                            t-attf-class="favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}"/>
+                    </div>
                 </t>
-                <div class="text-muted text-center">
-                    <span t-field="question.views"/> Views
-                </div>
-                <div class="mt4">
-                    <a t-attf-data-href="/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
-                        t-attf-class="favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}"/>
-                </div>
             </div>
-            <div class="col-md-10">
-                <h1 class="mt0">
-                    <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
+            <div t-attf-class="question-block #{not question.active and 'alert alert-danger' or ''}">
+                <h1 class="mt0 mb0">
+                    <t t-if="question.post_type == 'link'">
+                        <a t-att-href="question.content_link" t-raw="question.name"/>
+                    </t>
+                    <t t-if="question.post_type in ('question', 'discussion')">
+                        <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
+                    </t>
                     <span t-if="not question.active"><b> [Deleted]</b></span>
                     <span t-if="question.state == 'close'"><b> [Closed]</b></span>
                 </h1>
+                <div class="pull-right">
+                    <div class="text-right">
+                        <t t-foreach="question.tag_ids" t-as="tag">
+                            <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ tag.id }/questions" class="label label-default" t-field="tag.name"/>
+                        </t>
+                    </div>
+                </div>
+                <div class="text-muted mb16">
+                    By
+                    <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
+                        t-field="question.create_uid"
+                        t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
+                        style="display: inline-block;"/>
+                    on <span t-field="question.create_date" t-field-options='{"format":"short"}'/>
+                    • <span t-field="question.views"/> views
+                </div>
+
                 <div class="alert alert-info text-center" t-if="question.state == 'close'">
                     <p class="mt16">
-                        <b>The question has been closed<t t-if="question.closed_reason_id"> for reason: <i t-esc="question.closed_reason_id.name"/></t></b>
+                        <b>The <i t-field="question.post_type"/> has been closed<t t-if="question.closed_reason_id"> for reason: <i t-esc="question.closed_reason_id.name"/></t></b>
                     </p>
                     <t t-if="question.closed_uid">
                         <b>by <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.closed_uid.id }"
                         </t>
                     </div>
                 </div>
-                <t t-raw="question.content"/>
-                <div class="mt16 clearfix">
-                    <div class="pull-right">
-                        <div class="text-right">
-                            <t t-foreach="question.tag_ids" t-as="tag">
-                                <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ tag.id }/questions" class="badge" t-field="tag.name"/>
+                <div t-if="question.post_type != 'link' and question.create_uid.karma &gt;= forum.karma_dofollow"><span t-field="question.content" class="oe_no_empty"/></div>
+                <div t-if="question.post_type != 'link' and question.create_uid.karma &lt; forum.karma_dofollow"><span t-field="question.content" class="oe_no_empty" t-field-options='{"nofollow": 1}'/></div>
+
+                <div class="clearfix">
+                    <ul class="pull-right list-inline mb0" id="options">
+                        <li t-if="question.state != 'close'">
+                            <t t-call="website_forum.link_button">
+                                <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/ask_for_close'"/>
+                                <t t-set="label" t-value="'Close'"/>
+                                <t t-set="classes" t-value="'fa-times'"/>
+                                <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
                             </t>
-                        </div>
-                        <ul class="list-inline" id="options">
-                            <li>
-                                <a style="cursor: pointer" t-att-data-toggle="question.can_comment and 'collapse' or ''"
-                                    t-attf-class="fa fa-comment-o #{not question.can_comment and 'karma_required text-muted' or ''}"
-                                    t-attf-data-karma="#{not question.can_comment and question.karma_comment or 0}"
-                                    t-attf-data-target="#comment#{ question._name.replace('.','') + '-' + str(question.id) }">
-                                    Comment
-                                </a>
-                            </li>
-                            <li t-if="question.state != 'close'">
-                                <t t-call="website_forum.link_button">
-                                    <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/ask_for_close'"/>
-                                    <t t-set="label" t-value="'Close'"/>
-                                    <t t-set="classes" t-value="'fa-times'"/>
-                                    <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
-                                </t>
-                            </li>
-                            <li t-if="question.state == 'close'">
-                                <t t-call="website_forum.link_button">
-                                    <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/reopen'"/>
-                                    <t t-set="label" t-value="'Reopen'"/>
-                                    <t t-set="classes" t-value="'fa-undo'"/>
-                                    <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
-                                </t>
-                            </li>
-                            <li>
-                                <t t-call="website_forum.link_button">
-                                    <t t-set="url" t-value="'/forum/' + slug(forum) +'/post/' + slug(question) + '/edition'"/>
-                                    <t t-set="label" t-value="'Edit'"/>
-                                    <t t-set="classes" t-value="'fa-edit'"/>
-                                    <t t-set="karma" t-value="not question.can_edit and question.karma_edit or 0"/>
-                                </t>
-                            </li>
-                            <li t-if="question.active">
-                                <t t-call="website_forum.link_button">
-                                    <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/delete'"/>
-                                    <t t-set="label" t-value="'Delete'"/>
-                                    <t t-set="classes" t-value="'fa-trash-o'"/>
-                                    <t t-set="karma" t-value="not question.can_unlink and question.karma_unlink or 0"/>
-                                </t>
-                            </li>
-                            <li t-if="not question.active">
-                                <t t-call="website_forum.link_button">
-                                    <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/undelete'"/>
-                                    <t t-set="label" t-value="'Undelete'"/>
-                                    <t t-set="classes" t-value="'fa-trash-o'"/>
-                                    <t t-set="karma" t-value="not question.can_unlink and question.karma_unlink or 0"/>
-                                </t>
-                            </li>
-                        </ul>
-                    </div>
-                    <div>
-                        <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{question.create_uid.id}/avatar"/>
-                        <div>
-                            <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
-                                t-field="question.create_uid"
-                                t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
-                                style="display: inline-block;"/>
-                            <div t-field="question.create_uid" t-field-options='{"widget": "contact", "badges": true, "fields": ["karma"]}'/>
-                            <span class="text-muted">Asked on <span t-field="question.create_date" t-field-options='{"format":"short"}'/></span>
-                        </div>
-                    </div>
-                    <div class="visible-xs text-center">
-                        <t t-call="website_forum.vote">
-                            <t t-set="post" t-value="question"/>
-                        </t>
-                        <div class="text-muted text-center">
-                            <span t-field="question.views"/> Views
-                        </div>
-                        <div class="mt4">
-                            <a t-attf-data-href="/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
-                                t-attf-class="favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}"/>
-                        </div>
-                    </div>
+                        </li>
+                        <li t-if="question.state == 'close'">
+                            <t t-call="website_forum.link_button">
+                                <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/reopen'"/>
+                                <t t-set="label" t-value="'Reopen'"/>
+                                <t t-set="classes" t-value="'fa-undo'"/>
+                                <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
+                            </t>
+                        </li>
+                        <li>
+                            <t t-call="website_forum.link_button">
+                                <t t-set="url" t-value="'/forum/' + slug(forum) +'/post/' + slug(question) + '/edit'"/>
+                                <t t-set="label" t-value="'Edit'"/>
+                                <t t-set="classes" t-value="'fa-edit'"/>
+                                <t t-set="karma" t-value="not question.can_edit and question.karma_edit or 0"/>
+                            </t>
+                        </li>
+                        <li t-if="question.active">
+                            <t t-call="website_forum.link_button">
+                                <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/delete'"/>
+                                <t t-set="label" t-value="'Delete'"/>
+                                <t t-set="classes" t-value="'fa-trash-o'"/>
+                                <t t-set="karma" t-value="not question.can_unlink and question.karma_unlink or 0"/>
+                            </t>
+                        </li>
+                        <li t-if="not question.active">
+                            <t t-call="website_forum.link_button">
+                                <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/undelete'"/>
+                                <t t-set="label" t-value="'Undelete'"/>
+                                <t t-set="classes" t-value="'fa-trash-o'"/>
+                                <t t-set="karma" t-value="not question.can_unlink and question.karma_unlink or 0"/>
+                            </t>
+                        </li>
+                    </ul>
+                    <ul class="list-inline mb0">
+                        <li t-if="question.post_type == 'question'">
+                            <a style="cursor: pointer" t-att-data-toggle="question.can_comment and 'collapse' or ''"
+                                t-attf-class="fa fa-comment-o #{not question.can_comment and 'karma_required text-muted' or ''}"
+                                t-attf-data-karma="#{not question.can_comment and question.karma_comment or 0}"
+                                t-attf-data-target="#comment#{ question._name.replace('.','') + '-' + str(question.id) }">
+                                Comment
+                            </a>
+                        </li>
+                    </ul>
                 </div>
+
                 <t t-call="website_forum.post_comment">
                     <t t-set="object" t-value="question"/>
                 </t>
             </div>
         </div>
-        <hr/>
-
-        <div t-foreach="question.child_ids" t-as="answer" class="mt16 mb32">
-            <a t-attf-id="answer-#{str(answer.id)}"/>
-            <div t-attf-class="forum_answer row" t-attf-id="answer_#{answer.id}" >
-                <div class="col-md-2 hidden-xs text-center">
-                    <t t-call="website_forum.vote">
-                        <t t-set="post" t-value="answer"/>
-                    </t>
-                    <div class="text-muted mt8">
-                        <a t-attf-class="accept_answer fa fa-2x fa-check-circle no-decoration #{answer.is_correct and 'oe_answer_true' or 'oe_answer_false'} #{not answer.can_accept and 'karma_required' or ''}"
-                            t-attf-data-karma="#{answer.karma_accept}"
-                            t-attf-data-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
-                    </div>
-                </div>
-                <div class="col-md-10 clearfix">
-                    <t t-raw="answer.content"/>
-                    <div class="mt16">
-                        <ul class="list-inline pull-right">
-                            <li>
-                                <a t-attf-class="fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
-                                    t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
-                                    style="cursor: pointer" t-att-data-toggle="answer.can_comment and 'collapse' or ''"
-                                    t-attf-data-target="#comment#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Comment
-                                </a>
-                            </li>
-                            <li>
-                                <t t-call="website_forum.link_button">
-                                    <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/edit'"/>
-                                    <t t-set="label" t-value="'Edit'"/>
-                                    <t t-set="classes" t-value="'fa fa-edit'"/>
-                                    <t t-set="karma" t-value="not answer.can_edit and answer.karma_edit or 0"/>
-                                </t>
-                            </li>
-                            <li>
-                                <t t-call="website_forum.link_button">
-                                    <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/delete'"/>
-                                    <t t-set="label" t-value="'Delete'"/>
-                                    <t t-set="classes" t-value="'fa-trash-o'"/>
-                                    <t t-set="karma" t-value="not answer.can_unlink and answer.karma_unlink or 0"/>
-                                </t>
-                            </li>
-                            <li>
-                                <t t-call="website_forum.link_button">
-                                    <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/convert_to_comment'"/>
-                                    <t t-set="label" t-value="'Convert as a comment'"/>
-                                    <t t-set="classes" t-value="'fa-magic'"/>
-                                    <t t-set="karma" t-value="not answer.can_comment_convert and answer.karma_comment_convert or 0"/>
-                                </t>
-                            </li>
-                        </ul>
-                        <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{answer.create_uid.id}/avatar"/>
-                        <div>
-                            <a t-attf-href="/forum/#{ slug(forum) }/user/#{ answer.create_uid.id }"
-                                t-field="answer.create_uid"
-                                t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
-                                style="display: inline-block;"/>
-                            <div t-field="answer.create_uid" t-field-options='{"widget": "contact", "badges": true, "fields": ["karma"]}'/>
-                            <span class="text-muted">Answered on <span t-field="answer.create_date" t-field-options='{"format":"short"}'/></span>
-                        </div>
-                        <div class="visible-xs text-center">
-                            <t t-call="website_forum.vote">
-                                <t t-set="post" t-value="answer"/>
-                            </t>
-                            <div class="text-muted mt8">
-                                <a t-attf-class="accept_answer fa fa-2x fa-check-circle no-decoration #{answer.is_correct and 'oe_answer_true' or 'oe_answer_false'} #{not answer.can_accept and 'karma_required' or ''}"
-                                    t-attf-data-karma="#{answer.karma_accept}"
-                                    t-attf-data-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
-                            </div>
-                        </div>
-                    </div>
-                    <t t-call="website_forum.post_comment">
-                        <t t-set="object" t-value="answer"/>
-                    </t>
-                </div>
-            </div>
+        <div t-foreach="question.child_ids" t-as="post_answer" class="mt16 mb32">
+            <hr class="mb4 mt4"/>
+            <t t-call="website_forum.post_answers">
+                <t t-set="answer" t-value="post_answer"/>
+            </t>
         </div>
-        <div t-if="not question.uid_has_answered">
+        <div t-if="question.post_type != 'question' or question.post_type == 'question' and not question.uid_has_answered and question.state != 'close' and question.active != False">
             <t t-call="website_forum.post_answer"/>
         </div>
-        <div t-if="question.uid_has_answered" class="mb16">
+        <div t-if="question.post_type == 'question' and question.uid_has_answered" class="mb16">
             <a class="btn btn-primary" t-attf-href="/forum/#{slug(forum)}/question/#{slug(question)}/edit_answer">Edit Your Previous Answer</a>
             <span class="text-muted">(only one answer per question is allowed)</span>
         </div>
     </t>
 </template>
 
+<template id="post_answers">
+    <a t-attf-id="answer-#{str(answer.id)}"/>
+    <div t-attf-class="forum_answer" t-attf-id="answer_#{answer.id}" >
+        <div class="pull-left">
+            <t t-call="website_forum.vote">
+                <t t-set="post" t-value="answer"/>
+                <div t-if="question.post_type == 'question'" class="mt4">
+                    <a t-attf-class="accept_answer fa fa-2x fa-check-circle no-decoration #{answer.is_correct and 'oe_answer_true' or 'oe_answer_false'} #{not answer.can_accept and 'karma_required' or ''}"
+                        t-attf-data-karma="#{answer.karma_accept}"
+                        t-attf-data-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
+                </div>
+            </t>
+        </div>
+        <div class="question-block">
+            <div class="pull-right author-box">
+                <img class="pull-left img img-rounded img-avatar" t-attf-src="/forum/user/#{user.id}/avatar"/>
+                <a t-attf-href="/forum/#{ slug(forum) }/user/#{ answer.create_uid.id }"
+                    t-field="answer.create_uid"
+                    t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
+                    style="display: inline-block;"/>
+                <div class="text-muted">On <span t-field="answer.create_date" t-field-options='{"format":"short"}'/></div>
+            </div>
+            <div class="clearfix" t-if="answer.create_uid.karma &gt;= forum.karma_dofollow"><span t-field="answer.content" class="oe_no_empty"/></div>
+            <div class="clearfix" t-if="answer.create_uid.karma &lt; forum.karma_dofollow"><span t-field="answer.content" class="oe_no_empty" t-field-options='{"nofollow": 1}'/></div>
+            <div class="clearfix">
+                <ul class="list-inline pull-right mb0">
+                    <li>
+                        <t t-call="website_forum.link_button">
+                            <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/edit'"/>
+                            <t t-set="label" t-value="'Edit'"/>
+                            <t t-set="classes" t-value="'fa fa-edit'"/>
+                            <t t-set="karma" t-value="not answer.can_edit and answer.karma_edit or 0"/>
+                        </t>
+                    </li>
+                    <li>
+                        <t t-call="website_forum.link_button">
+                            <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/delete'"/>
+                            <t t-set="label" t-value="'Delete'"/>
+                            <t t-set="classes" t-value="'fa-trash-o'"/>
+                            <t t-set="karma" t-value="not answer.can_unlink and answer.karma_unlink or 0"/>
+                        </t>
+                    </li>
+                    <li t-if="question.post_type == 'question'">
+                        <t t-call="website_forum.link_button">
+                            <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/convert_to_comment'"/>
+                            <t t-set="label" t-value="'Convert as a comment'"/>
+                            <t t-set="classes" t-value="'fa-magic'"/>
+                            <t t-set="karma" t-value="not answer.can_comment_convert and answer.karma_comment_convert or 0"/>
+                        </t>
+                    </li>
+                </ul>
+                <ul class="list-inline mb0">
+                    <li t-if="question.post_type == 'question'">
+                        <a t-attf-class="fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
+                            t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
+                            style="cursor: pointer" t-att-data-toggle="answer.can_comment and 'collapse' or ''"
+                            t-attf-data-target="#comment#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Comment
+                        </a>
+                    </li>
+                    <li t-if="question.post_type != 'question'">
+                        <a t-attf-class="fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
+                            t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
+                            style="cursor: pointer" data-toggle="collapse"
+                            t-attf-data-target="#reply#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Reply
+                        </a>
+                    </li>
+                </ul>
+
+            </div>
+            <hr class="mt4 mb4"/>
+
+            <t t-if="answer.post_type == 'question'" t-call="website_forum.post_comment">
+                <t t-set="object" t-value="answer"/>
+            </t>
+            <div t-if="answer.post_type != 'question' and question.state != 'close' and question.active != False">
+                <t t-call="website_forum.post_reply">
+                    <t t-set="object" t-value="answer"/>
+                </t>
+            </div>
+            <div t-foreach="answer.child_ids" t-as="child_answer" class="mt4 mb4">
+                <t t-call="website_forum.post_answers">
+                    <t t-set="answer" t-value="child_answer"/>
+                </t>
+            </div>
+        </div>
+    </div>
+</template>
+
 <!-- Utility template: Post a Comment -->
 <template id="post_comment">
     <div class="row clearfix">
                         <t t-set="classes" t-value="'close comment_delete fa-times'"/>
                     </t>
 
-                    <span t-field="message.body"/>
+                    <div t-if="message.create_uid.karma &gt;= forum.karma_dofollow"><span t-field="message.body" class="oe_no_empty"/></div>
+                    <div t-if="message.create_uid.karma &lt; forum.karma_dofollow"><span t-field="message.body" class="oe_no_empty" t-field-options='{"nofollow": 1}'/></div>
                     <t t-set="required_karma" t-value="message.author_id.id == user.partner_id.id and object.forum_id.karma_comment_convert_own or object.forum_id.karma_comment_convert_all"/>
-                    <t t-call="website_forum.link_button">
-                        <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(object) + '/comment/' + slug(message) + '/convert_to_answer'"/>
-                        <t t-set="label" t-value="'Convert as an answer'"/>
-                        <t t-set="karma" t-value="user.karma&lt;required_karma and required_karma or 0"/>
-                        <t t-set="classes" t-value="'fa-magic pull-right'"/>
+                    <t t-if="(object.parent_id and object.parent_id.state != 'close' and object.parent_id.active != False) or (not object.parent_id and object.state != 'close' and object.active != False)">
+                        <t t-set="allow_post_comment" t-value="True" />
+                    </t>
+                    <t t-if="allow_post_comment">
+                        <t t-call="website_forum.link_button" >
+                            <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(object) + '/comment/' + slug(message) + '/convert_to_answer'"/>
+                            <t t-set="label" t-value="'Convert as an answer'"/>
+                            <t t-set="karma" t-value="user.karma&lt;required_karma and required_karma or 0"/>
+                            <t t-set="classes" t-value="'fa-magic pull-right'"/>
+                        </t>
                     </t>
                     <a t-attf-href="/forum/#{slug(forum)}/partner/#{message.author_id.id}"
                         t-field="message.author_id" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
         </p>
         <div class="row">
             <div class="col-sm-3 mt16" t-foreach="tags" t-as="tag">
-                <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ slug(tag) }/questions?{{ keep_query( filters='tag') }}" class="badge">
+                <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ slug(tag) }/questions?{{ keep_query( filters='tag') }}" class="label label-default">
                     <span t-field="tag.name"/>
                 </a>
                 <span>
                 </tr>
                 </table>
                 <div class="well well-sm">
-                    <span t-field="user.partner_id.website_description" class="oe_no_empty"/>
+                    <div t-if="user.karma &gt;= forum.karma_dofollow"><span t-field="user.partner_id.website_description" class="oe_no_empty"/></div>
+                    <div t-if="user.karma &lt; forum.karma_dofollow"><span t-field="user.partner_id.website_description" class="oe_no_empty" t-field-options='{"nofollow": 1}'/></div>
                     <t t-if="uid == user.id">
                         <a class="fa fa-arrow-right" t-attf-href="/forum/#{slug(forum)}/user/#{slug(user)}/edit"> Edit Your Bio</a>
                     </t>