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 <script type="text/javascript" src="/website_forum/static/src/js/website_forum.editor.js"/>
12 <!-- Front-end custom css / js + ckeditor lib and customization -->
13 <template id="assets_frontend" inherit_id="website.assets_frontend" name="Forum Assets">
14 <xpath expr="." position="inside">
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'/>
17 <script type="text/javascript" src="/website_forum/static/src/js/website_forum.js"/>
18 <script type="text/javascript" src="/web/static/lib/jquery.textext/jquery.textext.js"/>
19 <script type="text/javascript">
20 var CKEDITOR_BASEPATH = '/web/static/lib/ckeditor/';
22 <script type="text/javascript" src="/web/static/lib/ckeditor/ckeditor.js"></script>
23 <script type="text/javascript">
24 CKEDITOR.config.toolbar = [['Bold','Italic','Underline','Strike'],['NumberedList','BulletedList', 'Blockquote']
25 ,['Outdent','Indent','Link','Unlink','Image'],] ;
31 <!-- Layout add nav and footer -->
32 <template id="header_footer_custom" inherit_id="website.footer_default"
33 name="Footer Questions Link">
34 <xpath expr="//ul[@id='products']" position="inside">
35 <li><a t-attf-href="/forum/%(website_forum.forum_help)d">Q&A</a></li>
36 <li><a href="/forum">Forums</a></li>
41 <template id="link_button">
42 <form method="POST" t-att-action="url">
43 <button t-attf-class="fa btn-link #{classes} #{karma and 'karma_required text-muted' or ''}" t-attf-data-karma="#{karma}">
44 <t t-esc="label"/></button>
48 <script type="text/javascript" src="/web/static/lib/select2/select2.js"></script>
49 <link rel="stylesheet" href="/web/static/lib/select2/select2.css"/>
50 <link rel="stylesheet" href="/website/static/lib/select2-bootstrap-css/select2-bootstrap.css"/>
51 <script type="text/javascript" src="/website_forum/static/src/js/website_forum.js"/>
53 <template id="header" name="Forum Index">
54 <t t-call="website.layout">
55 <div t-if="is_public_user and not no_introduction_message" class="alert alert-success alert-dismissable">
56 <div class="container">
57 <h1 class="mt0">Welcome!</h1>
58 <div t-field="forum.description"/>
59 <a class='btn btn-primary' t-attf-href="/web?redirect=#{ request.httprequest.url }">Register</a>
60 <button type="button" class="btn btn-link js_close_intro" data-dismiss="alert" aria-hidden="true">Hide Intro</button>
63 <div class="container mt16 website_forum">
64 <div class="navbar navbar-default">
65 <div class="navbar-header">
66 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#oe-help-navbar-collapse">
67 <span class="sr-only">Toggle navigation</span>
68 <span class="icon-bar"></span>
69 <span class="icon-bar"></span>
71 <a class="navbar-brand" t-attf-href="/forum/#{slug(forum)}">
72 <span t-field="forum.name"/>
75 <div class="collapse navbar-collapse" id="oe-help-navbar-collapse">
76 <ul class="nav navbar-nav">
77 <li t-att-class="sorting == 'relevancy desc' and 'active' or '' ">
78 <a t-attf-href="/forum/#{ slug(forum) }?{{ keep_query( 'search', 'post_type', 'filters', sorting='relevancy desc') }}">Trending</a>
80 <li t-att-class="sorting == 'create_date desc' and 'active' or '' ">
81 <a t-attf-href="/forum/#{ slug(forum) }?{{ keep_query( 'search', 'post_type', 'filters', sorting='create_date desc') }}">Newest</a>
83 <li t-att-class="searches.get('users') and 'active' or '' ">
84 <a t-attf-href="/forum/#{ slug(forum) }/users">People</a>
86 <li t-att-class="searches.get('tags') and 'active' or '' ">
87 <a t-attf-href="/forum/#{ slug(forum) }/tag">Tags</a>
89 <li t-att-class="searches.get('badges') and 'active' or '' ">
90 <a t-attf-href="/forum/#{ slug(forum) }/badge">Badges</a>
92 <li t-if="not is_public_user" t-att-class="searches.get('my_profile') and 'active' or '' ">
93 <a t-attf-href="/forum/#{ slug(forum) }/user/#{uid}">My Profile</a>
96 <form class="navbar-form navbar-right" role="search" t-attf-action="/forum/#{ slug(forum) }" method="get">
97 <div class="input-group">
98 <input type="search" class="form-control" name="search" t-att-value="search or ''"/>
99 <span class="input-group-btn">
100 <button type="submit" class="btn btn-default">Search</button>
108 <div id="wrap" class="container">
109 <div class="row mb16">
110 <div class="col-sm-9">
111 <div t-foreach="notifications or []" t-as="notification" class="alert alert-success alert-dismissable">
112 <button type="button" class="close notification_close" t-att-id="notification.id" data-dismiss="alert" aria-hidden="true">&times;</button>
113 <div t-field="notification.body"/>
114 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ user.id }#badges" class="fa fa-arrow-right">View Your Badges</a>
116 <div t-if="not validation_email_sent and not is_public_user and user.karma == 0" class="alert alert-danger alert-dismissable">
117 <button type="button" class="close validation_email_close" data-dismiss="alert" aria-hidden="true">&times;</button>
120 It appears your email has not been verified.
121 <a class="send_validation_email" href="#" t-att-forum-id="forum.id">Click here to send a verification email allowing you to participate to the forum.</a>
125 <div t-if="validation_email_done" class="alert alert-success alert-dismissable">
126 <button type="button" class="close validated_email_close" data-dismiss="alert" aria-hidden="true">&times;</button>
128 <p>Congratulations! Your email has just been validated. You may now participate to our forums.</p>
133 <div class="col-sm-3" id="right-column">
134 <div t-if="not header.get('ask_hide')" t-attf-class="btn-group btn-block mb16 #{(user.karma < forum.karma_ask) and 'karma_required' or ''}" t-attf-data-karma="#{forum.karma_ask}">
135 <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}">
136 <t t-if="forum.default_post_type == 'question'">Ask a Question</t>
137 <t t-if="forum.default_post_type == 'link'">Submit a Link</t>
138 <t t-if="forum.default_post_type == 'discussion'">New Discussion</t>
140 <button type="button" class="btn btn-primary btn-lg col-sm-2 dropdown-toggle" data-toggle="dropdown">
141 <span class="caret"></span>
142 <span class="sr-only">Select Post</span>
144 <ul class="dropdown-menu" role="menu">
145 <li t-if="forum.allow_question"><a t-attf-href="/forum/#{slug(forum)}/ask?post_type=question">Ask a Question</a></li>
146 <li t-if="forum.allow_link"><a t-attf-href="/forum/#{slug(forum)}/ask?post_type=link">Submit a Link</a></li>
147 <li t-if="forum.allow_discussion"><a t-attf-href="/forum/#{slug(forum)}/ask?post_type=discussion">New Discussion</a></li>
150 <div class="panel panel-default">
151 <div class="panel-heading">
152 <h3 class="panel-title">Keep Informed</h3>
154 <div class="panel-body">
155 <t t-call="website_mail.follow">
156 <t t-set="email" t-value="user.email"/>
157 <t t-set="object" t-value="forum"/>
161 <div class="panel panel-default" id="about_forum">
162 <div class="panel-heading">
163 <h3 class="panel-title">About This Community</h3>
165 <div class="panel-body">
166 <t t-raw="forum.description"/>
167 <a t-if="not header.get('is_guidelines')" t-attf-href="/forum/#{slug(forum)}/faq" class="fa fa-arrow-right"> Read Guidelines</a>
168 <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>
171 <div t-if="header.get('question_data')">
172 <div class="panel panel-default">
173 <div class="panel-heading text-center">
174 <h3 class="panel-title">Question tools</h3>
176 <div class="panel-body text-center">
177 <t t-call="website_mail.follow"><t t-set="object" t-value="question"/></t>
179 <strong><t t-raw="len(question.message_follower_ids)"/></strong> follower(s)
182 <div class="panel-heading text-center">
183 <h3 class="panel-title ">Stats</h3>
185 <div class="panel-body">
186 <table class="table">
187 <thead><tr><td> Asked: <strong><span t-field="question.create_date" t-field-options='{"format":"short"}'/></strong></td></tr></thead>
188 <tr><td> Seen: <strong><t t-raw="question.views"/></strong>
189 <span t-if="question.views>1">times</span>
190 <span t-if="question.views<=1">time</span>
192 <tr><td> Last updated: <strong><span t-field="question.write_date" t-field-options='{"format":"short"}'/></strong></td></tr>
200 <div class="oe_structure"/>
204 <!-- Display a post -->
205 <template id="display_post">
206 <div class="question">
207 <div class="pull-left">
208 <t t-call="website_forum.vote">
209 <t t-set="post" t-value="question"/>
212 <div class="question-block">
213 <div class="question-name">
214 <t t-if="question.post_type == 'link'">
215 <a t-att-href="question.content_link" t-raw="question.name" target="_blank"/>
217 <t t-if="question.post_type in ('question', 'discussion')">
218 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
220 <span t-if="not question.active"><b> [Deleted]</b></span>
221 <span t-if="question.state == 'close'"><b> [Closed]</b></span>
223 <t t-foreach="question.tag_ids" t-as="question_tag">
224 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{slug(question_tag)}/questions">
225 <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"
226 style="margin-right: 4px;"/>
229 <small class="text-muted">
230 By <span t-field="question.create_uid" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}' style="display: inline-block;"/>
231 • <span t-field="question.write_date" t-field-options='{"format":"short"}'/>
232 • <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }">
233 <t t-esc="question.child_count"/>
234 <t t-if="question.child_count>1">comments</t>
235 <t t-if="question.child_count<=1">comment</t>
242 <!-- Display a post as an answer -->
243 <template id="display_post_answer">
244 <div class="clearfix">
245 <div t-attf-class="pull-left text-center mb16 #{len(answer.vote_ids) and 'oe_green' or 'oe_grey'}">
246 <div t-esc="len(answer.vote_ids)"/>
248 <div class="question-name" style="margin-left: 32px;">
249 <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"/>
250 <t t-if="len(answer.website_message_ids)>0">
251 (<t t-esc="len(answer.website_message_ids)"/>
252 <t t-if="len(answer.website_message_ids)>1">Comments</t>
253 <t t-if="len(answer.website_message_ids)<=1">Comment</t>)
261 <t t-call="website_forum.header">
262 <div t-field="forum.faq"/>
266 <!-- All Forums Layout -->
267 <template id="forum_all">
268 <t t-call="website.layout">
269 <div class="container">
270 <h1 class="mb32">Our forums</h1>
272 <div t-foreach="forums" t-as="forum" class="col-sm-3 text-center mb32">
273 <a t-attf-href="/forum/#{ slug(forum) }">
274 <div class="fa fa-5x fa-comment mb16"/>
275 <div t-field="forum.name"/>
283 <!-- Specific Forum Layout -->
284 <template id="forum_index" name="Forum">
285 <t t-call="website_forum.header">
286 <h2 class="page-header mt0">
287 <t t-esc="question_count"/>
288 <span t-if="post_type not in ('link','question','discussion')">Posts</span>
289 <span t-if="post_type == 'question'">Questions</span>
290 <span t-if="post_type == 'link'">Links</span>
291 <span t-if="post_type == 'discussion'">Threads</span>
293 <small class="dropdown" t-if="filters in ('all', 'unanswered','followed', 'tag')">
294 <a href="#" class="dropdown-toggle" data-toggle="dropdown">
295 <t t-if="filters == 'unanswered'">Unanswered</t>
296 <t t-if="filters == 'followed'">Followed</t>
297 <t t-if="tag"><span t-field="tag.name"/></t>
298 <t t-if="sorting == 'relevancy desc'"> by relevancy</t>
299 <t t-if="sorting == 'write_date desc'"> by activity date</t>
300 <t t-if="sorting == 'create_date desc'"> by newest</t>
301 <t t-if="sorting == 'child_count desc'"> by most answered</t>
302 <t t-if="sorting == 'vote_count desc'"> by most voted</t>
305 <ul class="dropdown-menu">
306 <li class="dropdown-header">Filter on</li>
307 <li t-att-class="filters == 'all' and 'active' or '' ">
308 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='all')">All</a>
310 <li t-att-class="filters == 'unanswered' and 'active' or '' ">
311 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='unanswered')">Unanswered</a>
313 <li t-if="uid" t-att-class="filters == 'followed' and 'active' or '' ">
314 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='followed')">Followed</a>
316 <li t-if="tag" class="dropdown-header">Tags</li>
317 <li t-if="tag" t-att-class="tag and 'active' or '' ">
318 <a href=""><t t-esc="tag.name"/></a>
320 <li class="dropdown-header">Sort by</li>
321 <li t-att-class="sorting == 'relevancy desc' and 'active' or '' ">
322 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='relevancy desc')">Relevancy</a>
324 <li t-att-class="sorting == 'write_date desc' and 'active' or '' ">
325 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='write_date desc')">Last activity date</a>
327 <li t-att-class="sorting == 'create_date desc' and 'active' or '' ">
328 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='create_date desc')">Newest</a>
330 <li t-att-class="sorting == 'child_count desc' and 'active' or '' ">
331 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='child_count desc')">Most answered</a>
333 <li t-att-class="sorting == 'vote_count desc' and 'active' or '' ">
334 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='vote_count desc')">Most voted</a>
339 <div t-foreach="question_ids" t-as="question" class="mb16">
340 <t t-call="website_forum.display_post"/>
342 <t t-call="website.pager"/>
347 <t t-call="website_forum.header">
348 <div class="oe_structure oe_empty"/>
349 <h1 class="mt32">Question not found!</h1>
350 <p>Sorry, this question is not available anymore.</p>
352 <a t-attf-href="/forum">Return to the question list.</a>
357 <!-- Edition: Post Article -->
358 <template id="new_link">
359 <t t-call="website_forum.header">
360 <h1 class="mt0">Submit a Link</h1>
362 Share an awesome link. Your post will appear in the 'Newest' top-menu.
363 If the community vote on your post, it will get traction by being promoted
366 We keep a high level of quality in showcased posts, around 20% of the submited
367 posts will be featured.
369 <form t-attf-action="/forum/#{ slug(forum) }/new?post_type=link" method="post" role="form" class="tag_text form-horizontal">
370 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
371 <div class="form-group">
372 <label class="col-sm-2 control-label" for="content_link">URL to Share</label>
373 <div class="col-sm-8">
374 <input type="text" name="content_link" required="True" t-attf-value="#{post_name}"
375 class="form-control mb16 link_url" placeholder="e.g. https://www.odoo.com"/>
378 <div class="form-group">
379 <label class="col-sm-2 control-label" for="post_name">Post Title</label>
380 <div class="col-sm-8">
381 <input type="text" name="post_name" required="True" t-attf-value="#{content}"
382 class="form-control"/>
385 <div class="form-group">
386 <label class="col-sm-2 control-label" for="post_tags">Tags</label>
387 <div class="col-sm-8">
388 <input type="hidden" name="karma_retag" t-attf-value="#{forum.karma_retag}" id="karma_retag"/>
389 <input type="text" name="post_tags" class="form-control js_select2"/>
392 <div class="form-group">
393 <div class="col-sm-offset-2 col-sm-8">
394 <button class="btn btn-primary" disabled="True" id="btn_post_your_article">Post</button>
401 <!-- Edition: Post your Discussion Topic -->
402 <template id="new_discussion">
403 <t t-call="website_forum.header">
404 <h1 class="mt0">New Topic</h1>
406 <b>Share</b> Something Awesome.
408 <form t-attf-action="/forum/#{slug(forum)}/new?post_type=discussion" method="post" role="form" class="tag_text">
409 <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
410 class="form-control mb16" placeholder="Your Discussion Title..."/>
411 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
412 <textarea name="content" id="content" required="True" class="form-control load_editor">
413 <t t-esc="question_content"/>
416 <input type="hidden" name="karma_retag" t-attf-value="#{forum.karma_retag}" id="karma_retag"/>
417 <input type="text" name="post_tags" placeholder="Tags" class="form-control js_select2"/>
419 <button class="btn btn-primary">Post Your Topic</button>
424 <!-- Edition: ask your question -->
425 <template id="new_question">
426 <t t-call="website_forum.header">
427 <h1 class="mt0">Ask Your Question</h1>
429 To improve your chance getting an answer:
432 <li>Set a clear, explicit and concise question title
434 <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>
436 <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>
439 <li>Avoid unnecessary introductions (Hi,... Please... Thanks...),</li>
440 <li>Provide enough details and, if possible, give an example.</li>
442 <form t-attf-action="/forum/#{slug(forum)}/new?post_type=question" method="post" role="form" class="tag_text">
443 <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
444 class="form-control mb16" placeholder="Your Question Title..."/>
445 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
447 <textarea name="content" required="True" id="content" class="form-control load_editor">
448 <t t-esc="question_content"/>
451 <input type="hidden" name="karma_retag" t-attf-value="#{forum.karma_retag}" id="karma_retag"/>
452 <input type="hidden" name="post_tags" placeholder="Tags" class="form-control js_select2"/>
454 <button t-attf-class="btn btn-primary #{(user.karma < forum.karma_ask) and 'karma_required' or ''}"
455 t-att-data-karma="forum.karma_ask">Post Your Question</button>
460 <!-- Edition: edit a post -->
461 <template id="edit_post">
462 <t t-call="website_forum.header">
463 <h3 t-if="not is_answer">Edit <span t-field="post.post_type"/></h3>
464 <h3 t-if="is_answer">Edit reply</h3>
465 <form t-attf-action="/forum/#{slug(forum)}/post/#{slug(post)}/save" method="post" role="form" class="tag_text">
466 <div t-if="not is_answer">
467 <input type="text" name="post_name" required="True"
468 t-attf-value="#{post.name}" class="form-control mb8" placeholder="Edit your Post"/>
469 <h5 t-if="post.post_type == 'question'" class="mt20">Please enter a descriptive question (should finish by a '?')</h5>
471 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
472 <input type="hidden" name="karma_retag" t-attf-value="#{forum.karma_retag}" id="karma_retag"/>
473 <textarea name="content" id="content" required="True" class="form-control load_editor">
474 <t t-esc="post.content"/>
476 <div t-if="not is_answer">
478 <input type="hidden" name="karma_retag" t-attf-value="#{forum.karma_retag}" id="karma_retag"/>
479 <input type="text" name="post_tag" class="form-control col-md-9 js_select2" placeholder="Tags" t-attf-data-init-value="#{tags}"/>
482 <button class="btn btn-primary btn-lg">Save</button>
487 <!-- Moderation: close a post -->
488 <template id="close_post">
489 <t t-call="website_forum.header">
490 <h1 class="mt0">Close Post</h1>
491 <p class="text-muted">
492 If you close this post, it will be hidden for most users. Only
493 users having a high karma can see closed posts to moderate
496 <form t-attf-action="/forum/#{ slug(forum) }/question/#{slug(question)}/close" method="post" role="form" class="form-horizontal mt32 mb64">
497 <input name="post_id" t-att-value="question.id" type="hidden"/>
498 <div class="form-group">
499 <label class="col-md-3 control-label" for="reason">Post:</label>
500 <div class="col-md-8 mt8">
501 <span t-field="question.name"/>
504 <div class="form-group">
505 <label class="col-md-3 control-label" for="reason">Reason:</label>
506 <div class="col-md-8">
507 <select class="form-control" name="reason_id">
508 <t t-foreach="reasons or []" t-as="reason">
509 <option t-att-value="reason.id" t-att-selected="reason.id == question.closed_reason_id.id"><t t-esc="reason.name"/></option>
514 <div class="form-group">
515 <div class="col-md-offset-3 col-md-8">
516 <button class="btn btn-primary">Close post</button>
517 <span class="text-muted">or</span>
518 <a class="btn btn-link" t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }">back to post</a>
525 <!-- Edition: post a reply -->
526 <template id="post_reply">
527 <div class="css_editable_mode_hidden">
528 <form t-attf-id="reply#{ object._name.replace('.','') + '-' + str(object.id) }" class="collapse oe_comment_grey"
529 t-attf-action="/forum/#{ slug(forum) }/#{slug(object)}/reply" method="post" role="form">
530 <h3 class="mt8">Your Reply</h3>
531 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
532 <textarea name="content" t-attf-id="content-#{str(object.id)}" class="form-control load_editor" required="True"/>
533 <button class="btn btn-primary">Post Comment</button>
538 <!-- Edition: post an answer -->
539 <template id="post_answer">
540 <h3 class="mt8">Your Answer</h3>
541 <p t-if="question.post_type == 'question'">
542 <b>Please try to give a substantial answer.</b> If you wanted to comment on the question or answer, just
543 <b>use the commenting tool.</b> Please remember that you can always <b>revise your answers</b>
544 - no need to answer the same question twice. Also, please <b>don't forget to vote</b>
545 - it really helps to select the best questions and answers!
547 <form t-attf-action="/forum/#{ slug(forum) }/#{slug(question)}/reply" method="post" role="form">
548 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
549 <textarea name="content" t-attf-id="content-#{str(question.id)}" class="form-control load_editor" required="True"/>
550 <button t-attf-class="btn btn-primary mt16 #{not question.can_answer and 'karma_required' or ''}"
551 t-att-data-karma="question.forum_id.karma_answer">Post Answer</button>
556 <div class="vote text-center">
557 <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 ''}"
558 t-attf-data-karma="#{post.user_vote == 1 and post.forum_id.karma_downvote or post.forum_id.karma_upvote}"
559 t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/upvote"/>
560 <div class="vote_count text-muted" t-esc="post.vote_count"/>
561 <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 ''}"
562 t-attf-data-karma="#{post.user_vote == -1 and post.forum_id.karma_upvote or post.forum_id.karma_downvote}"
563 t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/downvote"/>
568 <!-- Specific Post Layout -->
569 <template id="post_description_full" name="Question Navigation">
570 <t t-call="website_forum.header">
571 <div t-attf-class="question">
572 <div class="pull-left">
573 <t t-call="website_forum.vote">
574 <t t-set="post" t-value="question"/>
576 <a t-attf-data-href="/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
577 t-attf-class="favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}"/>
581 <div t-attf-class="question-block #{not question.active and 'alert alert-danger' or ''}">
583 <t t-if="question.post_type == 'link'">
584 <a t-att-href="question.content_link" t-raw="question.name"/>
586 <t t-if="question.post_type in ('question', 'discussion')">
587 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
589 <span t-if="not question.active"><b> [Deleted]</b></span>
590 <span t-if="question.state == 'close'"><b> [Closed]</b></span>
592 <div class="pull-right">
593 <div class="text-right">
594 <t t-foreach="question.tag_ids" t-as="tag">
595 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ tag.id }/questions" class="label label-default" t-field="tag.name"/>
599 <div class="text-muted mb16">
601 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
602 t-field="question.create_uid"
603 t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
604 style="display: inline-block;"/>
605 on <span t-field="question.create_date" t-field-options='{"format":"short"}'/>
606 • <span t-field="question.views"/> views
609 <div class="alert alert-info text-center" t-if="question.state == 'close'">
611 <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>
613 <t t-if="question.closed_uid">
614 <b>by <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.closed_uid.id }"
615 t-field="question.closed_uid"
616 t-field-options='{"widget": "contact", "fields": ["name"]}'
617 style="display: inline-block;"/></b>
619 <b>on <span t-field="question.closed_date"/></b>
620 <div class="mt16 mb24 text-center">
621 <t t-call="website_forum.link_button">
622 <t t-set="url" t-value="'/forum/' + slug(forum) + '/question/' + slug(question) + '/reopen'"/>
623 <t t-set="label" t-value="'Reopen'"/>
624 <t t-set="classes" t-value="'fa-arrow-right'"/>
625 <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
629 <div t-if="question.post_type != 'link' and question.create_uid.karma >= forum.karma_dofollow"><span t-field="question.content" class="oe_no_empty"/></div>
630 <div t-if="question.post_type != 'link' and question.create_uid.karma < forum.karma_dofollow"><span t-field="question.content" class="oe_no_empty" t-field-options='{"nofollow": 1}'/></div>
632 <div class="clearfix">
633 <ul class="pull-right list-inline mb0" id="options">
634 <li t-if="question.state != 'close'">
635 <t t-call="website_forum.link_button">
636 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/ask_for_close'"/>
637 <t t-set="label" t-value="'Close'"/>
638 <t t-set="classes" t-value="'fa-times'"/>
639 <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
642 <li t-if="question.state == 'close'">
643 <t t-call="website_forum.link_button">
644 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/reopen'"/>
645 <t t-set="label" t-value="'Reopen'"/>
646 <t t-set="classes" t-value="'fa-undo'"/>
647 <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
651 <t t-call="website_forum.link_button">
652 <t t-set="url" t-value="'/forum/' + slug(forum) +'/post/' + slug(question) + '/edit'"/>
653 <t t-set="label" t-value="'Edit'"/>
654 <t t-set="classes" t-value="'fa-edit'"/>
655 <t t-set="karma" t-value="not question.can_edit and question.karma_edit or 0"/>
658 <li t-if="question.active">
659 <t t-call="website_forum.link_button">
660 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/delete'"/>
661 <t t-set="label" t-value="'Delete'"/>
662 <t t-set="classes" t-value="'fa-trash-o'"/>
663 <t t-set="karma" t-value="not question.can_unlink and question.karma_unlink or 0"/>
666 <li t-if="not question.active">
667 <t t-call="website_forum.link_button">
668 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/undelete'"/>
669 <t t-set="label" t-value="'Undelete'"/>
670 <t t-set="classes" t-value="'fa-trash-o'"/>
671 <t t-set="karma" t-value="not question.can_unlink and question.karma_unlink or 0"/>
675 <ul class="list-inline mb0">
676 <li t-if="question.post_type == 'question'">
677 <a style="cursor: pointer" t-att-data-toggle="question.can_comment and 'collapse' or ''"
678 t-attf-class="fa fa-comment-o #{not question.can_comment and 'karma_required text-muted' or ''}"
679 t-attf-data-karma="#{not question.can_comment and question.karma_comment or 0}"
680 t-attf-data-target="#comment#{ question._name.replace('.','') + '-' + str(question.id) }">
687 <t t-call="website_forum.post_comment">
688 <t t-set="object" t-value="question"/>
692 <div t-foreach="question.child_ids" t-as="post_answer" class="mt16 mb32">
693 <hr class="mb4 mt4"/>
694 <t t-call="website_forum.post_answers">
695 <t t-set="answer" t-value="post_answer"/>
698 <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">
699 <t t-call="website_forum.post_answer"/>
701 <div t-if="question.post_type == 'question' and question.uid_has_answered" class="mb16">
702 <a class="btn btn-primary" t-attf-href="/forum/#{slug(forum)}/question/#{slug(question)}/edit_answer">Edit Your Previous Answer</a>
703 <span class="text-muted">(only one answer per question is allowed)</span>
708 <template id="post_answers">
709 <a t-attf-id="answer-#{str(answer.id)}"/>
710 <div t-attf-class="forum_answer" t-attf-id="answer_#{answer.id}" >
711 <div class="pull-left">
712 <t t-call="website_forum.vote">
713 <t t-set="post" t-value="answer"/>
714 <div t-if="question.post_type == 'question'" class="mt4">
715 <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 ''}"
716 t-attf-data-karma="#{answer.karma_accept}"
717 t-attf-data-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
721 <div class="question-block">
722 <div class="pull-right author-box">
723 <img class="pull-left img img-rounded img-avatar" t-attf-src="/forum/user/#{user.id}/avatar"/>
724 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ answer.create_uid.id }"
725 t-field="answer.create_uid"
726 t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
727 style="display: inline-block;"/>
728 <div class="text-muted">On <span t-field="answer.create_date" t-field-options='{"format":"short"}'/></div>
730 <div class="clearfix" t-if="answer.create_uid.karma >= forum.karma_dofollow"><span t-field="answer.content" class="oe_no_empty"/></div>
731 <div class="clearfix" t-if="answer.create_uid.karma < forum.karma_dofollow"><span t-field="answer.content" class="oe_no_empty" t-field-options='{"nofollow": 1}'/></div>
732 <div class="clearfix">
733 <ul class="list-inline pull-right mb0">
735 <t t-call="website_forum.link_button">
736 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/edit'"/>
737 <t t-set="label" t-value="'Edit'"/>
738 <t t-set="classes" t-value="'fa fa-edit'"/>
739 <t t-set="karma" t-value="not answer.can_edit and answer.karma_edit or 0"/>
743 <t t-call="website_forum.link_button">
744 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/delete'"/>
745 <t t-set="label" t-value="'Delete'"/>
746 <t t-set="classes" t-value="'fa-trash-o'"/>
747 <t t-set="karma" t-value="not answer.can_unlink and answer.karma_unlink or 0"/>
750 <li t-if="question.post_type == 'question'">
751 <t t-call="website_forum.link_button">
752 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/convert_to_comment'"/>
753 <t t-set="label" t-value="'Convert as a comment'"/>
754 <t t-set="classes" t-value="'fa-magic'"/>
755 <t t-set="karma" t-value="not answer.can_comment_convert and answer.karma_comment_convert or 0"/>
759 <ul class="list-inline mb0">
760 <li t-if="question.post_type == 'question'">
761 <a t-attf-class="fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
762 t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
763 style="cursor: pointer" t-att-data-toggle="answer.can_comment and 'collapse' or ''"
764 t-attf-data-target="#comment#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Comment
767 <li t-if="question.post_type != 'question'">
768 <a t-attf-class="fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
769 t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
770 style="cursor: pointer" data-toggle="collapse"
771 t-attf-data-target="#reply#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Reply
777 <hr class="mt4 mb4"/>
779 <t t-if="answer.post_type == 'question'" t-call="website_forum.post_comment">
780 <t t-set="object" t-value="answer"/>
782 <div t-if="answer.post_type != 'question' and question.state != 'close' and question.active != False">
783 <t t-call="website_forum.post_reply">
784 <t t-set="object" t-value="answer"/>
787 <div t-foreach="answer.child_ids" t-as="child_answer" class="mt4 mb4">
788 <t t-call="website_forum.post_answers">
789 <t t-set="answer" t-value="child_answer"/>
796 <!-- Utility template: Post a Comment -->
797 <template id="post_comment">
798 <div class="row clearfix">
799 <div class="col-sm-10 col-sm-offset-2">
800 <div t-foreach="reversed(object.website_message_ids)" t-as="message" class="comment oe_comment_grey">
801 <small class="text-muted">
802 <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"/>
803 <t t-call="website_forum.link_button">
804 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(object) + '/comment/' + slug(message) + '/delete'"/>
805 <t t-set="label" t-value="' '"/>
806 <t t-set="karma" t-value="user.karma<required_karma and required_karma or 0"/>
807 <t t-set="classes" t-value="'close comment_delete fa-times'"/>
810 <div t-if="message.create_uid.karma >= forum.karma_dofollow"><span t-field="message.body" class="oe_no_empty"/></div>
811 <div t-if="message.create_uid.karma < forum.karma_dofollow"><span t-field="message.body" class="oe_no_empty" t-field-options='{"nofollow": 1}'/></div>
812 <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"/>
813 <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)">
814 <t t-set="allow_post_comment" t-value="True" />
816 <t t-if="allow_post_comment">
817 <t t-call="website_forum.link_button" >
818 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(object) + '/comment/' + slug(message) + '/convert_to_answer'"/>
819 <t t-set="label" t-value="'Convert as an answer'"/>
820 <t t-set="karma" t-value="user.karma<required_karma and required_karma or 0"/>
821 <t t-set="classes" t-value="'fa-magic pull-right'"/>
824 <a t-attf-href="/forum/#{slug(forum)}/partner/#{message.author_id.id}"
825 t-field="message.author_id" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
826 style="display: inline-block;"/>
827 on <span t-field="message.date" t-field-options='{"format":"short"}'/>
830 <div class="css_editable_mode_hidden">
831 <form t-attf-id="comment#{ object._name.replace('.','') + '-' + str(object.id) }" class="collapse oe_comment_grey"
832 t-attf-action="/forum/#{slug(forum)}/post/#{slug(object)}/comment" method="POST">
833 <input name="post_id" t-att-value="object.id" type="hidden" class="mt8"/>
834 <textarea name="comment" class="form-control" placeholder="Comment this post..."/>
835 <button type="submit" class="btn btn-primary mt8">Post</button>
843 <t t-call="website_forum.header">
847 <p class="text-muted">
848 A tag is a label that categorizes your question with other,
849 similar questions. Using the right tags makes it easier for
850 others to find and answer your question.
853 <div class="col-sm-3 mt16" t-foreach="tags" t-as="tag">
854 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ slug(tag) }/questions?{{ keep_query( filters='tag') }}" class="label label-default">
855 <span t-field="tag.name"/>
858 X <t t-esc="tag.posts_count"/>
865 <template id="badge">
866 <t t-call="website_forum.header">
871 Besides gaining reputation with your questions and answers,
872 you receive badges for being especially helpful. Badges
873 appear on your profile page, and your posts.
875 <table class="table mt32 mb64">
876 <tr t-foreach="badges" t-as="badge">
878 <a t-attf-href="/forum/#{ slug(forum) }/badge/#{ slug(badge) }" class="badge pull-left">
879 <span t-if="badge.level == 'gold'" class="fa fa-circle badge-gold"/>
880 <span t-if="badge.level == 'silver'" class="fa fa-circle badge-silver"/>
881 <span t-if="badge.level == 'bronze'" class="fa fa-circle badge-bronze"/>
882 <span t-field="badge.name"/>
885 <b t-esc="badge.stat_count_distinct"/>
886 <i class="text-muted">awarded users</i>
888 <span t-field="badge.description"/>
895 <template id="badge_user">
896 <t t-call="website_forum.header">
897 <h3 class="mt32 mb32">
898 <b>Badge "<span t-field="badge.name"/>"</b>
901 <div class="pull-left badge">
902 <span t-if="badge.level == 'gold'" class="fa fa-circle badge-gold"/>
903 <span t-if="badge.level == 'silver'" class="fa fa-circle badge-silver"/>
904 <span t-if="badge.level == 'bronze'" class="fa fa-circle badge-bronze"/>
905 <span t-field="badge.name"/>
907 <span t-field="badge.description" style="margin-left:20px"/>
910 <t class="pull-left" t-esc="badge.stat_count_distinct"/>
911 <span t-if="badge.stat_count_distinct>1">users</span>
912 <span t-if="badge.stat_count_distinct<=1">user</span>
916 <div class="col-sm-3 mt16" t-foreach="users" t-as="user">
917 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{user.id}/avatar"/>
919 <a t-attf-href="/forum/#{slug(forum)}/user/#{user.id}" t-field="user.name"/>
926 <template id="users">
927 <t t-call="website_forum.header">
928 <div t-foreach="users" t-as="row_users" class="row mt16">
929 <div t-foreach="row_users" t-as="user" class="col-sm-4">
930 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{user.id}/avatar"/>
932 <a t-attf-href="/forum/#{slug(forum)}/user/#{user.id}" t-field="user.name"/>
933 <t t-if="user.country_id">
934 <span t-field="user.country_id.image" t-field-options='{"widget": "image", "class": "country_flag"}'/>
936 <b><t t-esc="user.karma"/></b>
937 <t t-raw="separator"/>
940 <span class="fa fa-circle badge-gold"/>
941 <t t-esc="user.gold_badge"/>
942 <span class="fa fa-circle badge-silver"/>
943 <t t-esc="user.silver_badge"/>
944 <span class="fa fa-circle badge-bronze"/>
945 <t t-esc="user.bronze_badge"/>
951 <div class="pull-left">
952 <t t-call="website.pager"/>
957 <!--Private profile-->
958 <template id="private_profile">
959 <t t-call="website_forum.header">
960 <h1 class="mt32">This profile is private!</h1>
962 <a t-attf-href="/forum/#{slug(forum)}">Return to the question list.</a>
967 <template id="edit_profile">
968 <t t-call="website_forum.header">
969 <h3>Edit Profile</h3>
971 <div class="col-md-2">
972 <img class="img img-responsive img-circle" t-attf-src="/forum/user/#{user.id}/avatar"/>
974 <div class="col-md-10">
975 <form t-attf-action="/forum/#{slug(forum)}/user/#{slug(user)}/save" method="post" role="form" class="form-horizontal">
976 <input name="user_id" t-att-value="user.id" type="hidden"/>
977 <div class="form-group">
978 <label class="col-md-2 control-label mb16" for="user_name">Real name</label>
979 <div class="col-md-8 mb16">
980 <input type="text" class="form-control" name="name" id="user_name" required="True" t-attf-value="#{user.name}"/>
983 <div class="form-group">
984 <label class="col-md-2 control-label mb16" for="user_website_published" t-if="user.id == uid">Public profile</label>
985 <div class="col-md-8 mb16" t-if="user.id == uid">
986 <input type="checkbox" class="mt8" name="website_published" id="user_website_published" value="True" t-if="not user.website_published"/>
987 <input type="checkbox" class="mt8" name="website_published" id="user_website_published" value="True" checked="checked" t-if="user.website_published"/>
990 <div class="form-group">
991 <label class="col-md-2 control-label mb16" for="user_website">Website</label>
992 <div class="col-md-8 mb16">
993 <input type="text" class="form-control" name="website" id="user_website" t-attf-value="#{user.partner_id.website or ''}"/>
996 <div class="form-group">
997 <div t-if="email_required" class="alert alert-danger alert-dismissable oe_forum_email_required">
998 <button type="button" class="close" data-dismiss="alert">x</button>
999 <p>Please enter a valid email address in order to receive notifications from answers or comments.</p>
1001 <label class="col-md-2 control-label mb16" for="user_email">Email</label>
1002 <div class="col-md-8 mb16">
1003 <input type="text" class="form-control" name="email" id="user_email" required="True" t-attf-value="#{user.partner_id.email}"/>
1006 <div class="form-group">
1007 <label class="col-md-2 control-label mb16" for="user_city">City</label>
1008 <div class="col-md-8 mb16">
1009 <input type="text" class="form-control" name="city" id="user_city" t-attf-value="#{user.partner_id.city or ''}"/>
1012 <div class="form-group">
1013 <label class="col-md-2 control-label mb16">Country</label>
1014 <div class="col-md-8 mb16">
1015 <select class="form-control" name="country">
1016 <option value="">Country...</option>
1017 <t t-foreach="countries or []" t-as="country">
1018 <option t-att-value="country.id" t-att-selected="country.id == user.partner_id.country_id.id"><t t-esc="country.name"/></option>
1023 <!--Note: using website_description fiels instead of using commnt firld of partner-->
1024 <div class="form-group">
1025 <label class="col-md-2 control-label mb16" for="description">Biography</label>
1026 <div class="col-md-8 mb16">
1027 <textarea name="description" id="description" style="min-height: 120px" required="True"
1028 class="form-control load_editor"><t t-esc="user.partner_id.website_description"/></textarea>
1031 <div class="col-sm-offset-2 col-md-2 mb16">
1032 <button class="btn btn-primary btn-lg">Update</button>
1037 <script type="text/javascript">
1038 CKEDITOR.replace("description");
1043 <template id="user_detail_full">
1044 <t t-call="website_forum.header">
1045 <h1 class="mt0 page-header">
1046 <span t-field="user.name"/>
1047 <small>profile</small>
1048 <t t-call="website.publish_management" groups="base.group_website_publisher">
1049 <t t-set="object" t-value="user"/>
1053 <div class="col-sm-2">
1054 <img class="img img-responsive img-circle" t-attf-src="/forum/user/#{user.id}/avatar"/>
1056 <div class="col-sm-10">
1057 <table class="table table-condensed">
1059 <td rowspan="2" valign="top"><span class="text-muted">contributions</span></td>
1060 <td>member since</td>
1061 <td><span t-field="user.create_date" t-field-options='{"format": "short"}'/></td>
1063 <td>last connection</td>
1064 <td><span t-field="user.login_date" t-field-options='{"format": "short"}'/></td>
1067 <td rowspan="2" valign="top"><span class="text-muted">bio</span></td>
1070 <a t-att-href="user.website" t-if="user.website">
1071 <span t-field="user.website"/>
1077 <span t-field="user.city"/>
1078 <span t-if="user.city and user.country_id">, </span>
1079 <span t-field="user.country_id"/>
1080 <t t-if="user.country_id"> <span t-field="user.country_id.image" t-field-options='{"widget": "image", "class": "country_flag"}'/></t>
1085 <td rowspan="2" valign="top"><span class="text-muted">stats</span></td>
1087 <td><span t-field="user.karma"/></td>
1091 <span class="fa fa-thumbs-up"/>
1092 <span t-esc="up_votes"/>
1093 <span class="fa fa-thumbs-down"/>
1094 <span t-esc="down_votes"/>
1098 <div class="well well-sm">
1099 <div t-if="user.karma >= forum.karma_dofollow"><span t-field="user.partner_id.website_description" class="oe_no_empty"/></div>
1100 <div t-if="user.karma < forum.karma_dofollow"><span t-field="user.partner_id.website_description" class="oe_no_empty" t-field-options='{"nofollow": 1}'/></div>
1101 <t t-if="uid == user.id">
1102 <a class="fa fa-arrow-right" t-attf-href="/forum/#{slug(forum)}/user/#{slug(user)}/edit"> Edit Your Bio</a>
1108 <ul class="nav nav-tabs">
1110 <a href="#questions" data-toggle="tab"><t t-esc="count_questions"/> Questions</a>
1113 <a href="#answers" data-toggle="tab"><t t-esc="count_answers"/> Answers</a>
1115 <li t-if="uid == user.id">
1116 <a href="#favourite_question" data-toggle="tab"><t t-esc="len(favourite)"/> Favourite Questions</a>
1118 <li t-if="uid == user.id">
1119 <a href="#followed_question" data-toggle="tab"><t t-esc="len(followed)"/> Followed Questions</a>
1121 <li t-if="uid == user.id">
1122 <a href="#activity" data-toggle="tab">Activity</a>
1125 <a href="#badges" data-toggle="tab">Badges</a>
1127 <li t-if="uid == user.id">
1128 <a href="#votes" data-toggle="tab">Votes</a>
1131 <div class="tab-content mt16">
1132 <div class="tab-pane active" id="questions">
1133 <div class="mb16" t-foreach="questions" t-as="question">
1134 <t t-call="website_forum.display_post"/>
1136 </div><div class="tab-pane" id="answers">
1137 <div t-foreach="answers" t-as="answer">
1138 <t t-call="website_forum.display_post_answer"/>
1141 <div class="tab-pane" id="karma">
1144 <div class="tab-pane" id="badges">
1145 <t t-call="website_forum.user_badges"/>
1147 <div class="tab-pane" id="favourite_question" t-if="uid == user.id">
1148 <div t-foreach="favourite" t-as="question">
1149 <t t-call="website_forum.display_post"/>
1152 <div class="tab-pane" id="followed_question" t-if="uid == user.id">
1153 <div t-foreach="followed" t-as="question" class="mb16">
1154 <t t-call="website_forum.display_post"/>
1157 <div class="tab-pane" id="votes" t-if="uid == user.id">
1158 <t t-call="website_forum.user_votes"/>
1160 <div class="tab-pane" id="activity" t-if="uid == user.id">
1161 <ul class="list-unstyled">
1162 <li t-foreach="activities" t-as="activity">
1163 <span t-field="activity.date" t-field-options='{"format": "short"}'/>
1164 <span t-esc="activity.subtype_id.name" class="label label-info"/>
1165 <t t-set="post" t-value="posts[activity.res_id]"/>
1166 <span t-if="post[1]">
1167 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(post[0]) }#answer-#{ str(post[1].id) }">
1168 <span t-esc="post[0].name"/>
1171 <span t-if="not post[1]">
1172 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(post[0]) }">
1173 <span t-esc="post[0].name"/>
1183 <template id="user_badges">
1184 <table class="table mt32 mb64">
1185 <tr t-foreach="user.badge_ids" t-as="badge">
1187 <a t-attf-href="/forum/#{ slug(forum) }/badge/#{ slug(badge.badge_id) }" class="badge pull-left">
1188 <span t-if="badge.badge_id.level == 'gold'" class="fa fa-circle badge-gold"/>
1189 <span t-if="badge.badge_id.level == 'silver'" class="fa fa-circle badge-silver"/>
1190 <span t-if="badge.badge_id.level == 'bronze'" class="fa fa-circle badge-bronze"/>
1191 <span t-field="badge.badge_id.name"/>
1194 <b t-esc="badge.badge_id.stat_count_distinct"/>
1195 <i class="text-muted">awarded users</i>
1197 <span t-field="badge.badge_id.description"/>
1201 <div class="mb16" t-if="not user.badge_ids">
1202 <b>No badge yet!</b><br/>
1203 <a t-attf-href="/forum/#{ slug(forum) }/badge" class="fa fa-arrow-right"> Check available badges</a>
1207 <template id="user_votes">
1208 <div t-foreach="vote_post" t-as="vote">
1209 <t t-esc="vote.post_id.create_date"/>
1210 <span t-if="vote.vote == '1'" class="fa fa-thumbs-up text-success" style="margin-left:30px"/>
1211 <span t-if="vote.vote == '-1'" class="fa fa-thumbs-down text-warning" style="margin-left:30px"/>
1212 <t t-if="vote.post_id.parent_id">
1213 <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"/>
1215 <t t-if="not vote.post_id.parent_id">
1216 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ vote.post_id.id }" style=" color:black;margin-left:10px" t-esc="vote.post_id.name"/>
1219 <div class="mb16" t-if="not vote_post">
1220 <b>No vote given by you yet!</b>
1224 <!-- User Navbar -->
1225 <template id="content_new_forum" inherit_id="website.user_navbar" groups="base.group_user">
1226 <xpath expr="//ul[@id='oe_systray']/li/ul[@class='dropdown-menu oe_content_menu']" position="inside">
1227 <li><a href="#" data-action="new_forum">New Forum</a></li>