[IMP] better views

bzr revid: fp@tinyerp.com-20140303191748-y7c6zcy7r6riy1fq
This commit is contained in:
Fabien Pinckaers 2014-03-03 20:17:48 +01:00
parent 13a4923a10
commit ad66572645
7 changed files with 223 additions and 270 deletions

View File

@ -65,12 +65,6 @@ class website_forum(http.Controller):
question_ids = forum_obj.browse(cr, uid, obj_ids, context=context)
#If dose not get any related question then redirect to ask question form.
if search and not question_ids:
values = {
'question_name': search,
}
return request.website.render("website_forum.ask_question", values)
values = {
'total_questions': question_count,
'question_ids': question_ids,
@ -80,6 +74,13 @@ class website_forum(http.Controller):
return request.website.render("website_forum.index", values)
@http.route(['/forum/ask'], type='http', auth="public", website=True, multilang=True)
def question_ask(self, **post):
values = {
'searches': {}
}
return request.website.render("website_forum.ask_question", values)
@http.route(['/forum/question/<model("website.forum.post"):question>/page/<page:page>'], type='http', auth="public", website=True, multilang=True)
def question(self, question, page, **post):
values = {
@ -178,25 +179,16 @@ class website_forum(http.Controller):
return request.website.render("website_forum.index", values)
@http.route(['/forum/tags', '/forum/tags/page/<int:page>'], type='http', auth="public", website=True, multilang=True)
@http.route(['/forum/tags'], type='http', auth="public", website=True, multilang=True)
def tags(self, page=1, **searches):
cr, uid, context = request.cr, request.uid, request.context
tag_obj = request.registry['website.forum.tag']
step = 30
tag_count = tag_obj.search(cr, uid, [], count=True, context=context)
pager = request.website.pager(url="/forum/tags/", total=tag_count, page=page, step=step, scope=30)
obj_ids = tag_obj.search(cr, uid, [], limit=step, offset=pager['offset'], context=context)
obj_ids = tag_obj.search(cr, uid, [], limit=None, context=context)
tags = tag_obj.browse(cr, uid, obj_ids, context=context)
searches['tags'] = 'True'
values = {
'tags': tags,
'pager': pager,
'searches': searches,
'searches': {}
}
return request.website.render("website_forum.tag", values)
@http.route(['/forum/users', '/forum/users/page/<int:page>'], type='http', auth="public", website=True, multilang=True)

View File

@ -3,7 +3,7 @@
<data noupdate="1">
<record id="menu_questions" model="website.menu">
<field name="name">Support</field>
<field name="name">Forum</field>
<field name="url">/forum</field>
<field name="parent_id" ref="website.main_menu"/>
<field name="sequence" type="int">40</field>

View File

@ -3,58 +3,73 @@
<data>
<!-- Tag -->
<record id="forum_help" model="website.forum">
<field name="name">Help</field>
</record>
<record id="tags_0" model="website.forum.tag">
<field name="name">Contract</field>
<field name="forum_id" ref="website_forum.forum_help"/>
</record>
<record id="tags_1" model="website.forum.tag">
<field name="name">e-mail</field>
<field name="forum_id" ref="website_forum.forum_help"/>
</record>
<record id="tags_2" model="website.forum.tag">
<field name="name">Csv</field>
<field name="forum_id" ref="website_forum.forum_help"/>
</record>
<record id="tags_3" model="website.forum.tag">
<field name="name">Action</field>
<field name="forum_id" ref="website_forum.forum_help"/>
</record>
<record id="tags_4" model="website.forum.tag">
<field name="name">Alert</field>
<field name="forum_id" ref="website_forum.forum_help"/>
</record>
<record id="tags_5" model="website.forum.tag">
<field name="name">POS</field>
<field name="forum_id" ref="website_forum.forum_help"/>
</record>
<record id="tags_6" model="website.forum.tag">
<field name="name">Menu</field>
<field name="forum_id" ref="website_forum.forum_help"/>
</record>
<record id="question_0" model="website.forum.post">
<field name="name">How to configure alerts for employee contract expiration.</field>
<field name="views">45</field>
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="views">5</field>
<field name="tags" eval="[(4,ref('website_forum.tags_0')),(4,ref('website_forum.tags_3')),(4,ref('website_forum.tags_4'))]"/>
</record>
<record id="question_1" model="website.forum.post">
<field name="name">How to get translated state through browse ?</field>
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">Hello everybody,
I use a XML-RPC to access to invoices, I want to get the states of invoices, but always I get paid instead of Payé (French)</field>
<field name="views">45</field>
<field name="views">4</field>
</record>
<record id="question_2" model="website.forum.post">
<field name="name">Restrain the user from confirming the Purchase requisition</field>
<field name="views">45</field>
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="views">122</field>
<field name="content">Can anybody tell me how to restrict the user from confirming the purchase requisition? In my case when a user is creating a purchase requisition than the user after saving it is able to send it to the supplier rather I want the user to just generate the purchase requisition and let the manager do the remaining works like sending the purchase requisition to the supplier and than receiving the goods. Please help me out. Thanks in advance.</field>
<field name="tags" eval="[(4,ref('website_forum.tags_5'))]"/>
</record>
<record id="question_4" model="website.forum.post">
<field name="name">Offline installing for add-ons</field>
<field name="views">45</field>
<field name="views">32</field>
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">How can I install web based addons without Internet connections (I'm using OpenERP over LAN)?
P.S.
@ -65,7 +80,8 @@ BTW, I left OpenERP since ver. 6.x to use PostBooks instead but I recently decid
<record id="question_5" model="website.forum.post">
<field name="name">CMS replacement for ERP and eCommerce</field>
<field name="views">45</field>
<field name="views">23</field>
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">I use Wordpress as a CMS and eCommerce platform. The developing in Wordpress is too easy and solid but it missing ERP feature (there is single plugin to integrate with Frontaccounting) so I wonder:
Can I use OpenERP as a replacement CMS of Wordpress + eCommerce plugin?
@ -75,7 +91,8 @@ In simple words does OpenERP became CMS+ERP platform?</field>
<record id="question_6" model="website.forum.post">
<field name="name">Register payment using XMLRPC</field>
<field name="views">45</field>
<field name="views">15</field>
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">Hi there,
I have been trying to register an invoice payment through OpenERP. I have been able to manually create and approve the invoice, the voucher and its line
@ -85,7 +102,8 @@ I'm currently creating the voucher using this information:</field>
<record id="question_7" model="website.forum.post">
<field name="name">Create one field on two modules</field>
<field name="views">45</field>
<field name="views">12</field>
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">Hello,
I shall like creating a field "x" on an order form ( stock.picking.form ) and to reveal it also on the delivery slip ( stock.picking.form ).
@ -95,46 +113,53 @@ Thank you in advance</field>
<record id="question_8" model="website.forum.post">
<field name="name">access rights to one2many field</field>
<field name="views">45</field>
<field name="views">1</field>
<field name="content">Now i create new group , assign user and access right as READ &amp; CREATE to object stock.picking.ads but nothing is reflected , iam able to delete and write which should not happen. Very Strange!!!</field>
<field name="forum_id" ref="website_forum.forum_help"/>
</record>
<record id="question_9" model="website.forum.post">
<field name="name">how to import csv into customer database</field>
<field name="views">45</field>
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="views">5</field>
<field name="content">hi, how to import csv into customer database? Thanks</field>
<field name="tags" eval="[(4,ref('website_forum.tags_2'))]"/>
</record>
<record id="question_10" model="website.forum.post">
<field name="name">send mails not receiving properly</field>
<field name="views">45</field>
<field name="views">4</field>
<field name="content">Hi, The options for sending mails have been enabled in openerp.
There are options to send the invoice,sales order,
quotations etc by the email.But the issue is even after the button 'Send By Email' is clicked,
the email is not received to the recipients .Those emails are stored in the Archives under the Messaging window.How to configure incoming and outgoing mails in openerp</field>
<field name="tags" eval="[(4,ref('website_forum.tags_1'))]"/>
<field name="forum_id" ref="website_forum.forum_help"/>
</record>
<record id="question_11" model="website.forum.post">
<field name="name">How to refresh weight of stock move lines after product weight update?</field>
<field name="views">45</field>
<field name="views">56</field>
<field name="forum_id" ref="website_forum.forum_help"/>
</record>
<record id="question_12" model="website.forum.post">
<field name="name">Update new module v7.0 Ubuntu 12.04</field>
<field name="views">45</field>
<field name="views">87</field>
<field name="forum_id" ref="website_forum.forum_help"/>
</record>
<record id="question_13" model="website.forum.post">
<field name="name">Can view top menu In openerp 7.0. (black taskbar at top of window???)</field>
<field name="views">45</field>
<field name="tags" eval="[(4,ref('website_forum.tags_6'))]"/>
<field name="forum_id" ref="website_forum.forum_help"/>
</record>
<!-- Answer -->
<record id="answer_0" model="website.forum.post">
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">Just for posterity so other can see. Here are the steps to set automatic alerts on any contract.. i.e. HR Employee, or Fleet for example. I will use fleet as an example.
Step 1. As a user who has access rights to Technical Features, go to Settings --> Automated Actions. Create A new Automated Action. For the Related Document Model choose.. Contract information on a vehicle (you can also type in the actual model name.. fleet.vehicle.log.contract ) . Set the trigger date to ... Contract Expiration Date.
The Next Field (Delay After Trigger Date) is a bit ridiculous. Who wants to be reminded of a contract expiration AFTER the fact? The field should say Days Before Date to Fire Action and the number should be converted to a negative. IMHO. Any way... to get a workable solution you must enter in the number in the negative. So for instance like me if you want to be warned 35 days BEFORE the expiration... put in Delay After Trigger Date.. the number -35 But the sake of testing, right now just put in -1 for 1 day before. Save the Action.
@ -147,6 +172,7 @@ Thank you in advance</field>
</record>
<record id="answer_1" model="website.forum.post">
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content"> Hello everybody,
I use a XML-RPC to access to invoices, I want to get the states of invoices, but always I get paid instead of Payé (French)
I use administrator to connect to the databse, he has as lang = 'fr_FR'
@ -167,6 +193,7 @@ Thank you in advance</field>
</record>
<record id="answer_4" model="website.forum.post">
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">Yes you could download the module from internet on another
computer and unzip the file on the ERP server.
Then you have to activate the module, see the tutorial on acespritechblog.wordpress.com (sorry I cannot post the full link)
@ -175,6 +202,7 @@ Thank you in advance</field>
</record>
<record id="answer_5" model="website.forum.post">
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">OpenERP v8 (next release) provides a web module and an e-commerce module: www.openerp.com/website_cms
The CMS editor in OpernERP web is nice but I prefer drupal for customization and there is a drupal module for OpenERP. I think WP is better than OpenERP web too.
</field>
@ -182,6 +210,7 @@ Thank you in advance</field>
</record>
<record id="answer_6_0" model="website.forum.post">
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">
no need to inherit account.voucher. after creating the account.voucher record, you just add this in your XMLRPC script.
@ -194,6 +223,7 @@ Thank you in advance</field>
</record>
<record id="answer_6_1" model="website.forum.post">
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">
I had the same issue and in my case I needed to remove the field "move_id" from account.voucher and adding the field "move_line_id" to account.voucher.line, have you tried that?
@ -209,6 +239,7 @@ Thank you in advance</field>
</record>
<record id="answer_9" model="website.forum.post">
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">
Step 1: First make sure the CRM module is installed. If it isnt then you can click on the CRM module in the applications view.
@ -231,6 +262,7 @@ Thank you in advance</field>
</record>
<record id="answer_10" model="website.forum.post">
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">
Hello,
Email outgoing server can be configured in: Settings >> General Settings >> Email >> Outgoing mail server.
@ -243,6 +275,7 @@ Thank you in advance</field>
</record>
<record id="answer_13_0" model="website.forum.post">
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">
also settings-> update moduel list? can find this anywhere??
</field>
@ -250,6 +283,7 @@ Thank you in advance</field>
</record>
<record id="answer_13_1" model="website.forum.post">
<field name="forum_id" ref="website_forum.forum_help"/>
<field name="content">
Give your admin user the technical features right and you will be able to see more options in the settings menu. (use a refresh)
</field>

View File

@ -30,17 +30,13 @@ from openerp.addons.website.models.website import slug
#TODO: Do we need a forum object like blog object ? Need to check with BE team
class Forum(osv.Model):
_name = 'website.forum'
_description = 'Blogs'
_description = 'Forums'
_inherit = ['mail.thread', 'website.seo.metadata']
_order = 'name'
_columnss = {
'name': fields.char('Name', required=True),
'description': fields.text('Description'),
'forum_post_ids': fields.one2many(
'website.forum.post', 'forum_id',
'Posts',
),
'name': fields.char('Name', required=True, translate=True),
'faq': fields.html('FAQ'),
'right_column': fields.html('FAQ'),
}
class Post(osv.Model):
@ -49,11 +45,9 @@ class Post(osv.Model):
_inherit = ['mail.thread', 'website.seo.metadata']
_columns = {
'forum_id': fields.many2one('website.forum', 'Forum'),
'forum_id': fields.many2one('website.forum', 'Forum', required=True),
'name': fields.char('Topic', size=64),
'content': fields.text('Contents', help='contents'),
'create_date': fields.datetime('Asked on', select=True, readonly=True),
'create_uid': fields.many2one('res.users', 'Asked by', select=True, readonly=True ),
'write_date': fields.datetime('Update on', select=True, readonly=True ),
@ -119,20 +113,16 @@ class Post(osv.Model):
class Users(osv.Model):
_inherit = 'res.users'
_columns = {
'question_ids':fields.one2many('website.forum.post', 'create_uid', 'Questions', domain=[('parent_id', '=', False)]),
'answer_ids':fields.one2many('website.forum.post', 'create_uid', 'Answers', domain=[('parent_id', '!=', False)]),
'vote_ids': fields.one2many('website.forum.post.vote', 'user_id', 'Votes'),
'tags': fields.many2many('website.forum.tag', 'forum_tag_rel', 'forum_id', 'forum_tag_id', 'Tag'),
'create_date': fields.datetime('Create Date', select=True, readonly=True),
'karma': fields.integer('Karma')
'karma': fields.integer('Karma') # Use Gamification for this
# TODO: 'tag_ids':fields.function()
# Badges : we will use the groups to define badges, two purpose will get solved
# - Define Groups as Badges with Forum as an Application
# - Access control
# Badges : use the gamification module
}
class PostHistory(osv.Model):
@ -168,6 +158,7 @@ class ForumActivity(osv.Model):
'user_id': fields.many2one('res.users', 'User'),
'create_date': fields.datetime('Created on', select=True, readonly=True),
'create_uid': fields.many2one('res.users', 'Created by', select=True, readonly=True),
# Use the gamification module instead!
'badge_id': fields.many2one('res.groups', 'Badge'),
'karma_add': fields.integer('Added Karma'),
'karma_sub': fields.integer('Karma Removed')
@ -180,5 +171,6 @@ class Tags(osv.Model):
_columns = {
'name': fields.char('Name', size=64, required=True),
'post_ids': fields.many2many('website.forum.post', 'forum_tag_que_rel', 'tag_id', 'forum_id', 'Questions', readonly=True),
'forum_id': fields.many2one('website.forum', 'Forum', required=True)
}

View File

@ -7,7 +7,7 @@
font-weight: bold;
}
.question .pull-left {
.question div.pull-left {
margin-right: 14px;
min-width: 80px;
}
@ -18,3 +18,8 @@
.oe_grey {
background-color: #eeeeee;
}
.img-avatar {
max-width: 50px;
margin-right: 10px;
}

View File

@ -10,7 +10,7 @@
font-weight: bold
.question
.pull-left
div.pull-left
margin-right: 14px
min-width: 80px
.question-name
@ -19,3 +19,7 @@
.oe_grey
background-color: #eeeeee
.img-avatar
max-width: 50px
margin-right: 10px

View File

@ -77,11 +77,19 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Help</a>
<a class="navbar-brand" href="/forum">Help</a>
<!-- FP Note: Replace by this when controllers have changed
<a class="navbar-brand" t-attf-href="/forum/#{slug(forum)}">
<span t-field="forum.name"/>
</a>
-->
</div>
<div class="collapse navbar-collapse" id="oe-help-navbar-collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<li t-if="searches.get('type') not in ('all', 'unanswered','followed')">
<a href="/forum">Questions</a>
</li>
<li class="dropdown" t-if="searches.get('type') in ('all', 'unanswered','followed')">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<t t-if="searches.get('type') == 'all'">All Questions</t>
<t t-if="searches.get('type') == 'unanswered'">Unanswered Questions</t>
@ -120,6 +128,9 @@
<li t-att-class="searches.get('badge') and 'active' or '' ">
<a href="/forum/badge">Badges</a>
</li>
<li>
<a href="/user/1"><span class="label label-success">You got the <em>New Author</em> badge!</span></a>
</li>
</ul>
<form class="navbar-form navbar-right" role="search" action="/forum/" method="get">
<div class="form-group">
@ -178,131 +189,71 @@
</template>
<template id="user_detail">
<div class="col-sm-3 col-sm-offset-9 col-md-offset-8 text-right">
<div class="panel panel-primary">
<p class="text-center-heading">
<small>
asked
<span t-esc="question.create_date"></span>
</small>
</p>
<div class="row">
<div class="col-xs-3">
<div class="row">
<div class="col-xs-12">
<span t-field="question.create_uid.image" t-field-options='{"widget": "image"}' />
</div>
</div>
</div>
<div class="col-xs-9">
<div class="row">
<div class="col-xs-12">
<div class="text-left">
<a t-attf-href="/forum/user/#{ question.create_uid.id }">
<t t-esc="question.create_uid.name" />
</a>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div style="font-size:10px" class="text-left">
<b style="color : green">11</b>
<span class="glyphicon glyphicon-certificate badge-gold"></span>
1
<span class="glyphicon glyphicon-certificate badge-silver"></span>
10
<span class="glyphicon glyphicon-certificate badge-bronze"></span>
5
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<template id="post_vote">
</template>
<template id="post_links">
<div class="row">
<div class="col-xs-12 text-right">
<a class="action-links" href="">
<span class="glyphicon glyphicon-pencil"></span>
</a>
<a class="action-links" href="">
<span class="glyphicon glyphicon-flag"></span>
</a>
<a class="action-links" href="">
<span class="glyphicon glyphicon-trash"></span>
</a>
<a class="action-links" href="">
<span class="glyphicon glyphicon-link"></span>
</a>
<div>
<span t-field="user.image" t-field-options='{"widget": "image", "class":"pull-left img img-circle img-avatar"}' />
<div>
<a t-attf-href="/forum/user/#{ slug(user) }" t-field="user.name"/>
<t t-raw="separator or ', '"/>
<b>11 badges:</b>
<span class="fa fa-certificate badge-gold"></span>
1
<span class="fa fa-certificate badge-silver"></span>
10
<span class="fa fa-certificate badge-bronze"></span>
5
<br/>
<t t-raw="0"/>
</div>
</div>
</template>
<template id="ask_question">
<t t-call="website.layout">
<div class="container">
<div class="col-md-9 col-xs-11">
<div class="row">
<div class="col-xs-12 page-header">
<h3>Please Ask your Question here</h3>
</div>
<div class="col-xs-12">
<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>
</ul>
</div>
</div>
<div class="row">
<form action="/forum/question/ask/" method="post" role="form">
<div class="col-xs-12">
<input type="text" name="question_name" required="True"
t-attf-value="#{question_name or ''}" id="textbox_user_question"
class="form-control" placeholder="Enter your Question" />
</div>
<div class="col-xs-12">
Please enter a descriptive question (should
finish by a '?')
</div>
<div class="col-xs-12">
<textarea name="question_content" required="True"
t-attf-value="#{question_content or ''}" class="form-control"
id="textarea_ckeditor" rows="10" style="width : 100%" />
</div>
<div class="col-xs-12">
Tags:
</div>
<div class="col-xs-12">
<input type="text" name="question_tag" t-attf-value="#{question_tag or ''}"
class="form-control" id="textarea_tags" style="width : 100%" />
</div>
<div class="col-xs-8">
<button class="btn btn-default" id="btn_ask_your_question"
style="background-color : #df3f3f; color: white !important;">Post Your Question</button>
</div>
</form>
</div>
<script type="text/javascript">
CKEDITOR.replace("textarea_ckeditor");
</script>
<t t-call="website_forum.header">
<h1 class="mt0">Ask your Question</h1>
<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>
</ul>
<form action="/forum/question/ask/" method="post" role="form">
<div class="col-xs-12">
<input type="text" name="question_name" required="True"
t-attf-value="#{question_name or ''}" id="textbox_user_question"
class="form-control" placeholder="Enter your Question" />
</div>
</div>
<div class="col-xs-12">
Please enter a descriptive question (should
finish by a '?')
</div>
<div class="col-xs-12">
<textarea name="question_content" required="True"
t-attf-value="#{question_content or ''}" class="form-control"
id="textarea_ckeditor" rows="10" style="width : 100%" />
</div>
<div class="col-xs-12">
Tags:
</div>
<div class="col-xs-12">
<input type="text" name="question_tag" t-attf-value="#{question_tag or ''}"
class="form-control" id="textarea_tags" style="width : 100%" />
</div>
<div class="col-xs-8">
<button class="btn btn-default" id="btn_ask_your_question"
style="background-color : #df3f3f; color: white !important;">Post Your Question</button>
</div>
</form>
<script type="text/javascript">
CKEDITOR.replace("textarea_ckeditor");
</script>
</t>
</template>
@ -389,34 +340,20 @@
</template>
<template id="answer">
<ul class="media-list">
<div>
<li t-foreach="question.child_ids" t-as="answer" class="media">
<div>
<t t-call="website_forum.post_vote"/>
<div class="row col-md-9" style="font-size:14px">
<t t-esc="answer.content" />
</div>
<div class="row">
<t t-call="website_forum.user_detail" />
</div>
<t t-call="website_forum.post_links" />
</div>
</li>
</div>
</ul>
</template>
<template id="post_description_full" name="Question Navigation">
<t t-call="website_forum.header">
<div class="question">
<div class="pull-left text-center">
<div class="text-center pull-left">
<div t-attf-class="box oe_grey">
<div class="fa fa-thumbs-up text-success"/>
<div>
<a href="#" class="fa fa-thumbs-up text-success"/>
<span t-esc="len(question.vote_ids)"/>
<a href="#" class="fa fa-thumbs-down text-warning"/>
<div>
votes
</div>
<div class="fa fa-thumbs-down text-warning"/>
</div>
<div class="text-muted">
<span t-esc="len(question.child_ids)"/>
@ -424,116 +361,105 @@
<span t-if="len(question.child_ids)&lt;=1">Answer</span>
</div>
</div>
<div>
<div style="margin-left: 120px;">
<h1 t-field="question.name" class="mt0"/>
<t t-raw="question.content"/>
<div>
<t t-foreach="question.tags" t-as="tag">
<a t-attf-href="/forum/tag/#{ tag.id }" class="badge" t-field="tag.name"/>
<div class="mt16 clearfix">
<div class="pull-right">
<t t-foreach="question.tags" t-as="tag">
<a t-attf-href="/forum/tag/#{ tag.id }" class="badge" t-field="tag.name"/>
</t>
</div>
<t t-set="user" t-value="question.create_uid"/>
<t t-call="website_forum.user_detail">
<span class="text-muted">Asked on <span t-field="question.write_date"/></span>
</t>
</div>
<div class="row">
<t t-call="website_forum.user_detail" />
</div>
</div>
</div>
<hr/>
<div class="row">
<t t-call="website_forum.answer"/>
<div t-foreach="question.child_ids" t-as="answer" class="mt16 mb32">
<div class="text-center pull-left">
<div t-attf-class="box oe_grey">
<a href="#" class="fa fa-thumbs-up text-success"/>
<span t-esc="len(question.vote_ids)"/>
<a href="#" class="fa fa-thumbs-down text-warning"/>
<div>
votes
</div>
</div>
<div class="text-muted">
<a href="#" class="fa fa-2x fa-check"/>
</div>
</div>
<div style="margin-left: 120px;" class="clearfix">
<t t-raw="answer.content" />
<div class="mt16">
<div class="pull-right">
<a class="action-links" href="">
<span class="fa fa-edit"></span>
</a>
<a class="action-links" href="">
<span class="fa fa-flag"></span>
</a>
<a class="action-links" href="">
<span class="fa-trash-o"></span>
</a>
<a class="action-links" href="">
<span class="fa fa-link"></span>
</a>
</div>
<t t-set="user" t-value="answer.create_uid"/>
<t t-call="website_forum.user_detail">
<span class="text-muted">Answered on <span t-field="answer.create_date"/></span>
</t>
</div>
</div>
</div>
<div t-if="not answer_done">
<t t-call="website_forum.post_answer"/>
</div>
<div t-if="answer_done">
<form action="/forum/question/editanswer/" method="post" role="form">
<input name="post_id" t-att-value="question.id" type="hidden"/>
<button class="btn btn-default btn-lg">
Edit Your Answer
</button>
<span> (only one answer per question is allowed) </span>
</form>
</div>
</t>
</template>
<template id="tag">
<t t-call="website.layout">
<div>
<t t-call="website_forum.header"/>
</div>
<!--Todo: Improve kanban-->
<div class="container">
<t t-foreach="tags" t-as="tag">
<a t-attf-href="/forum/tag/#{ tag.id }" class="badge">
<t t-esc="tag.name" />
<t t-call="website_forum.header">
<h1 class="mt0">
Question by Tags
</h1>
<div class="row">
<div class="col-sm-3 mt16" t-foreach="tags" t-as="tag">
<a t-attf-href="/forum/tag/#{ slug(tag) }" class="badge">
<span t-field="tag.name" />
</a>
<span>
X <t t-esc="len(tag.post_ids)"/>
</span>
</t>
<div class="pull-left">
<t t-call="website.pager" />
</div>
</div>
</t>
</template>
<template id="users">
<t t-call="website.layout">
<div>
<t t-call="website_forum.header"/>
</div>
<div class="container">
<t t-foreach="users" t-as="user">
<div class="row">
<div class="col-xs-3 ">
<div class="row">
<div class="col-xs-12 col-md-3">
<span t-field="user.image" t-field-options='{"widget": "image"}' />
</div>
</div>
</div>
<div class="col-xs-9">
<div class="row">
<div class="col-xs-12">
<div class="text-left">
<a t-attf-href="/forum/user/#{ user.id }">
<t t-esc="user.name" />
</a>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div style="font-size:10px" class="text-left">
<b style="color : green">11</b>
<span class="glyphicon glyphicon-certificate badge-gold"></span>
1
<span class="glyphicon glyphicon-certificate badge-silver"></span>
10
<span class="glyphicon glyphicon-certificate badge-bronze"></span>
5
</div>
</div>
</div>
</div>
</div>
</t>
<div class="pull-left">
<t t-call="website.pager" />
<t t-call="website_forum.header">
<div class="row">
<div t-foreach="users" t-as="user" class="col-sm-4">
<t t-set="separator"><br/></t>
<t t-call="website_forum.user_detail"/>
<span class="text-muted">Joined on <span t-field="user.create_date"/></span>
</div>
</div>
<div class="pull-left">
<t t-call="website.pager" />
</div>
</t>
</template>
<template id="user_detail_full">
<t t-call="website.layout">
<div>
<t t-call="website_forum.header"/>
</div>
<t t-call="website_forum.header">
<div class="container">
<div class="row col-xs-12 page-header">
<h3>