1 <?xml version="1.0" encoding="utf-8"?>
6 <template id="assets_editor" inherit_id="website.assets_editor" name="Forum Editor Assets" groups="base.group_user">
7 <xpath expr="." position="inside">
8 <link rel='stylesheet' href="/website_forum/static/src/css/website_forum.css"/>
9 <script type="text/javascript" src="/website_forum/static/src/js/website.tour.forum.js"/>
10 <script type="text/javascript" src="/website_forum/static/src/js/website_forum.editor.js"/>
14 <template id="assets_forum" name="Forum Assets">
15 <link rel='stylesheet' href="/web/static/lib/jquery.textext/jquery.textext.css"/>
16 <link rel='stylesheet' href='/website_forum/static/src/css/website_forum.css'/>
18 <script type="text/javascript" src="/website_forum/static/src/js/website_forum.js"/>
19 <script type="text/javascript" src="/web/static/lib/jquery.textext/jquery.textext.js"/>
20 <script type="text/javascript" src="/web/static/lib/ckeditor/ckeditor.js"/>
21 <script type="text/javascript">
22 CKEDITOR.config.toolbar = [['Bold','Italic','Underline','Strike'],['NumberedList','BulletedList', 'Blockquote']
23 ,['Outdent','Indent','Link','Unlink','Image'],] ;
27 <!-- Layout add nav and footer -->
28 <template id="header_footer_custom" inherit_id="website.footer_default"
29 name="Footer Questions Link">
30 <xpath expr="//ul[@id='products']" position="inside">
31 <li><a t-attf-href="/forum/%(website_forum.forum_help)d">Q&A</a></li>
32 <li><a href="/forum">Forums</a></li>
37 <template id="link_button">
38 <form method="POST" t-att-action="url">
39 <button t-attf-class="fa btn-link #{classes} #{karma and 'karma_required text-muted' or ''}" t-attf-data-karma="#{karma}">
40 <t t-esc="label"/></button>
45 <template id="header" name="Forum Index">
46 <t t-call="website.layout">
48 <t t-call-assets="website_forum.assets_forum"/>
50 <div t-if="is_public_user and not no_introduction_message" class="alert alert-success alert-dismissable">
51 <div class="container">
52 <div t-field="forum.introduction_message"/>
53 <a class='btn btn-primary' t-attf-href="/web?redirect=#{ request.httprequest.url }">Register</a>
54 <button type="button" class="btn btn-link js_close_intro" data-dismiss="alert" aria-hidden="true">Hide Intro</button>
57 <div class="container mt16 website_forum">
58 <div class="navbar navbar-default">
59 <div class="navbar-header">
60 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#oe-help-navbar-collapse">
61 <span class="sr-only">Toggle navigation</span>
62 <span class="icon-bar"></span>
63 <!-- <span class="icon-bar"></span> -->
64 <span class="icon-bar"></span>
66 <a class="navbar-brand" t-attf-href="/forum/#{slug(forum)}">
67 <span t-field="forum.name"/>
70 <div class="collapse navbar-collapse" id="oe-help-navbar-collapse">
71 <ul class="nav navbar-nav">
72 <li t-att-class="sorting == 'relevancy' and 'active' or '' ">
73 <a t-attf-href="/forum/#{ slug(forum) }?{{ keep_query( 'search', 'post_type', 'filters', sorting='relevancy') }}">Trending</a>
75 <li t-att-class="sorting == 'creation' and 'active' or '' ">
76 <a t-attf-href="/forum/#{ slug(forum) }?{{ keep_query( 'search', 'post_type', 'filters', sorting='creation') }}">Newest</a>
78 <li t-att-class="searches.get('users') and 'active' or '' ">
79 <a t-attf-href="/forum/#{ slug(forum) }/users">People</a>
81 <li t-att-class="searches.get('tags') and 'active' or '' ">
82 <a t-attf-href="/forum/#{ slug(forum) }/tag">Tags</a>
84 <li t-att-class="searches.get('badges') and 'active' or '' ">
85 <a t-attf-href="/forum/#{ slug(forum) }/badge">Badges</a>
87 <li t-if="not is_public_user" t-att-class="searches.get('my_profile') and 'active' or '' ">
88 <a t-attf-href="/forum/#{ slug(forum) }/user/#{uid}">My Profile</a>
91 <form class="navbar-form navbar-right" role="search" t-attf-action="/forum/#{ slug(forum) }" method="get">
92 <div class="input-group">
93 <input type="search" class="form-control" name="search" t-att-value="search or ''"/>
94 <span class="input-group-btn">
95 <button type="submit" class="btn btn-default">Search</button>
103 <div id="wrap" class="container">
105 <div class="col-sm-9">
106 <div t-foreach="notifications or []" t-as="notification" class="alert alert-success alert-dismissable">
107 <button type="button" class="close notification_close" t-att-id="notification.id" data-dismiss="alert" aria-hidden="true">&times;</button>
108 <div t-field="notification.body"/>
109 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ user.id }#badges" class="fa fa-arrow-right">View Your Badges</a>
113 <div class="col-sm-3" id="right-column">
114 <div t-if="not header.get('ask_hide')" class="btn-group btn-block mb16">
115 <button type="button" class="btn btn-primary btn-lg col-sm-10" t-attf-href="/forum/#{slug(forum)}/#{forum.default_allow}">
118 <button type="button" class="btn btn-primary btn-lg col-sm-2 dropdown-toggle" data-toggle="dropdown">
119 <span class="caret"></span>
120 <span class="sr-only">Select Post</span>
122 <ul class="dropdown-menu" role="menu">
123 <li t-if="allow_link"><a t-attf-href="/forum/#{slug(forum)}/post_link">Share a Link</a></li>
124 <li t-if="allow_question"><a t-attf-href="/forum/#{slug(forum)}/ask_question">Ask a Question</a></li>
125 <li t-if="allow_discussion"><a t-attf-href="/forum/#{slug(forum)}/post_discussion">Launch a Discussion</a></li>
128 <div class="panel panel-default">
129 <div class="panel-heading">
130 <h3 class="panel-title">Keep Informed</h3>
132 <div class="panel-body">
133 <t t-call="website_mail.follow">
134 <t t-set="email" t-value="user.email"/>
135 <t t-set="object" t-value="forum"/>
139 <div class="panel panel-default" id="about_forum">
140 <div class="panel-heading">
141 <h3 class="panel-title">About This Forum</h3>
143 <div class="panel-body">
144 <t t-raw="forum.description"/>
145 <a t-if="not header.get('is_guidelines')" t-attf-href="/forum/#{slug(forum)}/faq" class="fa fa-arrow-right"> Read Guidelines</a>
146 <a t-if="header.get('is_guidelines')" t-attf-href="/forum/#{slug(forum)}" class="fa fa-arrow-right"> Back to <span t-field="forum.name"/></a>
149 <div t-if="header.get('question_data')">
150 <div class="panel panel-default">
151 <div class="panel-heading text-center">
152 <h3 class="panel-title">Question tools</h3>
154 <div class="panel-body text-center">
155 <t t-call="website_mail.follow"><t t-set="object" t-value="question"/></t>
157 <strong><t t-raw="len(question.message_follower_ids)"/></strong> follower(s)
160 <div class="panel-heading text-center">
161 <h3 class="panel-title ">Stats</h3>
163 <div class="panel-body">
164 <table class="table">
165 <thead><tr><td> Asked: <strong><span t-field="question.create_date" t-field-options='{"format":"short"}'/></strong></td></tr></thead>
166 <tr><td> Seen: <strong><t t-raw="question.views"/></strong>
167 <span t-if="question.views>1">times</span>
168 <span t-if="question.views<=1">time</span>
170 <tr><td> Last updated: <strong><span t-field="question.write_date" t-field-options='{"format":"short"}'/></strong></td></tr>
178 <div class="oe_structure"/>
182 <!-- Display a post -->
183 <template id="display_post">
184 <div class="question row">
185 <div class="col-md-2 hidden-xs text-center">
186 <t t-call="website_forum.vote">
187 <t t-set="post" t-value="question"/>
190 <div class="col-md-10 clearfix">
191 <div class="question-name">
192 <span t-if="question.type == 'question'" class="fa fa-question-circle text-muted"/>
193 <span t-if="question.type == 'discussion'" class="fa fa-comment text-muted"/>
194 <t t-if="question.type == 'link'">
195 <a t-att-href="question.name" t-raw="question.content"/>
197 <t t-if="question.type in ('question', 'discussion')">
198 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
200 <span t-if="not question.active"><b> [Deleted]</b></span>
201 <span t-if="question.state == 'close'"><b> [Closed]</b></span>
203 <t t-foreach="question.tag_ids" t-as="question_tag">
204 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{slug(question_tag)}/questions">
205 <span t-attf-class="pull-right badge #{tag and tag.name == question_tag.name and 'badge-active' ''}" t-field="question_tag.name"
206 style="margin-right: 4px;"/>
209 <div class="text-muted">
210 by <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
211 t-field="question.create_uid" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
212 style="display: inline-block;"/>
213 on <span t-field="question.write_date" t-field-options='{"format":"short"}'/>
214 <span t-if="question.type == 'question'" class="visible-xs">
215 <b t-esc="question.child_count or 0"/>
216 <t t-if="question.child_count>1">answers</t>
217 <t t-if="question.child_count==1">answer</t>
219 with <b t-field="question.views"/> views
220 <span t-if="question.vote_count>0"> and
221 <b t-esc="question.vote_count or 0"/>
222 <t t-if="question.vote_count>1">votes</t>
223 <t t-if="question.vote_count==1">vote</t>
225 <a t-if="question.type == 'link'" t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }">
226 <t t-esc="question.child_count"/>
227 <t t-if="question.child_count>1">Comments</t>
228 <t t-if="question.child_count<=1">Comment</t>
235 <!-- Display a post as an answer -->
236 <template id="display_post_answer">
237 <div class="clearfix">
238 <div t-attf-class="pull-left text-center mb16 box #{len(answer.vote_ids) and 'oe_green' or 'oe_grey'}">
239 <div t-esc="len(answer.vote_ids)"/>
241 <div class="question-name" style="margin-left: 32px;">
242 <a style="font-size: 15px;" t-attf-href="/forum/#{ slug(forum) }/question/#{ answer.parent_id.id }/#answer-#{ answer.id }" t-esc="answer.parent_id.name"/>
243 <t t-if="len(answer.website_message_ids)>0">
244 (<t t-esc="len(answer.website_message_ids)"/>
245 <t t-if="len(answer.website_message_ids)>1">Comments</t>
246 <t t-if="len(answer.website_message_ids)<=1">Comment</t>)
254 <t t-call="website_forum.header">
255 <div t-field="forum.faq"/>
259 <!-- All Forums Layout -->
260 <template id="forum_all">
261 <t t-call="website.layout">
262 <div class="container">
263 <h1 class="mb32">Our forums</h1>
265 <div t-foreach="forums" t-as="forum" class="col-sm-3 text-center mb32">
266 <a t-attf-href="/forum/#{ slug(forum) }">
267 <div class="fa fa-5x fa-comment mb16"/>
268 <div t-field="forum.name"/>
276 <!-- Specific Forum Layout -->
277 <template id="forum_index" name="Forum">
278 <t t-call="website_forum.header">
279 <h2 class="page-header mt0">
280 <t t-esc="question_count"/>
281 <span t-if="post_type == 'all'">Posts</span>
282 <span t-if="post_type == 'question'">Questions</span>
283 <span t-if="post_type == 'link'">Posts</span>
284 <span t-if="post_type == 'discussion'">Discussions</span>
286 <small class="dropdown" t-if="filters in ('all', 'unanswered','followed', 'tag')">
287 <a href="#" class="dropdown-toggle" data-toggle="dropdown">
288 <t t-if="filters == 'unanswered'">Unanswered</t>
289 <t t-if="filters == 'followed'">Followed</t>
290 <t t-if="tag"><span t-field="tag.name"/></t>
291 <t t-if="sorting == 'relevancy'"> by relevancy</t>
292 <t t-if="sorting == 'date'"> by activity date</t>
293 <t t-if="sorting == 'creation'"> by creation date</t>
294 <t t-if="sorting == 'answered'"> by most answered</t>
295 <t t-if="sorting == 'vote'"> by most voted</t>
298 <ul class="dropdown-menu">
299 <li class="dropdown-header">Filter on</li>
300 <li t-att-class="filters == 'all' and 'active' or '' ">
301 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='all')">All</a>
303 <li t-att-class="filters == 'unanswered' and 'active' or '' ">
304 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='unanswered')">Unanswered</a>
306 <li t-if="uid" t-att-class="filters == 'followed' and 'active' or '' ">
307 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='followed')">Followed</a>
309 <li class="dropdown-header">Tags</li>
310 <li t-if="tag" t-att-class="tag and 'active' or '' ">
311 <a href=""><t t-esc="tag.name"/></a>
313 <li class="dropdown-header">Sort by</li>
314 <li t-att-class="sorting == 'relevancy' and 'active' or '' ">
315 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='relevancy')">Relevancy</a>
317 <li t-att-class="sorting == 'date' and 'active' or '' ">
318 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='date')">Last activity date</a>
320 <li t-att-class="sorting == 'creation' and 'active' or '' ">
321 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='creation')">Newest</a>
323 <li t-att-class="sorting == 'answered' and 'active' or '' ">
324 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='answered')">Most answered</a>
326 <li t-att-class="sorting == 'vote' and 'active' or '' ">
327 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='vote')">Most voted</a>
332 <div t-foreach="question_ids" t-as="question" class="mb16">
333 <t t-call="website_forum.display_post"/>
335 <t t-call="website.pager"/>
340 <t t-call="website_forum.header">
341 <div class="oe_structure oe_empty"/>
342 <h1 class="mt32">Question not found!</h1>
343 <p>Sorry, this question is not available anymore.</p>
345 <a t-attf-href="/forum">Return to the question list.</a>
350 <!-- Edition: Post Article -->
351 <template id="post_link">
352 <t t-call="website_forum.header">
353 <h1 class="mt0">Post Your Article</h1>
355 <b>Share</b> Start Something Awesome
357 <form t-attf-action="/forum/#{ slug(forum) }/link/new" method="post" role="form" class="tag_text">
358 <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
359 class="form-control mb16 link_url" placeholder="Your Article URL..."/>
360 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
361 <input type="text" name="content" readonly="True" required="True" t-attf-value="#{content}"
362 class="form-control" placeholder="Your Article Title..."/>
364 <input type="text" name="post_tags" readonly="True" placeholder="Tags" class="form-control load_tags"/>
366 <button class="btn btn-primary" disabled="True" id="btn_post_your_article">Post Your Article</button>
371 <!-- Edition: Post your Discussion Topic -->
372 <template id="post_discussion">
373 <t t-call="website_forum.header">
374 <h1 class="mt0">Post Your Discussion Topic</h1>
376 <b>Share</b> Start Something Awesome
378 <form t-attf-action="/forum/#{ slug(forum) }/discussion/new" method="post" role="form" class="tag_text">
379 <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
380 class="form-control mb16" placeholder="Your Discussion Title..."/>
381 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
382 <textarea name="content" id="content" required="True" class="form-control load_editor">
383 <t t-esc="question_content"/>
386 <input type="text" name="post_tags" placeholder="Tags" class="form-control load_tags"/>
388 <button class="btn btn-primary" id="btn_ask_your_question">Post Your Topic</button>
393 <!-- Edition: ask your question -->
394 <template id="ask_question">
395 <t t-call="website_forum.header">
396 <h1 class="mt0">Ask Your Question</h1>
398 To improve your chance getting an answer:
401 <li>Set a clear, explicit and concise question title
403 <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>
405 <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>
408 <li>Avoid unnecessary introductions (Hi,... Please... Thanks...),</li>
409 <li>Provide enough details and, if possible, give an example.</li>
411 <script type="text/javascript">
413 $("[data-toggle='popover']").popover();
416 <form t-attf-action="/forum/#{ slug(forum) }/question/new" method="post" role="form" class="tag_text">
417 <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
418 class="form-control mb16" placeholder="Your Question Title..."/>
419 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
420 <textarea name="content" required="True" id="content" class="form-control load_editor">
421 <t t-esc="question_content"/>
424 <input type="text" name="post_tags" placeholder="Tags" class="form-control load_tags"/>
426 <button class="btn btn-primary" id="btn_ask_your_question">Post Your Question</button>
431 <!-- Edition: edit a post -->
432 <template id="edit_post">
433 <t t-call="website_forum.header">
434 <h3 t-if="not is_answer">Edit <span t-field="post.type"/></h3>
435 <h3 t-if="is_answer">Edit reply</h3>
436 <form t-attf-action="/forum/#{slug(forum)}/post/#{slug(post)}/save" method="post" role="form" class="tag_text">
437 <div t-if="not is_answer">
438 <input type="text" name="post_name" required="True"
439 t-attf-value="#{post.name}" class="form-control mb8" placeholder="Edit your Post"/>
440 <h5 t-if="post.type == 'question'" class="mt20">Please enter a descriptive question (should finish by a '?')</h5>
442 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
443 <textarea name="content" id="content" required="True" class="form-control load_editor">
444 <t t-esc="post.content"/>
446 <div t-if="not is_answer">
448 <input type="text" name="post_tag" class="form-control col-md-9 load_tags" placeholder="Tags" t-attf-value="#{tags}"/>
451 <button class="btn btn-primary btn-lg">Save</button>
456 <!-- Moderation: close a post -->
457 <template id="close_post">
458 <t t-call="website_forum.header">
459 <h1 class="mt0">Close Post</h1>
460 <p class="text-muted">
461 If you close this post, it will be hidden for most users. Only
462 users having a high karma can see closed posts to moderate
465 <form t-attf-action="/forum/#{ slug(forum) }/question/#{slug(question)}/close" method="post" role="form" class="form-horizontal mt32 mb64">
466 <input name="post_id" t-att-value="question.id" type="hidden"/>
467 <div class="form-group">
468 <label class="col-md-3 control-label" for="reason">Post:</label>
469 <div class="col-md-8 mt8">
470 <span t-field="question.name"/>
473 <div class="form-group">
474 <label class="col-md-3 control-label" for="reason">Reason:</label>
475 <div class="col-md-8">
476 <select class="form-control" name="reason_id">
477 <t t-foreach="reasons or []" t-as="reason">
478 <option t-att-value="reason.id" t-att-selected="reason.id == question.closed_reason_id.id"><t t-esc="reason.name"/></option>
483 <div class="form-group">
484 <div class="col-md-offset-3 col-md-8">
485 <button class="btn btn-primary">Close post</button>
486 <span class="text-muted">or</span>
487 <a class="btn btn-link" t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }">back to post</a>
494 <!-- Edition: post a reply -->
495 <template id="post_reply">
496 <div class="css_editable_mode_hidden">
497 <form t-attf-id="reply#{ object._name.replace('.','') + '-' + str(object.id) }" class="collapse oe_comment_grey"
498 t-attf-action="/forum/#{ slug(forum) }/#{slug(object)}/reply" method="post" role="form">
499 <h3 class="mt10">Your Reply</h3>
500 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
501 <textarea name="content" t-attf-id="content-#{str(object.id)}" class="form-control load_editor" required="True"/>
502 <button class="btn btn-primary" id="btn_ask_your_question">Post Your Reply</button>
507 <!-- Edition: post an answer -->
508 <template id="post_answer">
509 <h3 class="mt10">Your Reply</h3>
510 <p t-if="question.type == 'question'">
511 <b>Please try to give a substantial answer.</b> If you wanted to comment on the question or answer, just
512 <b>use the commenting tool.</b> Please remember that you can always <b>revise your answers</b>
513 - no need to answer the same question twice. Also, please <b>don't forget to vote</b>
514 - it really helps to select the best questions and answers!
516 <form t-attf-action="/forum/#{ slug(forum) }/#{slug(question)}/reply" method="post" role="form">
517 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
518 <textarea name="content" t-attf-id="content-#{str(question.id)}" class="form-control load_editor" required="True"/>
519 <button class="btn btn-primary mt16" id="btn_ask_your_question">Post Your Reply</button>
524 <div t-attf-class="box oe_grey">
525 <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 ''}"
526 t-attf-data-karma="#{post.user_vote == 1 and post.karma_downvote or post.karma_upvote}"
527 t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/upvote"/>
528 <span id="vote_count" t-esc="post.vote_count"/>
529 <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 ''}"
530 t-attf-data-karma="#{post.user_vote == -1 and post.karma_upvote or post.karma_downvote}"
531 t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/downvote"/>
532 <div t-if="vote_count > 1" class="subtitle">
535 <div t-if="vote_count < 2" class="subtitle">
541 <!-- Specific Post Layout -->
542 <template id="post_description_full" name="Question Navigation">
543 <t t-call="website_forum.header">
544 <div t-attf-class="row question">
545 <div class="col-md-2 hidden-xs text-center">
546 <t t-call="website_forum.vote">
547 <t t-set="post" t-value="question"/>
549 <div class="text-muted text-center">
550 <span t-field="question.views"/> Views
553 <a t-attf-data-href="/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
554 t-attf-class="favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}"/>
557 <div t-attf-class="col-md-10 #{not question.active and 'alert alert-danger' or ''}">
559 <t t-if="question.type == 'link'">
560 <a t-att-href="question.name" t-raw="question.content"/>
562 <t t-if="question.type in ('question', 'discussion')">
563 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
565 <span t-if="not question.active"><b> [Deleted]</b></span>
566 <span t-if="question.state == 'close'"><b> [Closed]</b></span>
568 <div class="alert alert-info text-center" t-if="question.state == 'close'">
570 <b>The <i t-field="question.type"/> has been closed<t t-if="question.closed_reason_id"> for reason: <i t-esc="question.closed_reason_id.name"/></t></b>
572 <t t-if="question.closed_uid">
573 <b>by <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.closed_uid.id }"
574 t-field="question.closed_uid"
575 t-field-options='{"widget": "contact", "fields": ["name"]}'
576 style="display: inline-block;"/></b>
578 <b>on <span t-field="question.closed_date"/></b>
579 <div class="mt16 mb24 text-center">
580 <t t-call="website_forum.link_button">
581 <t t-set="url" t-value="'/forum/' + slug(forum) + '/question/' + slug(question) + '/reopen'"/>
582 <t t-set="label" t-value="'Reopen'"/>
583 <t t-set="classes" t-value="'fa-arrow-right'"/>
584 <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
588 <div t-if="question.type != 'link'"><t t-raw="question.content"/></div>
589 <div class="mt16 clearfix">
590 <div class="pull-right">
591 <div class="text-right">
592 <t t-foreach="question.tag_ids" t-as="tag">
593 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ tag.id }/questions" class="badge" t-field="tag.name"/>
596 <ul class="list-inline" id="options">
597 <li t-if="question.type == 'question'">
598 <a style="cursor: pointer" data-toggle="collapse"
599 t-attf-class="fa fa-comment-o #{not question.can_comment and 'karma_required text-muted' or ''}"
600 t-attf-data-karma="#{not question.can_comment and question.karma_comment or 0}"
601 t-attf-data-target="#comment#{ question._name.replace('.','') + '-' + str(question.id) }">
605 <li t-if="question.state != 'close'">
606 <t t-call="website_forum.link_button">
607 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/ask_for_close'"/>
608 <t t-set="label" t-value="'Close'"/>
609 <t t-set="classes" t-value="'fa-times'"/>
610 <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
613 <li t-if="question.state == 'close'">
614 <t t-call="website_forum.link_button">
615 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/reopen'"/>
616 <t t-set="label" t-value="'Reopen'"/>
617 <t t-set="classes" t-value="'fa-undo'"/>
618 <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
622 <t t-call="website_forum.link_button">
623 <t t-set="url" t-value="'/forum/' + slug(forum) +'/post/' + slug(question) + '/edit'"/>
624 <t t-set="label" t-value="'Edit'"/>
625 <t t-set="classes" t-value="'fa-edit'"/>
626 <t t-set="karma" t-value="not question.can_edit and question.karma_edit or 0"/>
629 <li t-if="question.active">
630 <t t-call="website_forum.link_button">
631 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/delete'"/>
632 <t t-set="label" t-value="'Delete'"/>
633 <t t-set="classes" t-value="'fa-trash-o'"/>
634 <t t-set="karma" t-value="not question.can_unlink and question.karma_unlink or 0"/>
637 <li t-if="not question.active">
638 <t t-call="website_forum.link_button">
639 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/undelete'"/>
640 <t t-set="label" t-value="'Undelete'"/>
641 <t t-set="classes" t-value="'fa-trash-o'"/>
642 <t t-set="karma" t-value="not question.can_unlink and question.karma_unlink or 0"/>
648 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{question.create_uid.id}/avatar"/>
650 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
651 t-field="question.create_uid"
652 t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
653 style="display: inline-block;"/>
654 <div t-field="question.create_uid" t-field-options='{"widget": "contact", "badges": true, "fields": ["karma"]}'/>
655 <span class="text-muted">Asked on <span t-field="question.create_date" t-field-options='{"format":"short"}'/></span>
658 <div class="visible-xs text-center">
659 <t t-call="website_forum.vote">
660 <t t-set="post" t-value="question"/>
662 <div class="text-muted text-center">
663 <span t-field="question.views"/> Views
666 <a t-attf-data-href="/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
667 t-attf-class="favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}"/>
671 <t t-call="website_forum.post_comment">
672 <t t-set="object" t-value="question"/>
677 <div t-foreach="question.child_ids" t-as="post_answer" class="mt16 mb32">
678 <t t-call="website_forum.post_answers">
679 <t t-set="answer" t-value="post_answer"/>
682 <div t-if="question.type != 'question' or question.type == 'question' and not question.uid_has_answered and question.state != 'close' and question.active != False">
683 <t t-call="website_forum.post_answer"/>
685 <div t-if="question.type == 'question' and question.uid_has_answered" class="mb16">
686 <a class="btn btn-primary" t-attf-href="/forum/#{slug(forum)}/question/#{slug(question)}/edit_answer">Edit Your Previous Answer</a>
687 <span class="text-muted">(only one answer per question is allowed)</span>
692 <template id="post_answers">
693 <a t-attf-id="answer-#{str(answer.id)}"/>
694 <div t-attf-class="forum_answer row" t-attf-id="answer_#{answer.id}" >
695 <div class="col-md-2 hidden-xs text-center">
696 <t t-call="website_forum.vote">
697 <t t-set="post" t-value="answer"/>
699 <div t-if="question.type == 'question'" class="text-muted mt8">
700 <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 ''}"
701 t-attf-data-karma="#{answer.karma_accept}"
702 t-attf-data-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
705 <div class="col-md-10 clearfix">
706 <t t-raw="answer.content"/>
708 <ul class="list-inline pull-right">
709 <li t-if="question.type == 'question'">
710 <a t-attf-class="fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
711 t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
712 style="cursor: pointer" data-toggle="collapse"
713 t-attf-data-target="#comment#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Comment
716 <li t-if="question.type != 'question' and not answer.parent_id or answer.parent_id and not answer.parent_id.parent_id">
717 <a t-attf-class="fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
718 t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
719 style="cursor: pointer" data-toggle="collapse"
720 t-attf-data-target="#reply#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Reply
724 <t t-call="website_forum.link_button">
725 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/edit'"/>
726 <t t-set="label" t-value="'Edit'"/>
727 <t t-set="classes" t-value="'fa fa-edit'"/>
728 <t t-set="karma" t-value="not answer.can_edit and answer.karma_edit or 0"/>
732 <t t-call="website_forum.link_button">
733 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/delete'"/>
734 <t t-set="label" t-value="'Delete'"/>
735 <t t-set="classes" t-value="'fa-trash-o'"/>
736 <t t-set="karma" t-value="not answer.can_unlink and answer.karma_unlink or 0"/>
739 <li t-if="question.type == 'question'">
740 <t t-call="website_forum.link_button">
741 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/convert_to_comment'"/>
742 <t t-set="label" t-value="'Convert as a comment'"/>
743 <t t-set="classes" t-value="'fa-magic'"/>
744 <t t-set="karma" t-value="not answer.can_comment_convert and answer.karma_comment_convert or 0"/>
748 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{answer.create_uid.id}/avatar"/>
750 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ answer.create_uid.id }"
751 t-field="answer.create_uid"
752 t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
753 style="display: inline-block;"/>
754 <div t-field="answer.create_uid" t-field-options='{"widget": "contact", "badges": true, "fields": ["karma"]}'/>
755 <span class="text-muted">Answered on <span t-field="answer.create_date" t-field-options='{"format":"short"}'/></span>
757 <div class="visible-xs text-center">
758 <t t-call="website_forum.vote">
759 <t t-set="post" t-value="answer"/>
761 <div class="text-muted mt8">
762 <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 ''}"
763 t-attf-data-karma="#{answer.karma_accept}"
764 t-attf-data-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
768 <t t-if="answer.type == 'question'" t-call="website_forum.post_comment">
769 <t t-set="object" t-value="answer"/>
771 <div t-if="answer.type != 'question' and question.state != 'close' and question.active != False">
772 <t t-call="website_forum.post_reply">
773 <t t-set="object" t-value="answer"/>
776 <div t-foreach="answer.child_ids" t-as="child_answer" class="mt16 mb16">
777 <t t-call="website_forum.post_answers">
778 <t t-set="answer" t-value="child_answer"/>
785 <!-- Utility template: Post a Comment -->
786 <template id="post_comment">
787 <div class="row clearfix">
788 <div class="col-sm-10 col-sm-offset-2">
789 <div t-foreach="reversed(object.website_message_ids)" t-as="message" class="comment oe_comment_grey">
790 <small class="text-muted">
791 <t t-set="required_karma" t-value="message.author_id.id == user.partner_id.id and object.forum_id.karma_comment_unlink_own or object.forum_id.karma_comment_unlink_all"/>
792 <t t-call="website_forum.link_button">
793 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(object) + '/comment/' + slug(message) + '/delete'"/>
794 <t t-set="label" t-value="' '"/>
795 <t t-set="karma" t-value="user.karma<required_karma and required_karma or 0"/>
796 <t t-set="classes" t-value="'close comment_delete fa-times'"/>
799 <span t-field="message.body"/>
800 <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"/>
801 <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)">
802 <t t-set="allow_post_comment" t-value="True" />
804 <t t-if="allow_post_comment">
805 <t t-call="website_forum.link_button" >
806 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(object) + '/comment/' + slug(message) + '/convert_to_answer'"/>
807 <t t-set="label" t-value="'Convert as an answer'"/>
808 <t t-set="karma" t-value="user.karma<required_karma and required_karma or 0"/>
809 <t t-set="classes" t-value="'fa-magic pull-right'"/>
812 <a t-attf-href="/forum/#{slug(forum)}/partner/#{message.author_id.id}"
813 t-field="message.author_id" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
814 style="display: inline-block;"/>
815 on <span t-field="message.date" t-field-options='{"format":"short"}'/>
818 <div class="css_editable_mode_hidden">
819 <form t-attf-id="comment#{ object._name.replace('.','') + '-' + str(object.id) }" class="collapse oe_comment_grey"
820 t-attf-action="/forum/#{slug(forum)}/post/#{slug(object)}/comment" method="POST">
821 <input name="post_id" t-att-value="object.id" type="hidden" class="mt8"/>
822 <textarea name="comment" class="form-control" placeholder="Comment this post..."/>
823 <button type="submit" class="btn btn-primary mt8">Post</button>
831 <t t-call="website_forum.header">
835 <p class="text-muted">
836 A tag is a label that categorizes your question with other,
837 similar questions. Using the right tags makes it easier for
838 others to find and answer your question.
841 <div class="col-sm-3 mt16" t-foreach="tags" t-as="tag">
842 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ slug(tag) }/questions?{{ keep_query( filters='tag') }}" class="badge">
843 <span t-field="tag.name"/>
846 X <t t-esc="tag.posts_count"/>
853 <template id="badge">
854 <t t-call="website_forum.header">
859 Besides gaining reputation with your questions and answers,
860 you receive badges for being especially helpful. Badges
861 appear on your profile page, and your posts.
863 <table class="table mt32 mb64">
864 <tr t-foreach="badges" t-as="badge">
866 <a t-attf-href="/forum/#{ slug(forum) }/badge/#{ slug(badge) }" class="badge pull-left">
867 <span t-if="badge.level == 'gold'" class="fa fa-circle badge-gold"/>
868 <span t-if="badge.level == 'silver'" class="fa fa-circle badge-silver"/>
869 <span t-if="badge.level == 'bronze'" class="fa fa-circle badge-bronze"/>
870 <span t-field="badge.name"/>
873 <b t-esc="badge.stat_count_distinct"/>
874 <i class="text-muted">awarded users</i>
876 <span t-field="badge.description"/>
883 <template id="badge_user">
884 <t t-call="website_forum.header">
885 <h3 class="mt32 mb32">
886 <b>Badge "<span t-field="badge.name"/>"</b>
889 <div class="pull-left badge">
890 <span t-if="badge.level == 'gold'" class="fa fa-circle badge-gold"/>
891 <span t-if="badge.level == 'silver'" class="fa fa-circle badge-silver"/>
892 <span t-if="badge.level == 'bronze'" class="fa fa-circle badge-bronze"/>
893 <span t-field="badge.name"/>
895 <span t-field="badge.description" style="margin-left:20px"/>
898 <t class="pull-left" t-esc="badge.stat_count_distinct"/>
899 <span t-if="badge.stat_count_distinct>1">users</span>
900 <span t-if="badge.stat_count_distinct<=1">user</span>
904 <div class="col-sm-3 mt16" t-foreach="users" t-as="user">
905 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{user.id}/avatar"/>
907 <a t-attf-href="/forum/#{slug(forum)}/user/#{user.id}" t-field="user.name"/>
914 <template id="users">
915 <t t-call="website_forum.header">
916 <div t-foreach="users" t-as="row_users" class="row mt16">
917 <div t-foreach="row_users" t-as="user" class="col-sm-4">
918 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{user.id}/avatar"/>
920 <a t-attf-href="/forum/#{slug(forum)}/user/#{user.id}" t-field="user.name"/>
921 <t t-if="user.country_id">
922 <span t-field="user.country_id.image" t-field-options='{"widget": "image", "class": "country_flag"}'/>
924 <b><t t-esc="user.karma"/></b>
925 <t t-raw="separator"/>
928 <span class="fa fa-circle badge-gold"/>
929 <t t-esc="user.gold_badge"/>
930 <span class="fa fa-circle badge-silver"/>
931 <t t-esc="user.silver_badge"/>
932 <span class="fa fa-circle badge-bronze"/>
933 <t t-esc="user.bronze_badge"/>
939 <div class="pull-left">
940 <t t-call="website.pager"/>
945 <!--Private profile-->
946 <template id="private_profile">
947 <t t-call="website_forum.header">
948 <h1 class="mt32">This profile is private!</h1>
950 <a t-attf-href="/forum/#{slug(forum)}">Return to the question list.</a>
955 <template id="edit_profile">
956 <t t-call="website_forum.header">
957 <h3>Edit Profile</h3>
959 <div class="col-md-2">
960 <img class="img img-responsive img-circle" t-attf-src="/forum/user/#{user.id}/avatar"/>
962 <div class="col-md-10">
963 <form t-attf-action="/forum/#{slug(forum)}/user/#{slug(user)}/save" method="post" role="form" class="form-horizontal">
964 <input name="user_id" t-att-value="user.id" type="hidden"/>
965 <div class="form-group">
966 <label class="col-md-2 control-label mb16" for="user_name">Real name</label>
967 <div class="col-md-8 mb16">
968 <input type="text" class="form-control" name="name" id="user_name" required="True" t-attf-value="#{user.name}"/>
971 <div class="form-group">
972 <label class="col-md-2 control-label mb16" for="user_website_published" t-if="user.id == uid">Public profile</label>
973 <div class="col-md-8 mb16" t-if="user.id == uid">
974 <input type="checkbox" class="mt8" name="website_published" id="user_website_published" value="True" t-if="not user.website_published"/>
975 <input type="checkbox" class="mt8" name="website_published" id="user_website_published" value="True" checked="checked" t-if="user.website_published"/>
978 <div class="form-group">
979 <label class="col-md-2 control-label mb16" for="user_website">Website</label>
980 <div class="col-md-8 mb16">
981 <input type="text" class="form-control" name="website" id="user_website" t-attf-value="#{user.partner_id.website or ''}"/>
984 <div class="form-group">
985 <div t-if="email_required" class="alert alert-danger alert-dismissable oe_forum_email_required">
986 <button type="button" class="close" data-dismiss="alert">x</button>
987 <p>Please enter a valid email address in order to receive notifications from answers or comments.</p>
989 <label class="col-md-2 control-label mb16" for="user_email">Email</label>
990 <div class="col-md-8 mb16">
991 <input type="text" class="form-control" name="email" id="user_email" required="True" t-attf-value="#{user.partner_id.email}"/>
994 <div class="form-group">
995 <label class="col-md-2 control-label mb16" for="user_city">City</label>
996 <div class="col-md-8 mb16">
997 <input type="text" class="form-control" name="city" id="user_city" t-attf-value="#{user.partner_id.city or ''}"/>
1000 <div class="form-group">
1001 <label class="col-md-2 control-label mb16">Country</label>
1002 <div class="col-md-8 mb16">
1003 <select class="form-control" name="country">
1004 <option value="">Country...</option>
1005 <t t-foreach="countries or []" t-as="country">
1006 <option t-att-value="country.id" t-att-selected="country.id == user.partner_id.country_id.id"><t t-esc="country.name"/></option>
1011 <!--Note: using website_description fiels instead of using commnt firld of partner-->
1012 <div class="form-group">
1013 <label class="col-md-2 control-label mb16" for="description">Biography</label>
1014 <div class="col-md-8 mb16">
1015 <textarea name="description" id="description" style="min-height: 120px" required="True"
1016 class="form-control load_editor"><t t-esc="user.partner_id.website_description"/></textarea>
1019 <div class="col-sm-offset-2 col-md-2 mb16">
1020 <button class="btn btn-primary btn-lg">Update</button>
1025 <script type="text/javascript">
1026 CKEDITOR.replace("description");
1031 <template id="user_detail_full">
1032 <t t-call="website_forum.header">
1033 <h1 class="mt0 page-header">
1034 <span t-field="user.name"/>
1035 <small>profile</small>
1036 <t t-call="website.publish_management" groups="base.group_website_publisher">
1037 <t t-set="object" t-value="user"/>
1041 <div class="col-sm-2">
1042 <img class="img img-responsive img-circle" t-attf-src="/forum/user/#{user.id}/avatar"/>
1044 <div class="col-sm-10">
1045 <table class="table table-condensed">
1047 <td rowspan="2" valign="top"><span class="text-muted">contributions</span></td>
1048 <td>member since</td>
1049 <td><span t-field="user.create_date" t-field-options='{"format": "short"}'/></td>
1051 <td>last connection</td>
1052 <td><span t-field="user.login_date" t-field-options='{"format": "short"}'/></td>
1055 <td rowspan="2" valign="top"><span class="text-muted">bio</span></td>
1058 <a t-att-href="user.website" t-if="user.website">
1059 <span t-field="user.website"/>
1065 <span t-field="user.city"/>
1066 <span t-if="user.city and user.country_id">, </span>
1067 <span t-field="user.country_id"/>
1068 <t t-if="user.country_id"> <span t-field="user.country_id.image" t-field-options='{"widget": "image", "class": "country_flag"}'/></t>
1073 <td rowspan="2" valign="top"><span class="text-muted">stats</span></td>
1075 <td><span t-field="user.karma"/></td>
1079 <span class="fa fa-thumbs-up"/>
1080 <span t-esc="up_votes"/>
1081 <span class="fa fa-thumbs-down"/>
1082 <span t-esc="down_votes"/>
1086 <div class="well well-sm">
1087 <span t-field="user.partner_id.website_description" class="oe_no_empty"/>
1088 <t t-if="uid == user.id">
1089 <a class="fa fa-arrow-right" t-attf-href="/forum/#{slug(forum)}/user/#{slug(user)}/edit"> Edit Your Bio</a>
1095 <ul class="nav nav-tabs">
1097 <a href="#questions" data-toggle="tab"><t t-esc="count_questions"/> Questions</a>
1100 <a href="#answers" data-toggle="tab"><t t-esc="count_answers"/> Answers</a>
1102 <li t-if="uid == user.id">
1103 <a href="#favourite_question" data-toggle="tab"><t t-esc="len(favourite)"/> Favourite Questions</a>
1105 <li t-if="uid == user.id">
1106 <a href="#followed_question" data-toggle="tab"><t t-esc="len(followed)"/> Followed Questions</a>
1108 <li t-if="uid == user.id">
1109 <a href="#activity" data-toggle="tab">Activity</a>
1112 <a href="#badges" data-toggle="tab">Badges</a>
1114 <li t-if="uid == user.id">
1115 <a href="#votes" data-toggle="tab">Votes</a>
1118 <div class="tab-content mt16">
1119 <div class="tab-pane active" id="questions">
1120 <div class="mb16" t-foreach="questions" t-as="question">
1121 <t t-call="website_forum.display_post"/>
1123 </div><div class="tab-pane" id="answers">
1124 <div t-foreach="answers" t-as="answer">
1125 <t t-call="website_forum.display_post_answer"/>
1128 <div class="tab-pane" id="karma">
1131 <div class="tab-pane" id="badges">
1132 <t t-call="website_forum.user_badges"/>
1134 <div class="tab-pane" id="favourite_question" t-if="uid == user.id">
1135 <div t-foreach="favourite" t-as="question">
1136 <t t-call="website_forum.display_post"/>
1139 <div class="tab-pane" id="followed_question" t-if="uid == user.id">
1140 <div t-foreach="followed" t-as="question" class="mb16">
1141 <t t-call="website_forum.display_post"/>
1144 <div class="tab-pane" id="votes" t-if="uid == user.id">
1145 <t t-call="website_forum.user_votes"/>
1147 <div class="tab-pane" id="activity" t-if="uid == user.id">
1148 <ul class="list-unstyled">
1149 <li t-foreach="activities" t-as="activity">
1150 <span t-field="activity.date" t-field-options='{"format": "short"}'/>
1151 <span t-esc="activity.subtype_id.name" class="label label-info"/>
1152 <t t-set="post" t-value="posts[activity.res_id]"/>
1153 <span t-if="post[1]">
1154 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(post[0]) }#answer-#{ str(post[1].id) }">
1155 <span t-esc="post[0].name"/>
1158 <span t-if="not post[1]">
1159 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(post[0]) }">
1160 <span t-esc="post[0].name"/>
1170 <template id="user_badges">
1171 <table class="table mt32 mb64">
1172 <tr t-foreach="user.badge_ids" t-as="badge">
1174 <a t-attf-href="/forum/#{ slug(forum) }/badge/#{ slug(badge.badge_id) }" class="badge pull-left">
1175 <span t-if="badge.badge_id.level == 'gold'" class="fa fa-circle badge-gold"/>
1176 <span t-if="badge.badge_id.level == 'silver'" class="fa fa-circle badge-silver"/>
1177 <span t-if="badge.badge_id.level == 'bronze'" class="fa fa-circle badge-bronze"/>
1178 <span t-field="badge.badge_id.name"/>
1181 <b t-esc="badge.badge_id.stat_count_distinct"/>
1182 <i class="text-muted">awarded users</i>
1184 <span t-field="badge.badge_id.description"/>
1188 <div class="mb16" t-if="not user.badge_ids">
1189 <b>No badge yet!</b><br/>
1190 <a t-attf-href="/forum/#{ slug(forum) }/badge" class="fa fa-arrow-right"> Check available badges</a>
1194 <template id="user_votes">
1195 <div t-foreach="vote_post" t-as="vote">
1196 <t t-esc="vote.post_id.create_date"/>
1197 <span t-if="vote.vote == '1'" class="fa fa-thumbs-up text-success" style="margin-left:30px"/>
1198 <span t-if="vote.vote == '-1'" class="fa fa-thumbs-down text-warning" style="margin-left:30px"/>
1199 <t t-if="vote.post_id.parent_id">
1200 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ vote.post_id.parent_id.id }/#answer-#{ vote.post_id.id }" t-esc="vote.post_id.parent_id.name" style="margin-left:10px"/>
1202 <t t-if="not vote.post_id.parent_id">
1203 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ vote.post_id.id }" style=" color:black;margin-left:10px" t-esc="vote.post_id.name"/>
1206 <div class="mb16" t-if="not vote_post">
1207 <b>No vote given by you yet!</b>
1211 <!-- User Navbar -->
1212 <template id="content_new_forum" inherit_id="website.user_navbar" groups="base.group_user">
1213 <xpath expr="//ul[@id='oe_systray']/li/ul[@class='dropdown-menu oe_content_menu']" position="inside">
1214 <li><a href="#" data-action="new_forum">New Forum</a></li>