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 desc' and 'active' or '' ">
73 <a t-attf-href="/forum/#{ slug(forum) }?{{ keep_query( 'search', 'post_type', 'filters', sorting='relevancy desc') }}">Trending</a>
75 <li t-att-class="sorting == 'create_date desc' and 'active' or '' ">
76 <a t-attf-href="/forum/#{ slug(forum) }?{{ keep_query( 'search', 'post_type', 'filters', sorting='create_date desc') }}">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')" t-attf-class="btn-group btn-block mb16 #{user.karma >= forum.karma_ask and '' or 'karma_required'}" t-attf-data-karma="#{forum.karma_ask}">
115 <a type="button" class="btn btn-primary btn-lg col-sm-10" t-attf-href="/forum/#{slug(forum)}/#{forum.default_allow}">
116 <t t-if="forum.default_allow == 'ask_question'">Ask a Question</t>
117 <t t-if="forum.default_allow == 'post_link'">Submit a Post</t>
118 <t t-if="forum.default_allow == 'post_discussion'">New Discussion</t>
120 <button type="button" class="btn btn-primary btn-lg col-sm-2 dropdown-toggle" data-toggle="dropdown">
121 <span class="caret"></span>
122 <span class="sr-only">Select Post</span>
124 <ul class="dropdown-menu" role="menu">
125 <li t-if="forum.allow_link"><a t-attf-href="/forum/#{slug(forum)}/post_link">Submit a Post</a></li>
126 <li t-if="forum.allow_question"><a t-attf-href="/forum/#{slug(forum)}/ask_question">Ask a Question</a></li>
127 <li t-if="forum.allow_discussion"><a t-attf-href="/forum/#{slug(forum)}/post_discussion">Launch a Discussion</a></li>
130 <div class="panel panel-default">
131 <div class="panel-heading">
132 <h3 class="panel-title">Keep Informed</h3>
134 <div class="panel-body">
135 <t t-call="website_mail.follow">
136 <t t-set="email" t-value="user.email"/>
137 <t t-set="object" t-value="forum"/>
141 <div class="panel panel-default" id="about_forum">
142 <div class="panel-heading">
143 <h3 class="panel-title">About This Community</h3>
145 <div class="panel-body">
146 <t t-raw="forum.description"/>
147 <a t-if="not header.get('is_guidelines')" t-attf-href="/forum/#{slug(forum)}/faq" class="fa fa-arrow-right"> Read Guidelines</a>
148 <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>
151 <div t-if="header.get('question_data')">
152 <div class="panel panel-default">
153 <div class="panel-heading text-center">
154 <h3 class="panel-title">Question tools</h3>
156 <div class="panel-body text-center">
157 <t t-call="website_mail.follow"><t t-set="object" t-value="question"/></t>
159 <strong><t t-raw="len(question.message_follower_ids)"/></strong> follower(s)
162 <div class="panel-heading text-center">
163 <h3 class="panel-title ">Stats</h3>
165 <div class="panel-body">
166 <table class="table">
167 <thead><tr><td> Asked: <strong><span t-field="question.create_date" t-field-options='{"format":"short"}'/></strong></td></tr></thead>
168 <tr><td> Seen: <strong><t t-raw="question.views"/></strong>
169 <span t-if="question.views>1">times</span>
170 <span t-if="question.views<=1">time</span>
172 <tr><td> Last updated: <strong><span t-field="question.write_date" t-field-options='{"format":"short"}'/></strong></td></tr>
180 <div class="oe_structure"/>
184 <!-- Display a post -->
185 <template id="display_post">
186 <div class="question row">
187 <div class="col-md-2 hidden-xs text-center">
188 <t t-call="website_forum.vote">
189 <t t-set="post" t-value="question"/>
192 <div class="col-md-10 clearfix">
193 <div class="question-name">
194 <t t-if="question.type == 'link'">
195 <a t-att-href="question.content_link" t-raw="question.name"/>
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 label #{tag and tag.name == question_tag.name and 'label-primary' or 'label-default'}" t-field="question_tag.name"
206 style="margin-right: 4px;"/>
209 <small class="text-muted">
210 By <span t-field="question.create_uid" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}' style="display: inline-block;"/>
211 • <span t-field="question.write_date" t-field-options='{"format":"short"}'/>
212 • <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }">
213 <t t-esc="question.child_count"/>
214 <t t-if="question.child_count>1">comments</t>
215 <t t-if="question.child_count<=1">comment</t>
222 <!-- Display a post as an answer -->
223 <template id="display_post_answer">
224 <div class="clearfix">
225 <div t-attf-class="pull-left text-center mb16 box #{len(answer.vote_ids) and 'oe_green' or 'oe_grey'}">
226 <div t-esc="len(answer.vote_ids)"/>
228 <div class="question-name" style="margin-left: 32px;">
229 <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"/>
230 <t t-if="len(answer.website_message_ids)>0">
231 (<t t-esc="len(answer.website_message_ids)"/>
232 <t t-if="len(answer.website_message_ids)>1">Comments</t>
233 <t t-if="len(answer.website_message_ids)<=1">Comment</t>)
241 <t t-call="website_forum.header">
242 <div t-field="forum.faq"/>
246 <!-- All Forums Layout -->
247 <template id="forum_all">
248 <t t-call="website.layout">
249 <div class="container">
250 <h1 class="mb32">Our forums</h1>
252 <div t-foreach="forums" t-as="forum" class="col-sm-3 text-center mb32">
253 <a t-attf-href="/forum/#{ slug(forum) }">
254 <div class="fa fa-5x fa-comment mb16"/>
255 <div t-field="forum.name"/>
263 <!-- Specific Forum Layout -->
264 <template id="forum_index" name="Forum">
265 <t t-call="website_forum.header">
266 <h2 class="page-header mt0">
267 <t t-esc="question_count"/>
268 <span t-if="post_type == 'all'">Posts</span>
269 <span t-if="post_type == 'question'">Questions</span>
270 <span t-if="post_type == 'link'">Posts</span>
271 <span t-if="post_type == 'discussion'">Discussions</span>
273 <small class="dropdown" t-if="filters in ('all', 'unanswered','followed', 'tag')">
274 <a href="#" class="dropdown-toggle" data-toggle="dropdown">
275 <t t-if="filters == 'unanswered'">Unanswered</t>
276 <t t-if="filters == 'followed'">Followed</t>
277 <t t-if="tag"><span t-field="tag.name"/></t>
278 <t t-if="sorting == 'relevancy desc'"> by relevancy</t>
279 <t t-if="sorting == 'write_date desc'"> by activity date</t>
280 <t t-if="sorting == 'create_date desc'"> by newest</t>
281 <t t-if="sorting == 'child_count desc'"> by most answered</t>
282 <t t-if="sorting == 'vote_count desc'"> by most voted</t>
285 <ul class="dropdown-menu">
286 <li class="dropdown-header">Filter on</li>
287 <li t-att-class="filters == 'all' and 'active' or '' ">
288 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='all')">All</a>
290 <li t-att-class="filters == 'unanswered' and 'active' or '' ">
291 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='unanswered')">Unanswered</a>
293 <li t-if="uid" t-att-class="filters == 'followed' and 'active' or '' ">
294 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='followed')">Followed</a>
296 <li class="dropdown-header">Tags</li>
297 <li t-if="tag" t-att-class="tag and 'active' or '' ">
298 <a href=""><t t-esc="tag.name"/></a>
300 <li class="dropdown-header">Sort by</li>
301 <li t-att-class="sorting == 'relevancy desc' and 'active' or '' ">
302 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='relevancy desc')">Relevancy</a>
304 <li t-att-class="sorting == 'write_date desc' and 'active' or '' ">
305 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='write_date desc')">Last activity date</a>
307 <li t-att-class="sorting == 'create_date desc' and 'active' or '' ">
308 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='create_date desc')">Newest</a>
310 <li t-att-class="sorting == 'child_count desc' and 'active' or '' ">
311 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='child_count desc')">Most answered</a>
313 <li t-att-class="sorting == 'vote_count desc' and 'active' or '' ">
314 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='vote_count desc')">Most voted</a>
319 <div t-foreach="question_ids" t-as="question" class="mb16">
320 <t t-call="website_forum.display_post"/>
322 <t t-call="website.pager"/>
327 <t t-call="website_forum.header">
328 <div class="oe_structure oe_empty"/>
329 <h1 class="mt32">Question not found!</h1>
330 <p>Sorry, this question is not available anymore.</p>
332 <a t-attf-href="/forum">Return to the question list.</a>
337 <!-- Edition: Post Article -->
338 <template id="post_link">
339 <t t-call="website_forum.header">
340 <h1 class="mt0">Submit a Link</h1>
342 Share an awesome link. Your post will appear in the 'Newest' top-menu.
343 If the community vote on your post, it will get traction by being promoted
346 We keep a high level of quality in showcased posts, only 20% of the submited
347 posts will be featured.
349 <form t-attf-action="/forum/#{ slug(forum) }/link/new" method="post" role="form" class="tag_text form-horizontal">
350 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
351 <div class="form-group">
352 <label class="col-sm-2 control-label" for="content_link">URL to Share</label>
353 <div class="col-sm-8">
354 <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
355 class="form-control mb16 link_url" placeholder="e.g. https://www.odoo.com"/>
358 <div class="form-group">
359 <label class="col-sm-2 control-label" for="post_name">Post Title</label>
360 <div class="col-sm-8">
361 <input type="text" name="content" readonly="True" required="True" t-attf-value="#{content}"
362 class="form-control"/>
365 <div class="form-group">
366 <label class="col-sm-2 control-label" for="post_tags">Tags</label>
367 <div class="col-sm-8">
368 <input type="text" name="post_tags" readonly="True" class="form-control load_tags"/>
371 <div class="form-group">
372 <div class="col-sm-offset-2 col-sm-8">
373 <button class="btn btn-primary" disabled="True" id="btn_post_your_article">Post Your Article</button>
380 <!-- Edition: Post your Discussion Topic -->
381 <template id="post_discussion">
382 <t t-call="website_forum.header">
383 <h1 class="mt0">Post Your Discussion Topic</h1>
385 <b>Share</b> Start Something Awesome
387 <form t-attf-action="/forum/#{ slug(forum) }/discussion/new" method="post" role="form" class="tag_text">
388 <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
389 class="form-control mb16" placeholder="Your Discussion Title..."/>
390 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
391 <textarea name="content" id="content" required="True" class="form-control load_editor">
392 <t t-esc="question_content"/>
395 <input type="text" name="post_tags" placeholder="Tags" class="form-control load_tags"/>
397 <button class="btn btn-primary" id="btn_ask_your_question">Post Your Topic</button>
402 <!-- Edition: ask your question -->
403 <template id="ask_question">
404 <t t-call="website_forum.header">
405 <h1 class="mt0">Ask Your Question</h1>
407 To improve your chance getting an answer:
410 <li>Set a clear, explicit and concise question title
412 <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>
414 <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>
417 <li>Avoid unnecessary introductions (Hi,... Please... Thanks...),</li>
418 <li>Provide enough details and, if possible, give an example.</li>
420 <script type="text/javascript">
422 $("[data-toggle='popover']").popover();
425 <form t-attf-action="/forum/#{ slug(forum) }/question/new" method="post" role="form" class="tag_text">
426 <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
427 class="form-control mb16" placeholder="Your Question Title..."/>
428 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
429 <textarea name="content" required="True" id="content" class="form-control load_editor">
430 <t t-esc="question_content"/>
433 <input type="text" name="post_tags" placeholder="Tags" class="form-control load_tags"/>
435 <button t-attf-class="btn btn-primary #{(user.karma <= forum.karma_ask) and 'karma_required' or ''}"
436 id="btn_ask_your_question" t-att-data-karma="forum.karma_ask">Post Your Question</button>
441 <!-- Edition: edit a post -->
442 <template id="edit_post">
443 <t t-call="website_forum.header">
444 <h3 t-if="not is_answer">Edit <span t-field="post.type"/></h3>
445 <h3 t-if="is_answer">Edit reply</h3>
446 <form t-attf-action="/forum/#{slug(forum)}/post/#{slug(post)}/save" method="post" role="form" class="tag_text">
447 <div t-if="not is_answer">
448 <input type="text" name="post_name" required="True"
449 t-attf-value="#{post.name}" class="form-control mb8" placeholder="Edit your Post"/>
450 <h5 t-if="post.type == 'question'" class="mt20">Please enter a descriptive question (should finish by a '?')</h5>
452 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
453 <textarea name="content" id="content" required="True" class="form-control load_editor">
454 <t t-esc="post.content"/>
456 <div t-if="not is_answer">
458 <input type="text" name="post_tag" class="form-control col-md-9 load_tags" placeholder="Tags" t-attf-value="#{tags}"/>
461 <button class="btn btn-primary btn-lg">Save</button>
466 <!-- Moderation: close a post -->
467 <template id="close_post">
468 <t t-call="website_forum.header">
469 <h1 class="mt0">Close Post</h1>
470 <p class="text-muted">
471 If you close this post, it will be hidden for most users. Only
472 users having a high karma can see closed posts to moderate
475 <form t-attf-action="/forum/#{ slug(forum) }/question/#{slug(question)}/close" method="post" role="form" class="form-horizontal mt32 mb64">
476 <input name="post_id" t-att-value="question.id" type="hidden"/>
477 <div class="form-group">
478 <label class="col-md-3 control-label" for="reason">Post:</label>
479 <div class="col-md-8 mt8">
480 <span t-field="question.name"/>
483 <div class="form-group">
484 <label class="col-md-3 control-label" for="reason">Reason:</label>
485 <div class="col-md-8">
486 <select class="form-control" name="reason_id">
487 <t t-foreach="reasons or []" t-as="reason">
488 <option t-att-value="reason.id" t-att-selected="reason.id == question.closed_reason_id.id"><t t-esc="reason.name"/></option>
493 <div class="form-group">
494 <div class="col-md-offset-3 col-md-8">
495 <button class="btn btn-primary">Close post</button>
496 <span class="text-muted">or</span>
497 <a class="btn btn-link" t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }">back to post</a>
504 <!-- Edition: post a reply -->
505 <template id="post_reply">
506 <div class="css_editable_mode_hidden">
507 <form t-attf-id="reply#{ object._name.replace('.','') + '-' + str(object.id) }" class="collapse oe_comment_grey"
508 t-attf-action="/forum/#{ slug(forum) }/#{slug(object)}/reply" method="post" role="form">
509 <h3 class="mt10">Your Reply</h3>
510 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
511 <textarea name="content" t-attf-id="content-#{str(object.id)}" class="form-control load_editor" required="True"/>
512 <button class="btn btn-primary" id="btn_ask_your_question">Post Your Reply</button>
517 <!-- Edition: post an answer -->
518 <template id="post_answer">
519 <h3 class="mt10">Your Reply</h3>
520 <p t-if="question.type == 'question'">
521 <b>Please try to give a substantial answer.</b> If you wanted to comment on the question or answer, just
522 <b>use the commenting tool.</b> Please remember that you can always <b>revise your answers</b>
523 - no need to answer the same question twice. Also, please <b>don't forget to vote</b>
524 - it really helps to select the best questions and answers!
526 <form t-attf-action="/forum/#{ slug(forum) }/#{slug(question)}/reply" method="post" role="form">
527 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
528 <textarea name="content" t-attf-id="content-#{str(question.id)}" class="form-control load_editor" required="True"/>
529 <button t-attf-class="btn btn-primary mt16 #{not question.can_answer and 'karma_required' or ''}"
530 id="btn_ask_your_question" t-att-data-karma="question.karma_answer">Post Your Reply</button>
535 <div t-attf-class="box oe_grey">
536 <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 ''}"
537 t-attf-data-karma="#{post.user_vote == 1 and post.karma_downvote or post.karma_upvote}"
538 t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/upvote"/>
539 <span id="vote_count" t-esc="post.vote_count"/>
540 <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 ''}"
541 t-attf-data-karma="#{post.user_vote == -1 and post.karma_upvote or post.karma_downvote}"
542 t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/downvote"/>
543 <div t-if="vote_count > 1" class="subtitle">
546 <div t-if="vote_count < 2" class="subtitle">
552 <!-- Specific Post Layout -->
553 <template id="post_description_full" name="Question Navigation">
554 <t t-call="website_forum.header">
555 <div t-attf-class="row question">
556 <div class="col-md-2 hidden-xs text-center">
557 <t t-call="website_forum.vote">
558 <t t-set="post" t-value="question"/>
560 <div class="text-muted text-center">
561 <span t-field="question.views"/> Views
564 <a t-attf-data-href="/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
565 t-attf-class="favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}"/>
568 <div t-attf-class="col-md-10 #{not question.active and 'alert alert-danger' or ''}">
570 <t t-if="question.type == 'link'">
571 <a t-att-href="question.content_link" t-raw="question.name"/>
573 <t t-if="question.type in ('question', 'discussion')">
574 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
576 <span t-if="not question.active"><b> [Deleted]</b></span>
577 <span t-if="question.state == 'close'"><b> [Closed]</b></span>
579 <div class="alert alert-info text-center" t-if="question.state == 'close'">
581 <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>
583 <t t-if="question.closed_uid">
584 <b>by <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.closed_uid.id }"
585 t-field="question.closed_uid"
586 t-field-options='{"widget": "contact", "fields": ["name"]}'
587 style="display: inline-block;"/></b>
589 <b>on <span t-field="question.closed_date"/></b>
590 <div class="mt16 mb24 text-center">
591 <t t-call="website_forum.link_button">
592 <t t-set="url" t-value="'/forum/' + slug(forum) + '/question/' + slug(question) + '/reopen'"/>
593 <t t-set="label" t-value="'Reopen'"/>
594 <t t-set="classes" t-value="'fa-arrow-right'"/>
595 <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
599 <div t-if="question.type != 'link'"><t t-raw="question.content"/></div>
600 <div class="mt16 clearfix">
601 <div class="pull-right">
602 <div class="text-right">
603 <t t-foreach="question.tag_ids" t-as="tag">
604 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ tag.id }/questions" class="label lebel-default" t-field="tag.name"/>
607 <ul class="list-inline" id="options">
608 <li t-if="question.type == 'question'">
609 <a style="cursor: pointer" t-att-data-toggle="question.can_comment and 'collapse' or ''"
610 t-attf-class="fa fa-comment-o #{not question.can_comment and 'karma_required text-muted' or ''}"
611 t-attf-data-karma="#{not question.can_comment and question.karma_comment or 0}"
612 t-attf-data-target="#comment#{ question._name.replace('.','') + '-' + str(question.id) }">
616 <li t-if="question.state != 'close'">
617 <t t-call="website_forum.link_button">
618 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/ask_for_close'"/>
619 <t t-set="label" t-value="'Close'"/>
620 <t t-set="classes" t-value="'fa-times'"/>
621 <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
624 <li t-if="question.state == 'close'">
625 <t t-call="website_forum.link_button">
626 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/reopen'"/>
627 <t t-set="label" t-value="'Reopen'"/>
628 <t t-set="classes" t-value="'fa-undo'"/>
629 <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
633 <t t-call="website_forum.link_button">
634 <t t-set="url" t-value="'/forum/' + slug(forum) +'/post/' + slug(question) + '/edit'"/>
635 <t t-set="label" t-value="'Edit'"/>
636 <t t-set="classes" t-value="'fa-edit'"/>
637 <t t-set="karma" t-value="not question.can_edit and question.karma_edit or 0"/>
640 <li t-if="question.active">
641 <t t-call="website_forum.link_button">
642 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/delete'"/>
643 <t t-set="label" t-value="'Delete'"/>
644 <t t-set="classes" t-value="'fa-trash-o'"/>
645 <t t-set="karma" t-value="not question.can_unlink and question.karma_unlink or 0"/>
648 <li t-if="not question.active">
649 <t t-call="website_forum.link_button">
650 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/undelete'"/>
651 <t t-set="label" t-value="'Undelete'"/>
652 <t t-set="classes" t-value="'fa-trash-o'"/>
653 <t t-set="karma" t-value="not question.can_unlink and question.karma_unlink or 0"/>
659 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{question.create_uid.id}/avatar"/>
661 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
662 t-field="question.create_uid"
663 t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
664 style="display: inline-block;"/>
665 <div t-field="question.create_uid" t-field-options='{"widget": "contact", "badges": true, "fields": ["karma"]}'/>
666 <span class="text-muted">Asked on <span t-field="question.create_date" t-field-options='{"format":"short"}'/></span>
669 <div class="visible-xs text-center">
670 <t t-call="website_forum.vote">
671 <t t-set="post" t-value="question"/>
673 <div class="text-muted text-center">
674 <span t-field="question.views"/> Views
677 <a t-attf-data-href="/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
678 t-attf-class="favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}"/>
682 <t t-call="website_forum.post_comment">
683 <t t-set="object" t-value="question"/>
688 <div t-foreach="question.child_ids" t-as="post_answer" class="mt16 mb32">
689 <t t-call="website_forum.post_answers">
690 <t t-set="answer" t-value="post_answer"/>
693 <div t-if="question.type != 'question' or question.type == 'question' and not question.uid_has_answered and question.state != 'close' and question.active != False">
694 <t t-call="website_forum.post_answer"/>
696 <div t-if="question.type == 'question' and question.uid_has_answered" class="mb16">
697 <a class="btn btn-primary" t-attf-href="/forum/#{slug(forum)}/question/#{slug(question)}/edit_answer">Edit Your Previous Answer</a>
698 <span class="text-muted">(only one answer per question is allowed)</span>
703 <template id="post_answers">
704 <a t-attf-id="answer-#{str(answer.id)}"/>
705 <div t-attf-class="forum_answer row" t-attf-id="answer_#{answer.id}" >
706 <div class="col-md-2 hidden-xs text-center">
707 <t t-call="website_forum.vote">
708 <t t-set="post" t-value="answer"/>
710 <div t-if="question.type == 'question'" class="text-muted mt8">
711 <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 ''}"
712 t-attf-data-karma="#{answer.karma_accept}"
713 t-attf-data-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
716 <div class="col-md-10 clearfix">
717 <t t-raw="answer.content"/>
719 <ul class="list-inline pull-right">
720 <li t-if="question.type == 'question'">
721 <a t-attf-class="fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
722 t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
723 style="cursor: pointer" t-att-data-toggle="answer.can_comment and 'collapse' or ''"
724 t-attf-data-target="#comment#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Comment
727 <li t-if="question.type != 'question' and not answer.parent_id or answer.parent_id and not answer.parent_id.parent_id">
728 <a t-attf-class="fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
729 t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
730 style="cursor: pointer" data-toggle="collapse"
731 t-attf-data-target="#reply#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Reply
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.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 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{answer.create_uid.id}/avatar"/>
761 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ answer.create_uid.id }"
762 t-field="answer.create_uid"
763 t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
764 style="display: inline-block;"/>
765 <div t-field="answer.create_uid" t-field-options='{"widget": "contact", "badges": true, "fields": ["karma"]}'/>
766 <span class="text-muted">Answered on <span t-field="answer.create_date" t-field-options='{"format":"short"}'/></span>
768 <div class="visible-xs text-center">
769 <t t-call="website_forum.vote">
770 <t t-set="post" t-value="answer"/>
772 <div class="text-muted mt8">
773 <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 ''}"
774 t-attf-data-karma="#{answer.karma_accept}"
775 t-attf-data-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
779 <t t-if="answer.type == 'question'" t-call="website_forum.post_comment">
780 <t t-set="object" t-value="answer"/>
782 <div t-if="answer.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="mt16 mb16">
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 <span t-field="message.body"/>
811 <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"/>
812 <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)">
813 <t t-set="allow_post_comment" t-value="True" />
815 <t t-if="allow_post_comment">
816 <t t-call="website_forum.link_button" >
817 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(object) + '/comment/' + slug(message) + '/convert_to_answer'"/>
818 <t t-set="label" t-value="'Convert as an answer'"/>
819 <t t-set="karma" t-value="user.karma<required_karma and required_karma or 0"/>
820 <t t-set="classes" t-value="'fa-magic pull-right'"/>
823 <a t-attf-href="/forum/#{slug(forum)}/partner/#{message.author_id.id}"
824 t-field="message.author_id" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
825 style="display: inline-block;"/>
826 on <span t-field="message.date" t-field-options='{"format":"short"}'/>
829 <div class="css_editable_mode_hidden">
830 <form t-attf-id="comment#{ object._name.replace('.','') + '-' + str(object.id) }" class="collapse oe_comment_grey"
831 t-attf-action="/forum/#{slug(forum)}/post/#{slug(object)}/comment" method="POST">
832 <input name="post_id" t-att-value="object.id" type="hidden" class="mt8"/>
833 <textarea name="comment" class="form-control" placeholder="Comment this post..."/>
834 <button type="submit" class="btn btn-primary mt8">Post</button>
842 <t t-call="website_forum.header">
846 <p class="text-muted">
847 A tag is a label that categorizes your question with other,
848 similar questions. Using the right tags makes it easier for
849 others to find and answer your question.
852 <div class="col-sm-3 mt16" t-foreach="tags" t-as="tag">
853 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ slug(tag) }/questions?{{ keep_query( filters='tag') }}" class="label label-default">
854 <span t-field="tag.name"/>
857 X <t t-esc="tag.posts_count"/>
864 <template id="badge">
865 <t t-call="website_forum.header">
870 Besides gaining reputation with your questions and answers,
871 you receive badges for being especially helpful. Badges
872 appear on your profile page, and your posts.
874 <table class="table mt32 mb64">
875 <tr t-foreach="badges" t-as="badge">
877 <a t-attf-href="/forum/#{ slug(forum) }/badge/#{ slug(badge) }" class="badge pull-left">
878 <span t-if="badge.level == 'gold'" class="fa fa-circle badge-gold"/>
879 <span t-if="badge.level == 'silver'" class="fa fa-circle badge-silver"/>
880 <span t-if="badge.level == 'bronze'" class="fa fa-circle badge-bronze"/>
881 <span t-field="badge.name"/>
884 <b t-esc="badge.stat_count_distinct"/>
885 <i class="text-muted">awarded users</i>
887 <span t-field="badge.description"/>
894 <template id="badge_user">
895 <t t-call="website_forum.header">
896 <h3 class="mt32 mb32">
897 <b>Badge "<span t-field="badge.name"/>"</b>
900 <div class="pull-left badge">
901 <span t-if="badge.level == 'gold'" class="fa fa-circle badge-gold"/>
902 <span t-if="badge.level == 'silver'" class="fa fa-circle badge-silver"/>
903 <span t-if="badge.level == 'bronze'" class="fa fa-circle badge-bronze"/>
904 <span t-field="badge.name"/>
906 <span t-field="badge.description" style="margin-left:20px"/>
909 <t class="pull-left" t-esc="badge.stat_count_distinct"/>
910 <span t-if="badge.stat_count_distinct>1">users</span>
911 <span t-if="badge.stat_count_distinct<=1">user</span>
915 <div class="col-sm-3 mt16" t-foreach="users" t-as="user">
916 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{user.id}/avatar"/>
918 <a t-attf-href="/forum/#{slug(forum)}/user/#{user.id}" t-field="user.name"/>
925 <template id="users">
926 <t t-call="website_forum.header">
927 <div t-foreach="users" t-as="row_users" class="row mt16">
928 <div t-foreach="row_users" t-as="user" class="col-sm-4">
929 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{user.id}/avatar"/>
931 <a t-attf-href="/forum/#{slug(forum)}/user/#{user.id}" t-field="user.name"/>
932 <t t-if="user.country_id">
933 <span t-field="user.country_id.image" t-field-options='{"widget": "image", "class": "country_flag"}'/>
935 <b><t t-esc="user.karma"/></b>
936 <t t-raw="separator"/>
939 <span class="fa fa-circle badge-gold"/>
940 <t t-esc="user.gold_badge"/>
941 <span class="fa fa-circle badge-silver"/>
942 <t t-esc="user.silver_badge"/>
943 <span class="fa fa-circle badge-bronze"/>
944 <t t-esc="user.bronze_badge"/>
950 <div class="pull-left">
951 <t t-call="website.pager"/>
956 <!--Private profile-->
957 <template id="private_profile">
958 <t t-call="website_forum.header">
959 <h1 class="mt32">This profile is private!</h1>
961 <a t-attf-href="/forum/#{slug(forum)}">Return to the question list.</a>
966 <template id="edit_profile">
967 <t t-call="website_forum.header">
968 <h3>Edit Profile</h3>
970 <div class="col-md-2">
971 <img class="img img-responsive img-circle" t-attf-src="/forum/user/#{user.id}/avatar"/>
973 <div class="col-md-10">
974 <form t-attf-action="/forum/#{slug(forum)}/user/#{slug(user)}/save" method="post" role="form" class="form-horizontal">
975 <input name="user_id" t-att-value="user.id" type="hidden"/>
976 <div class="form-group">
977 <label class="col-md-2 control-label mb16" for="user_name">Real name</label>
978 <div class="col-md-8 mb16">
979 <input type="text" class="form-control" name="name" id="user_name" required="True" t-attf-value="#{user.name}"/>
982 <div class="form-group">
983 <label class="col-md-2 control-label mb16" for="user_website_published" t-if="user.id == uid">Public profile</label>
984 <div class="col-md-8 mb16" t-if="user.id == uid">
985 <input type="checkbox" class="mt8" name="website_published" id="user_website_published" value="True" t-if="not user.website_published"/>
986 <input type="checkbox" class="mt8" name="website_published" id="user_website_published" value="True" checked="checked" t-if="user.website_published"/>
989 <div class="form-group">
990 <label class="col-md-2 control-label mb16" for="user_website">Website</label>
991 <div class="col-md-8 mb16">
992 <input type="text" class="form-control" name="website" id="user_website" t-attf-value="#{user.partner_id.website or ''}"/>
995 <div class="form-group">
996 <div t-if="email_required" class="alert alert-danger alert-dismissable oe_forum_email_required">
997 <button type="button" class="close" data-dismiss="alert">x</button>
998 <p>Please enter a valid email address in order to receive notifications from answers or comments.</p>
1000 <label class="col-md-2 control-label mb16" for="user_email">Email</label>
1001 <div class="col-md-8 mb16">
1002 <input type="text" class="form-control" name="email" id="user_email" required="True" t-attf-value="#{user.partner_id.email}"/>
1005 <div class="form-group">
1006 <label class="col-md-2 control-label mb16" for="user_city">City</label>
1007 <div class="col-md-8 mb16">
1008 <input type="text" class="form-control" name="city" id="user_city" t-attf-value="#{user.partner_id.city or ''}"/>
1011 <div class="form-group">
1012 <label class="col-md-2 control-label mb16">Country</label>
1013 <div class="col-md-8 mb16">
1014 <select class="form-control" name="country">
1015 <option value="">Country...</option>
1016 <t t-foreach="countries or []" t-as="country">
1017 <option t-att-value="country.id" t-att-selected="country.id == user.partner_id.country_id.id"><t t-esc="country.name"/></option>
1022 <!--Note: using website_description fiels instead of using commnt firld of partner-->
1023 <div class="form-group">
1024 <label class="col-md-2 control-label mb16" for="description">Biography</label>
1025 <div class="col-md-8 mb16">
1026 <textarea name="description" id="description" style="min-height: 120px" required="True"
1027 class="form-control load_editor"><t t-esc="user.partner_id.website_description"/></textarea>
1030 <div class="col-sm-offset-2 col-md-2 mb16">
1031 <button class="btn btn-primary btn-lg">Update</button>
1036 <script type="text/javascript">
1037 CKEDITOR.replace("description");
1042 <template id="user_detail_full">
1043 <t t-call="website_forum.header">
1044 <h1 class="mt0 page-header">
1045 <span t-field="user.name"/>
1046 <small>profile</small>
1047 <t t-call="website.publish_management" groups="base.group_website_publisher">
1048 <t t-set="object" t-value="user"/>
1052 <div class="col-sm-2">
1053 <img class="img img-responsive img-circle" t-attf-src="/forum/user/#{user.id}/avatar"/>
1055 <div class="col-sm-10">
1056 <table class="table table-condensed">
1058 <td rowspan="2" valign="top"><span class="text-muted">contributions</span></td>
1059 <td>member since</td>
1060 <td><span t-field="user.create_date" t-field-options='{"format": "short"}'/></td>
1062 <td>last connection</td>
1063 <td><span t-field="user.login_date" t-field-options='{"format": "short"}'/></td>
1066 <td rowspan="2" valign="top"><span class="text-muted">bio</span></td>
1069 <a t-att-href="user.website" t-if="user.website">
1070 <span t-field="user.website"/>
1076 <span t-field="user.city"/>
1077 <span t-if="user.city and user.country_id">, </span>
1078 <span t-field="user.country_id"/>
1079 <t t-if="user.country_id"> <span t-field="user.country_id.image" t-field-options='{"widget": "image", "class": "country_flag"}'/></t>
1084 <td rowspan="2" valign="top"><span class="text-muted">stats</span></td>
1086 <td><span t-field="user.karma"/></td>
1090 <span class="fa fa-thumbs-up"/>
1091 <span t-esc="up_votes"/>
1092 <span class="fa fa-thumbs-down"/>
1093 <span t-esc="down_votes"/>
1097 <div class="well well-sm">
1098 <span t-field="user.partner_id.website_description" class="oe_no_empty"/>
1099 <t t-if="uid == user.id">
1100 <a class="fa fa-arrow-right" t-attf-href="/forum/#{slug(forum)}/user/#{slug(user)}/edit"> Edit Your Bio</a>
1106 <ul class="nav nav-tabs">
1108 <a href="#questions" data-toggle="tab"><t t-esc="count_questions"/> Questions</a>
1111 <a href="#answers" data-toggle="tab"><t t-esc="count_answers"/> Answers</a>
1113 <li t-if="uid == user.id">
1114 <a href="#favourite_question" data-toggle="tab"><t t-esc="len(favourite)"/> Favourite Questions</a>
1116 <li t-if="uid == user.id">
1117 <a href="#followed_question" data-toggle="tab"><t t-esc="len(followed)"/> Followed Questions</a>
1119 <li t-if="uid == user.id">
1120 <a href="#activity" data-toggle="tab">Activity</a>
1123 <a href="#badges" data-toggle="tab">Badges</a>
1125 <li t-if="uid == user.id">
1126 <a href="#votes" data-toggle="tab">Votes</a>
1129 <div class="tab-content mt16">
1130 <div class="tab-pane active" id="questions">
1131 <div class="mb16" t-foreach="questions" t-as="question">
1132 <t t-call="website_forum.display_post"/>
1134 </div><div class="tab-pane" id="answers">
1135 <div t-foreach="answers" t-as="answer">
1136 <t t-call="website_forum.display_post_answer"/>
1139 <div class="tab-pane" id="karma">
1142 <div class="tab-pane" id="badges">
1143 <t t-call="website_forum.user_badges"/>
1145 <div class="tab-pane" id="favourite_question" t-if="uid == user.id">
1146 <div t-foreach="favourite" t-as="question">
1147 <t t-call="website_forum.display_post"/>
1150 <div class="tab-pane" id="followed_question" t-if="uid == user.id">
1151 <div t-foreach="followed" t-as="question" class="mb16">
1152 <t t-call="website_forum.display_post"/>
1155 <div class="tab-pane" id="votes" t-if="uid == user.id">
1156 <t t-call="website_forum.user_votes"/>
1158 <div class="tab-pane" id="activity" t-if="uid == user.id">
1159 <ul class="list-unstyled">
1160 <li t-foreach="activities" t-as="activity">
1161 <span t-field="activity.date" t-field-options='{"format": "short"}'/>
1162 <span t-esc="activity.subtype_id.name" class="label label-info"/>
1163 <t t-set="post" t-value="posts[activity.res_id]"/>
1164 <span t-if="post[1]">
1165 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(post[0]) }#answer-#{ str(post[1].id) }">
1166 <span t-esc="post[0].name"/>
1169 <span t-if="not post[1]">
1170 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(post[0]) }">
1171 <span t-esc="post[0].name"/>
1181 <template id="user_badges">
1182 <table class="table mt32 mb64">
1183 <tr t-foreach="user.badge_ids" t-as="badge">
1185 <a t-attf-href="/forum/#{ slug(forum) }/badge/#{ slug(badge.badge_id) }" class="badge pull-left">
1186 <span t-if="badge.badge_id.level == 'gold'" class="fa fa-circle badge-gold"/>
1187 <span t-if="badge.badge_id.level == 'silver'" class="fa fa-circle badge-silver"/>
1188 <span t-if="badge.badge_id.level == 'bronze'" class="fa fa-circle badge-bronze"/>
1189 <span t-field="badge.badge_id.name"/>
1192 <b t-esc="badge.badge_id.stat_count_distinct"/>
1193 <i class="text-muted">awarded users</i>
1195 <span t-field="badge.badge_id.description"/>
1199 <div class="mb16" t-if="not user.badge_ids">
1200 <b>No badge yet!</b><br/>
1201 <a t-attf-href="/forum/#{ slug(forum) }/badge" class="fa fa-arrow-right"> Check available badges</a>
1205 <template id="user_votes">
1206 <div t-foreach="vote_post" t-as="vote">
1207 <t t-esc="vote.post_id.create_date"/>
1208 <span t-if="vote.vote == '1'" class="fa fa-thumbs-up text-success" style="margin-left:30px"/>
1209 <span t-if="vote.vote == '-1'" class="fa fa-thumbs-down text-warning" style="margin-left:30px"/>
1210 <t t-if="vote.post_id.parent_id">
1211 <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"/>
1213 <t t-if="not vote.post_id.parent_id">
1214 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ vote.post_id.id }" style=" color:black;margin-left:10px" t-esc="vote.post_id.name"/>
1217 <div class="mb16" t-if="not vote_post">
1218 <b>No vote given by you yet!</b>
1222 <!-- User Navbar -->
1223 <template id="content_new_forum" inherit_id="website.user_navbar" groups="base.group_user">
1224 <xpath expr="//ul[@id='oe_systray']/li/ul[@class='dropdown-menu oe_content_menu']" position="inside">
1225 <li><a href="#" data-action="new_forum">New Forum</a></li>