1 <?xml version="1.0" encoding="utf-8"?>
6 <template id="assets_editor" inherit_id="website.assets_editor" name="Forum Editor Assets" groups="base.group_user">
7 <xpath expr="." position="inside">
8 <link rel='stylesheet' href="/website_forum/static/src/css/website_forum.css"/>
9 <script type="text/javascript" src="/website_forum/static/src/js/website.tour.forum.js"/>
10 <script type="text/javascript" src="/website_forum/static/src/js/website_forum.editor.js"/>
14 <template id="assets_forum" name="Forum Assets">
15 <link rel='stylesheet' href="/web/static/lib/jquery.textext/jquery.textext.css"/>
16 <link rel='stylesheet' href='/website_forum/static/src/css/website_forum.css'/>
18 <script type="text/javascript" src="/website_forum/static/src/js/website_forum.js"/>
19 <script type="text/javascript" src="/web/static/lib/jquery.textext/jquery.textext.js"/>
20 <script type="text/javascript" src="/web/static/lib/ckeditor/ckeditor.js"/>
21 <script type="text/javascript">
22 CKEDITOR.config.toolbar = [['Bold','Italic','Underline','Strike'],['NumberedList','BulletedList', 'Blockquote']
23 ,['Outdent','Indent','Link','Unlink','Image'],] ;
27 <!-- Layout add nav and footer -->
28 <template id="header_footer_custom" inherit_id="website.footer_default"
29 name="Footer Questions Link">
30 <xpath expr="//ul[@id='products']" position="inside">
31 <li><a t-attf-href="/forum/%(website_forum.forum_help)d">Q&A</a></li>
32 <li><a href="/forum">Forums</a></li>
37 <template id="link_button">
38 <form method="POST" t-att-action="url">
39 <button t-attf-class="fa btn-link #{classes} #{karma and 'karma_required text-muted' or ''}" t-attf-data-karma="#{karma}">
40 <t t-esc="label"/></button>
45 <template id="header" name="Forum Index">
46 <t t-call="website.layout">
48 <t t-call-assets="website_forum.assets_forum"/>
50 <div t-if="is_public_user and not no_introduction_message" class="alert alert-success alert-dismissable">
51 <div class="container">
52 <div t-field="forum.introduction_message"/>
53 <a class='btn btn-primary' t-attf-href="/web?redirect=#{ request.httprequest.url }">Register</a>
54 <button type="button" class="btn btn-link js_close_intro" data-dismiss="alert" aria-hidden="true">Hide Intro</button>
57 <div class="container mt16 website_forum">
58 <div class="navbar navbar-default">
59 <div class="navbar-header">
60 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#oe-help-navbar-collapse">
61 <span class="sr-only">Toggle navigation</span>
62 <span class="icon-bar"></span>
63 <!-- <span class="icon-bar"></span> -->
64 <span class="icon-bar"></span>
66 <a class="navbar-brand" t-attf-href="/forum/#{slug(forum)}">
67 <span t-field="forum.name"/>
70 <div class="collapse navbar-collapse" id="oe-help-navbar-collapse">
71 <ul class="nav navbar-nav">
72 <li t-att-class="sorting == 'relevancy' and 'active' or '' ">
73 <a t-attf-href="/forum/#{ slug(forum) }?{{ keep_query( 'search', 'post_type', 'filters', sorting='relevancy') }}">Trending</a>
75 <li t-att-class="sorting == 'creation' and 'active' or '' ">
76 <a t-attf-href="/forum/#{ slug(forum) }?{{ keep_query( 'search', 'post_type', 'filters', sorting='creation') }}">Newest</a>
78 <li t-att-class="searches.get('users') and 'active' or '' ">
79 <a t-attf-href="/forum/#{ slug(forum) }/users">People</a>
81 <li t-att-class="searches.get('tags') and 'active' or '' ">
82 <a t-attf-href="/forum/#{ slug(forum) }/tag">Tags</a>
84 <li t-att-class="searches.get('badges') and 'active' or '' ">
85 <a t-attf-href="/forum/#{ slug(forum) }/badge">Badges</a>
87 <li t-if="not is_public_user" t-att-class="searches.get('my_profile') and 'active' or '' ">
88 <a t-attf-href="/forum/#{ slug(forum) }/user/#{uid}">My Profile</a>
91 <form class="navbar-form navbar-right" role="search" t-attf-action="/forum/#{ slug(forum) }" method="get">
92 <div class="input-group">
93 <input type="search" class="form-control" name="search" t-att-value="search or ''"/>
94 <span class="input-group-btn">
95 <button type="submit" class="btn btn-default">Search</button>
103 <div id="wrap" class="container">
105 <div class="col-sm-9">
106 <div t-foreach="notifications or []" t-as="notification" class="alert alert-success alert-dismissable">
107 <button type="button" class="close notification_close" t-att-id="notification.id" data-dismiss="alert" aria-hidden="true">&times;</button>
108 <div t-field="notification.body"/>
109 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ user.id }#badges" class="fa fa-arrow-right">View Your Badges</a>
113 <div class="col-sm-3" id="right-column">
114 <div t-if="not header.get('ask_hide')" class="btn-group btn-block mb16">
115 <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 Question</t>
117 <t t-if="forum.default_allow == 'post_link'">Submit Post</t>
118 <t t-if="forum.default_allow == 'post_discussion'">New Post</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="allow_link"><a t-attf-href="/forum/#{slug(forum)}/post_link">Share a Link</a></li>
126 <li t-if="allow_question"><a t-attf-href="/forum/#{slug(forum)}/ask_question">Ask a Question</a></li>
127 <li t-if="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 <span t-if="question.type == 'question'" class="fa fa-question-circle text-muted"/>
195 <span t-if="question.type == 'discussion'" class="fa fa-comment text-muted"/>
196 <t t-if="question.type == 'link'">
197 <a t-att-href="question.name" t-raw="question.content"/>
199 <t t-if="question.type in ('question', 'discussion')">
200 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
202 <span t-if="not question.active"><b> [Deleted]</b></span>
203 <span t-if="question.state == 'close'"><b> [Closed]</b></span>
205 <t t-foreach="question.tag_ids" t-as="question_tag">
206 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{slug(question_tag)}/questions">
207 <span t-attf-class="pull-right badge #{tag and tag.name == question_tag.name and 'badge-active' ''}" t-field="question_tag.name"
208 style="margin-right: 4px;"/>
211 <div class="text-muted">
212 by <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
213 t-field="question.create_uid" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
214 style="display: inline-block;"/>
215 on <span t-field="question.write_date" t-field-options='{"format":"short"}'/>
216 <span t-if="question.type == 'question'" class="visible-xs">
217 <b t-esc="question.child_count or 0"/>
218 <t t-if="question.child_count>1">answers</t>
219 <t t-if="question.child_count==1">answer</t>
221 with <b t-field="question.views"/> views
222 <span t-if="question.vote_count>0"> and
223 <b t-esc="question.vote_count or 0"/>
224 <t t-if="question.vote_count>1">votes</t>
225 <t t-if="question.vote_count==1">vote</t>
227 <a t-if="question.type == 'link'" t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }">
228 <t t-esc="question.child_count"/>
229 <t t-if="question.child_count>1">Comments</t>
230 <t t-if="question.child_count<=1">Comment</t>
237 <!-- Display a post as an answer -->
238 <template id="display_post_answer">
239 <div class="clearfix">
240 <div t-attf-class="pull-left text-center mb16 box #{len(answer.vote_ids) and 'oe_green' or 'oe_grey'}">
241 <div t-esc="len(answer.vote_ids)"/>
243 <div class="question-name" style="margin-left: 32px;">
244 <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"/>
245 <t t-if="len(answer.website_message_ids)>0">
246 (<t t-esc="len(answer.website_message_ids)"/>
247 <t t-if="len(answer.website_message_ids)>1">Comments</t>
248 <t t-if="len(answer.website_message_ids)<=1">Comment</t>)
256 <t t-call="website_forum.header">
257 <div t-field="forum.faq"/>
261 <!-- All Forums Layout -->
262 <template id="forum_all">
263 <t t-call="website.layout">
264 <div class="container">
265 <h1 class="mb32">Our forums</h1>
267 <div t-foreach="forums" t-as="forum" class="col-sm-3 text-center mb32">
268 <a t-attf-href="/forum/#{ slug(forum) }">
269 <div class="fa fa-5x fa-comment mb16"/>
270 <div t-field="forum.name"/>
278 <!-- Specific Forum Layout -->
279 <template id="forum_index" name="Forum">
280 <t t-call="website_forum.header">
281 <h2 class="page-header mt0">
282 <t t-esc="question_count"/>
283 <span t-if="post_type == 'all'">Posts</span>
284 <span t-if="post_type == 'question'">Questions</span>
285 <span t-if="post_type == 'link'">Posts</span>
286 <span t-if="post_type == 'discussion'">Discussions</span>
288 <small class="dropdown" t-if="filters in ('all', 'unanswered','followed', 'tag')">
289 <a href="#" class="dropdown-toggle" data-toggle="dropdown">
290 <t t-if="filters == 'unanswered'">Unanswered</t>
291 <t t-if="filters == 'followed'">Followed</t>
292 <t t-if="tag"><span t-field="tag.name"/></t>
293 <t t-if="sorting == 'relevancy'"> by relevancy</t>
294 <t t-if="sorting == 'date'"> by activity date</t>
295 <t t-if="sorting == 'creation'"> by newest</t>
296 <t t-if="sorting == 'answered'"> by most answered</t>
297 <t t-if="sorting == 'vote'"> by most voted</t>
300 <ul class="dropdown-menu">
301 <li class="dropdown-header">Filter on</li>
302 <li t-att-class="filters == 'all' and 'active' or '' ">
303 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='all')">All</a>
305 <li t-att-class="filters == 'unanswered' and 'active' or '' ">
306 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='unanswered')">Unanswered</a>
308 <li t-if="uid" t-att-class="filters == 'followed' and 'active' or '' ">
309 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='followed')">Followed</a>
311 <li class="dropdown-header">Tags</li>
312 <li t-if="tag" t-att-class="tag and 'active' or '' ">
313 <a href=""><t t-esc="tag.name"/></a>
315 <li class="dropdown-header">Sort by</li>
316 <li t-att-class="sorting == 'relevancy' and 'active' or '' ">
317 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='relevancy')">Relevancy</a>
319 <li t-att-class="sorting == 'date' and 'active' or '' ">
320 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='date')">Last activity date</a>
322 <li t-att-class="sorting == 'creation' and 'active' or '' ">
323 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='creation')">Newest</a>
325 <li t-att-class="sorting == 'answered' and 'active' or '' ">
326 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='answered')">Most answered</a>
328 <li t-att-class="sorting == 'vote' and 'active' or '' ">
329 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='vote')">Most voted</a>
334 <div t-foreach="question_ids" t-as="question" class="mb16">
335 <t t-call="website_forum.display_post"/>
337 <t t-call="website.pager"/>
342 <t t-call="website_forum.header">
343 <div class="oe_structure oe_empty"/>
344 <h1 class="mt32">Question not found!</h1>
345 <p>Sorry, this question is not available anymore.</p>
347 <a t-attf-href="/forum">Return to the question list.</a>
352 <!-- Edition: Post Article -->
353 <template id="post_link">
354 <t t-call="website_forum.header">
355 <h1 class="mt0">Submit a Link</h1>
357 Share an awesome link. Your post will appear in the 'Newest' top-menu.
358 If the community vote on your post, it will get traction by being promoted
361 We keep a high level of quality in showcased posts, only 20% of the submited
362 posts will be featured.
364 <form t-attf-action="/forum/#{ slug(forum) }/link/new" method="post" role="form" class="tag_text form-horizontal">
365 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
366 <div class="form-group">
367 <label class="col-sm-2 control-label" for="post_name">URL to Share</label>
368 <div class="col-sm-8">
369 <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
370 class="form-control mb16 link_url" placeholder="e.g. https://www.odoo.com"/>
373 <div class="form-group">
374 <label class="col-sm-2 control-label" for="post_name">Post Title</label>
375 <div class="col-sm-8">
376 <input type="text" name="content" readonly="True" required="True" t-attf-value="#{content}"
377 class="form-control"/>
380 <div class="form-group">
381 <label class="col-sm-2 control-label" for="post_name">Tags</label>
382 <div class="col-sm-8">
383 <input type="text" name="post_tags" readonly="True" class="form-control load_tags"/>
386 <div class="form-group">
387 <div class="col-sm-offset-2 col-sm-8">
388 <button class="btn btn-primary" disabled="True" id="btn_post_your_article">Post Your Article</button>
395 <!-- Edition: Post your Discussion Topic -->
396 <template id="post_discussion">
397 <t t-call="website_forum.header">
398 <h1 class="mt0">Post Your Discussion Topic</h1>
400 <b>Share</b> Start Something Awesome
402 <form t-attf-action="/forum/#{ slug(forum) }/discussion/new" method="post" role="form" class="tag_text">
403 <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
404 class="form-control mb16" placeholder="Your Discussion Title..."/>
405 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
406 <textarea name="content" id="content" required="True" class="form-control load_editor">
407 <t t-esc="question_content"/>
410 <input type="text" name="post_tags" placeholder="Tags" class="form-control load_tags"/>
412 <button class="btn btn-primary" id="btn_ask_your_question">Post Your Topic</button>
417 <!-- Edition: ask your question -->
418 <template id="ask_question">
419 <t t-call="website_forum.header">
420 <h1 class="mt0">Ask Your Question</h1>
422 To improve your chance getting an answer:
425 <li>Set a clear, explicit and concise question title
427 <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>
429 <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>
432 <li>Avoid unnecessary introductions (Hi,... Please... Thanks...),</li>
433 <li>Provide enough details and, if possible, give an example.</li>
435 <script type="text/javascript">
437 $("[data-toggle='popover']").popover();
440 <form t-attf-action="/forum/#{ slug(forum) }/question/new" method="post" role="form" class="tag_text">
441 <input type="text" name="post_name" required="True" t-attf-value="#{post_name}"
442 class="form-control mb16" placeholder="Your Question Title..."/>
443 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
444 <textarea name="content" required="True" id="content" class="form-control load_editor">
445 <t t-esc="question_content"/>
448 <input type="text" name="post_tags" placeholder="Tags" class="form-control load_tags"/>
450 <button class="btn btn-primary" id="btn_ask_your_question">Post Your Question</button>
455 <!-- Edition: edit a post -->
456 <template id="edit_post">
457 <t t-call="website_forum.header">
458 <h3 t-if="not is_answer">Edit <span t-field="post.type"/></h3>
459 <h3 t-if="is_answer">Edit reply</h3>
460 <form t-attf-action="/forum/#{slug(forum)}/post/#{slug(post)}/save" method="post" role="form" class="tag_text">
461 <div t-if="not is_answer">
462 <input type="text" name="post_name" required="True"
463 t-attf-value="#{post.name}" class="form-control mb8" placeholder="Edit your Post"/>
464 <h5 t-if="post.type == 'question'" class="mt20">Please enter a descriptive question (should finish by a '?')</h5>
466 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
467 <textarea name="content" id="content" required="True" class="form-control load_editor">
468 <t t-esc="post.content"/>
470 <div t-if="not is_answer">
472 <input type="text" name="post_tag" class="form-control col-md-9 load_tags" placeholder="Tags" t-attf-value="#{tags}"/>
475 <button class="btn btn-primary btn-lg">Save</button>
480 <!-- Moderation: close a post -->
481 <template id="close_post">
482 <t t-call="website_forum.header">
483 <h1 class="mt0">Close Post</h1>
484 <p class="text-muted">
485 If you close this post, it will be hidden for most users. Only
486 users having a high karma can see closed posts to moderate
489 <form t-attf-action="/forum/#{ slug(forum) }/question/#{slug(question)}/close" method="post" role="form" class="form-horizontal mt32 mb64">
490 <input name="post_id" t-att-value="question.id" type="hidden"/>
491 <div class="form-group">
492 <label class="col-md-3 control-label" for="reason">Post:</label>
493 <div class="col-md-8 mt8">
494 <span t-field="question.name"/>
497 <div class="form-group">
498 <label class="col-md-3 control-label" for="reason">Reason:</label>
499 <div class="col-md-8">
500 <select class="form-control" name="reason_id">
501 <t t-foreach="reasons or []" t-as="reason">
502 <option t-att-value="reason.id" t-att-selected="reason.id == question.closed_reason_id.id"><t t-esc="reason.name"/></option>
507 <div class="form-group">
508 <div class="col-md-offset-3 col-md-8">
509 <button class="btn btn-primary">Close post</button>
510 <span class="text-muted">or</span>
511 <a class="btn btn-link" t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }">back to post</a>
518 <!-- Edition: post a reply -->
519 <template id="post_reply">
520 <div class="css_editable_mode_hidden">
521 <form t-attf-id="reply#{ object._name.replace('.','') + '-' + str(object.id) }" class="collapse oe_comment_grey"
522 t-attf-action="/forum/#{ slug(forum) }/#{slug(object)}/reply" method="post" role="form">
523 <h3 class="mt10">Your Reply</h3>
524 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
525 <textarea name="content" t-attf-id="content-#{str(object.id)}" class="form-control load_editor" required="True"/>
526 <button class="btn btn-primary" id="btn_ask_your_question">Post Your Reply</button>
531 <!-- Edition: post an answer -->
532 <template id="post_answer">
533 <h3 class="mt10">Your Reply</h3>
534 <p t-if="question.type == 'question'">
535 <b>Please try to give a substantial answer.</b> If you wanted to comment on the question or answer, just
536 <b>use the commenting tool.</b> Please remember that you can always <b>revise your answers</b>
537 - no need to answer the same question twice. Also, please <b>don't forget to vote</b>
538 - it really helps to select the best questions and answers!
540 <form t-attf-action="/forum/#{ slug(forum) }/#{slug(question)}/reply" method="post" role="form">
541 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
542 <textarea name="content" t-attf-id="content-#{str(question.id)}" class="form-control load_editor" required="True"/>
543 <button class="btn btn-primary mt16" id="btn_ask_your_question">Post Your Reply</button>
548 <div t-attf-class="box oe_grey">
549 <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 ''}"
550 t-attf-data-karma="#{post.user_vote == 1 and post.karma_downvote or post.karma_upvote}"
551 t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/upvote"/>
552 <span id="vote_count" t-esc="post.vote_count"/>
553 <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 ''}"
554 t-attf-data-karma="#{post.user_vote == -1 and post.karma_upvote or post.karma_downvote}"
555 t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/downvote"/>
556 <div t-if="vote_count > 1" class="subtitle">
559 <div t-if="vote_count < 2" class="subtitle">
565 <!-- Specific Post Layout -->
566 <template id="post_description_full" name="Question Navigation">
567 <t t-call="website_forum.header">
568 <div t-attf-class="row question">
569 <div class="col-md-2 hidden-xs text-center">
570 <t t-call="website_forum.vote">
571 <t t-set="post" t-value="question"/>
573 <div class="text-muted text-center">
574 <span t-field="question.views"/> Views
577 <a t-attf-data-href="/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
578 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="col-md-10 #{not question.active and 'alert alert-danger' or ''}">
583 <t t-if="question.type == 'link'">
584 <a t-att-href="question.name" t-raw="question.content"/>
586 <t t-if="question.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="alert alert-info text-center" t-if="question.state == 'close'">
594 <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>
596 <t t-if="question.closed_uid">
597 <b>by <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.closed_uid.id }"
598 t-field="question.closed_uid"
599 t-field-options='{"widget": "contact", "fields": ["name"]}'
600 style="display: inline-block;"/></b>
602 <b>on <span t-field="question.closed_date"/></b>
603 <div class="mt16 mb24 text-center">
604 <t t-call="website_forum.link_button">
605 <t t-set="url" t-value="'/forum/' + slug(forum) + '/question/' + slug(question) + '/reopen'"/>
606 <t t-set="label" t-value="'Reopen'"/>
607 <t t-set="classes" t-value="'fa-arrow-right'"/>
608 <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
612 <div t-if="question.type != 'link'"><t t-raw="question.content"/></div>
613 <div class="mt16 clearfix">
614 <div class="pull-right">
615 <div class="text-right">
616 <t t-foreach="question.tag_ids" t-as="tag">
617 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ tag.id }/questions" class="badge" t-field="tag.name"/>
620 <ul class="list-inline" id="options">
621 <li t-if="question.type == 'question'">
622 <a style="cursor: pointer" data-toggle="collapse"
623 t-attf-class="fa fa-comment-o #{not question.can_comment and 'karma_required text-muted' or ''}"
624 t-attf-data-karma="#{not question.can_comment and question.karma_comment or 0}"
625 t-attf-data-target="#comment#{ question._name.replace('.','') + '-' + str(question.id) }">
629 <li t-if="question.state != 'close'">
630 <t t-call="website_forum.link_button">
631 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/ask_for_close'"/>
632 <t t-set="label" t-value="'Close'"/>
633 <t t-set="classes" t-value="'fa-times'"/>
634 <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
637 <li t-if="question.state == 'close'">
638 <t t-call="website_forum.link_button">
639 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/reopen'"/>
640 <t t-set="label" t-value="'Reopen'"/>
641 <t t-set="classes" t-value="'fa-undo'"/>
642 <t t-set="karma" t-value="not question.can_close and question.karma_close or 0"/>
646 <t t-call="website_forum.link_button">
647 <t t-set="url" t-value="'/forum/' + slug(forum) +'/post/' + slug(question) + '/edit'"/>
648 <t t-set="label" t-value="'Edit'"/>
649 <t t-set="classes" t-value="'fa-edit'"/>
650 <t t-set="karma" t-value="not question.can_edit and question.karma_edit or 0"/>
653 <li t-if="question.active">
654 <t t-call="website_forum.link_button">
655 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/delete'"/>
656 <t t-set="label" t-value="'Delete'"/>
657 <t t-set="classes" t-value="'fa-trash-o'"/>
658 <t t-set="karma" t-value="not question.can_unlink and question.karma_unlink or 0"/>
661 <li t-if="not question.active">
662 <t t-call="website_forum.link_button">
663 <t t-set="url" t-value="'/forum/' + slug(forum) +'/question/' + slug(question) + '/undelete'"/>
664 <t t-set="label" t-value="'Undelete'"/>
665 <t t-set="classes" t-value="'fa-trash-o'"/>
666 <t t-set="karma" t-value="not question.can_unlink and question.karma_unlink or 0"/>
672 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{question.create_uid.id}/avatar"/>
674 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
675 t-field="question.create_uid"
676 t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
677 style="display: inline-block;"/>
678 <div t-field="question.create_uid" t-field-options='{"widget": "contact", "badges": true, "fields": ["karma"]}'/>
679 <span class="text-muted">Asked on <span t-field="question.create_date" t-field-options='{"format":"short"}'/></span>
682 <div class="visible-xs text-center">
683 <t t-call="website_forum.vote">
684 <t t-set="post" t-value="question"/>
686 <div class="text-muted text-center">
687 <span t-field="question.views"/> Views
690 <a t-attf-data-href="/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
691 t-attf-class="favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}"/>
695 <t t-call="website_forum.post_comment">
696 <t t-set="object" t-value="question"/>
701 <div t-foreach="question.child_ids" t-as="post_answer" class="mt16 mb32">
702 <t t-call="website_forum.post_answers">
703 <t t-set="answer" t-value="post_answer"/>
706 <div t-if="question.type != 'question' or question.type == 'question' and not question.uid_has_answered and question.state != 'close' and question.active != False">
707 <t t-call="website_forum.post_answer"/>
709 <div t-if="question.type == 'question' and question.uid_has_answered" class="mb16">
710 <a class="btn btn-primary" t-attf-href="/forum/#{slug(forum)}/question/#{slug(question)}/edit_answer">Edit Your Previous Answer</a>
711 <span class="text-muted">(only one answer per question is allowed)</span>
716 <template id="post_answers">
717 <a t-attf-id="answer-#{str(answer.id)}"/>
718 <div t-attf-class="forum_answer row" t-attf-id="answer_#{answer.id}" >
719 <div class="col-md-2 hidden-xs text-center">
720 <t t-call="website_forum.vote">
721 <t t-set="post" t-value="answer"/>
723 <div t-if="question.type == 'question'" class="text-muted mt8">
724 <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 ''}"
725 t-attf-data-karma="#{answer.karma_accept}"
726 t-attf-data-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
729 <div class="col-md-10 clearfix">
730 <t t-raw="answer.content"/>
732 <ul class="list-inline pull-right">
733 <li t-if="question.type == 'question'">
734 <a t-attf-class="fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
735 t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
736 style="cursor: pointer" data-toggle="collapse"
737 t-attf-data-target="#comment#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Comment
740 <li t-if="question.type != 'question' and not answer.parent_id or answer.parent_id and not answer.parent_id.parent_id">
741 <a t-attf-class="fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
742 t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
743 style="cursor: pointer" data-toggle="collapse"
744 t-attf-data-target="#reply#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Reply
748 <t t-call="website_forum.link_button">
749 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/edit'"/>
750 <t t-set="label" t-value="'Edit'"/>
751 <t t-set="classes" t-value="'fa fa-edit'"/>
752 <t t-set="karma" t-value="not answer.can_edit and answer.karma_edit or 0"/>
756 <t t-call="website_forum.link_button">
757 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/delete'"/>
758 <t t-set="label" t-value="'Delete'"/>
759 <t t-set="classes" t-value="'fa-trash-o'"/>
760 <t t-set="karma" t-value="not answer.can_unlink and answer.karma_unlink or 0"/>
763 <li t-if="question.type == 'question'">
764 <t t-call="website_forum.link_button">
765 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(answer) + '/convert_to_comment'"/>
766 <t t-set="label" t-value="'Convert as a comment'"/>
767 <t t-set="classes" t-value="'fa-magic'"/>
768 <t t-set="karma" t-value="not answer.can_comment_convert and answer.karma_comment_convert or 0"/>
772 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{answer.create_uid.id}/avatar"/>
774 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ answer.create_uid.id }"
775 t-field="answer.create_uid"
776 t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
777 style="display: inline-block;"/>
778 <div t-field="answer.create_uid" t-field-options='{"widget": "contact", "badges": true, "fields": ["karma"]}'/>
779 <span class="text-muted">Answered on <span t-field="answer.create_date" t-field-options='{"format":"short"}'/></span>
781 <div class="visible-xs text-center">
782 <t t-call="website_forum.vote">
783 <t t-set="post" t-value="answer"/>
785 <div class="text-muted mt8">
786 <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 ''}"
787 t-attf-data-karma="#{answer.karma_accept}"
788 t-attf-data-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
792 <t t-if="answer.type == 'question'" t-call="website_forum.post_comment">
793 <t t-set="object" t-value="answer"/>
795 <div t-if="answer.type != 'question' and question.state != 'close' and question.active != False">
796 <t t-call="website_forum.post_reply">
797 <t t-set="object" t-value="answer"/>
800 <div t-foreach="answer.child_ids" t-as="child_answer" class="mt16 mb16">
801 <t t-call="website_forum.post_answers">
802 <t t-set="answer" t-value="child_answer"/>
809 <!-- Utility template: Post a Comment -->
810 <template id="post_comment">
811 <div class="row clearfix">
812 <div class="col-sm-10 col-sm-offset-2">
813 <div t-foreach="reversed(object.website_message_ids)" t-as="message" class="comment oe_comment_grey">
814 <small class="text-muted">
815 <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"/>
816 <t t-call="website_forum.link_button">
817 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(object) + '/comment/' + slug(message) + '/delete'"/>
818 <t t-set="label" t-value="' '"/>
819 <t t-set="karma" t-value="user.karma<required_karma and required_karma or 0"/>
820 <t t-set="classes" t-value="'close comment_delete fa-times'"/>
823 <span t-field="message.body"/>
824 <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"/>
825 <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)">
826 <t t-set="allow_post_comment" t-value="True" />
828 <t t-if="allow_post_comment">
829 <t t-call="website_forum.link_button" >
830 <t t-set="url" t-value="'/forum/' + slug(forum) + '/post/' + slug(object) + '/comment/' + slug(message) + '/convert_to_answer'"/>
831 <t t-set="label" t-value="'Convert as an answer'"/>
832 <t t-set="karma" t-value="user.karma<required_karma and required_karma or 0"/>
833 <t t-set="classes" t-value="'fa-magic pull-right'"/>
836 <a t-attf-href="/forum/#{slug(forum)}/partner/#{message.author_id.id}"
837 t-field="message.author_id" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
838 style="display: inline-block;"/>
839 on <span t-field="message.date" t-field-options='{"format":"short"}'/>
842 <div class="css_editable_mode_hidden">
843 <form t-attf-id="comment#{ object._name.replace('.','') + '-' + str(object.id) }" class="collapse oe_comment_grey"
844 t-attf-action="/forum/#{slug(forum)}/post/#{slug(object)}/comment" method="POST">
845 <input name="post_id" t-att-value="object.id" type="hidden" class="mt8"/>
846 <textarea name="comment" class="form-control" placeholder="Comment this post..."/>
847 <button type="submit" class="btn btn-primary mt8">Post</button>
855 <t t-call="website_forum.header">
859 <p class="text-muted">
860 A tag is a label that categorizes your question with other,
861 similar questions. Using the right tags makes it easier for
862 others to find and answer your question.
865 <div class="col-sm-3 mt16" t-foreach="tags" t-as="tag">
866 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ slug(tag) }/questions?{{ keep_query( filters='tag') }}" class="badge">
867 <span t-field="tag.name"/>
870 X <t t-esc="tag.posts_count"/>
877 <template id="badge">
878 <t t-call="website_forum.header">
883 Besides gaining reputation with your questions and answers,
884 you receive badges for being especially helpful. Badges
885 appear on your profile page, and your posts.
887 <table class="table mt32 mb64">
888 <tr t-foreach="badges" t-as="badge">
890 <a t-attf-href="/forum/#{ slug(forum) }/badge/#{ slug(badge) }" class="badge pull-left">
891 <span t-if="badge.level == 'gold'" class="fa fa-circle badge-gold"/>
892 <span t-if="badge.level == 'silver'" class="fa fa-circle badge-silver"/>
893 <span t-if="badge.level == 'bronze'" class="fa fa-circle badge-bronze"/>
894 <span t-field="badge.name"/>
897 <b t-esc="badge.stat_count_distinct"/>
898 <i class="text-muted">awarded users</i>
900 <span t-field="badge.description"/>
907 <template id="badge_user">
908 <t t-call="website_forum.header">
909 <h3 class="mt32 mb32">
910 <b>Badge "<span t-field="badge.name"/>"</b>
913 <div class="pull-left badge">
914 <span t-if="badge.level == 'gold'" class="fa fa-circle badge-gold"/>
915 <span t-if="badge.level == 'silver'" class="fa fa-circle badge-silver"/>
916 <span t-if="badge.level == 'bronze'" class="fa fa-circle badge-bronze"/>
917 <span t-field="badge.name"/>
919 <span t-field="badge.description" style="margin-left:20px"/>
922 <t class="pull-left" t-esc="badge.stat_count_distinct"/>
923 <span t-if="badge.stat_count_distinct>1">users</span>
924 <span t-if="badge.stat_count_distinct<=1">user</span>
928 <div class="col-sm-3 mt16" t-foreach="users" t-as="user">
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"/>
938 <template id="users">
939 <t t-call="website_forum.header">
940 <div t-foreach="users" t-as="row_users" class="row mt16">
941 <div t-foreach="row_users" t-as="user" class="col-sm-4">
942 <img class="pull-left img img-circle img-avatar" t-attf-src="/forum/user/#{user.id}/avatar"/>
944 <a t-attf-href="/forum/#{slug(forum)}/user/#{user.id}" t-field="user.name"/>
945 <t t-if="user.country_id">
946 <span t-field="user.country_id.image" t-field-options='{"widget": "image", "class": "country_flag"}'/>
948 <b><t t-esc="user.karma"/></b>
949 <t t-raw="separator"/>
952 <span class="fa fa-circle badge-gold"/>
953 <t t-esc="user.gold_badge"/>
954 <span class="fa fa-circle badge-silver"/>
955 <t t-esc="user.silver_badge"/>
956 <span class="fa fa-circle badge-bronze"/>
957 <t t-esc="user.bronze_badge"/>
963 <div class="pull-left">
964 <t t-call="website.pager"/>
969 <!--Private profile-->
970 <template id="private_profile">
971 <t t-call="website_forum.header">
972 <h1 class="mt32">This profile is private!</h1>
974 <a t-attf-href="/forum/#{slug(forum)}">Return to the question list.</a>
979 <template id="edit_profile">
980 <t t-call="website_forum.header">
981 <h3>Edit Profile</h3>
983 <div class="col-md-2">
984 <img class="img img-responsive img-circle" t-attf-src="/forum/user/#{user.id}/avatar"/>
986 <div class="col-md-10">
987 <form t-attf-action="/forum/#{slug(forum)}/user/#{slug(user)}/save" method="post" role="form" class="form-horizontal">
988 <input name="user_id" t-att-value="user.id" type="hidden"/>
989 <div class="form-group">
990 <label class="col-md-2 control-label mb16" for="user_name">Real name</label>
991 <div class="col-md-8 mb16">
992 <input type="text" class="form-control" name="name" id="user_name" required="True" t-attf-value="#{user.name}"/>
995 <div class="form-group">
996 <label class="col-md-2 control-label mb16" for="user_website_published" t-if="user.id == uid">Public profile</label>
997 <div class="col-md-8 mb16" t-if="user.id == uid">
998 <input type="checkbox" class="mt8" name="website_published" id="user_website_published" value="True" t-if="not user.website_published"/>
999 <input type="checkbox" class="mt8" name="website_published" id="user_website_published" value="True" checked="checked" t-if="user.website_published"/>
1002 <div class="form-group">
1003 <label class="col-md-2 control-label mb16" for="user_website">Website</label>
1004 <div class="col-md-8 mb16">
1005 <input type="text" class="form-control" name="website" id="user_website" t-attf-value="#{user.partner_id.website or ''}"/>
1008 <div class="form-group">
1009 <div t-if="email_required" class="alert alert-danger alert-dismissable oe_forum_email_required">
1010 <button type="button" class="close" data-dismiss="alert">x</button>
1011 <p>Please enter a valid email address in order to receive notifications from answers or comments.</p>
1013 <label class="col-md-2 control-label mb16" for="user_email">Email</label>
1014 <div class="col-md-8 mb16">
1015 <input type="text" class="form-control" name="email" id="user_email" required="True" t-attf-value="#{user.partner_id.email}"/>
1018 <div class="form-group">
1019 <label class="col-md-2 control-label mb16" for="user_city">City</label>
1020 <div class="col-md-8 mb16">
1021 <input type="text" class="form-control" name="city" id="user_city" t-attf-value="#{user.partner_id.city or ''}"/>
1024 <div class="form-group">
1025 <label class="col-md-2 control-label mb16">Country</label>
1026 <div class="col-md-8 mb16">
1027 <select class="form-control" name="country">
1028 <option value="">Country...</option>
1029 <t t-foreach="countries or []" t-as="country">
1030 <option t-att-value="country.id" t-att-selected="country.id == user.partner_id.country_id.id"><t t-esc="country.name"/></option>
1035 <!--Note: using website_description fiels instead of using commnt firld of partner-->
1036 <div class="form-group">
1037 <label class="col-md-2 control-label mb16" for="description">Biography</label>
1038 <div class="col-md-8 mb16">
1039 <textarea name="description" id="description" style="min-height: 120px" required="True"
1040 class="form-control load_editor"><t t-esc="user.partner_id.website_description"/></textarea>
1043 <div class="col-sm-offset-2 col-md-2 mb16">
1044 <button class="btn btn-primary btn-lg">Update</button>
1049 <script type="text/javascript">
1050 CKEDITOR.replace("description");
1055 <template id="user_detail_full">
1056 <t t-call="website_forum.header">
1057 <h1 class="mt0 page-header">
1058 <span t-field="user.name"/>
1059 <small>profile</small>
1060 <t t-call="website.publish_management" groups="base.group_website_publisher">
1061 <t t-set="object" t-value="user"/>
1065 <div class="col-sm-2">
1066 <img class="img img-responsive img-circle" t-attf-src="/forum/user/#{user.id}/avatar"/>
1068 <div class="col-sm-10">
1069 <table class="table table-condensed">
1071 <td rowspan="2" valign="top"><span class="text-muted">contributions</span></td>
1072 <td>member since</td>
1073 <td><span t-field="user.create_date" t-field-options='{"format": "short"}'/></td>
1075 <td>last connection</td>
1076 <td><span t-field="user.login_date" t-field-options='{"format": "short"}'/></td>
1079 <td rowspan="2" valign="top"><span class="text-muted">bio</span></td>
1082 <a t-att-href="user.website" t-if="user.website">
1083 <span t-field="user.website"/>
1089 <span t-field="user.city"/>
1090 <span t-if="user.city and user.country_id">, </span>
1091 <span t-field="user.country_id"/>
1092 <t t-if="user.country_id"> <span t-field="user.country_id.image" t-field-options='{"widget": "image", "class": "country_flag"}'/></t>
1097 <td rowspan="2" valign="top"><span class="text-muted">stats</span></td>
1099 <td><span t-field="user.karma"/></td>
1103 <span class="fa fa-thumbs-up"/>
1104 <span t-esc="up_votes"/>
1105 <span class="fa fa-thumbs-down"/>
1106 <span t-esc="down_votes"/>
1110 <div class="well well-sm">
1111 <span t-field="user.partner_id.website_description" class="oe_no_empty"/>
1112 <t t-if="uid == user.id">
1113 <a class="fa fa-arrow-right" t-attf-href="/forum/#{slug(forum)}/user/#{slug(user)}/edit"> Edit Your Bio</a>
1119 <ul class="nav nav-tabs">
1121 <a href="#questions" data-toggle="tab"><t t-esc="count_questions"/> Questions</a>
1124 <a href="#answers" data-toggle="tab"><t t-esc="count_answers"/> Answers</a>
1126 <li t-if="uid == user.id">
1127 <a href="#favourite_question" data-toggle="tab"><t t-esc="len(favourite)"/> Favourite Questions</a>
1129 <li t-if="uid == user.id">
1130 <a href="#followed_question" data-toggle="tab"><t t-esc="len(followed)"/> Followed Questions</a>
1132 <li t-if="uid == user.id">
1133 <a href="#activity" data-toggle="tab">Activity</a>
1136 <a href="#badges" data-toggle="tab">Badges</a>
1138 <li t-if="uid == user.id">
1139 <a href="#votes" data-toggle="tab">Votes</a>
1142 <div class="tab-content mt16">
1143 <div class="tab-pane active" id="questions">
1144 <div class="mb16" t-foreach="questions" t-as="question">
1145 <t t-call="website_forum.display_post"/>
1147 </div><div class="tab-pane" id="answers">
1148 <div t-foreach="answers" t-as="answer">
1149 <t t-call="website_forum.display_post_answer"/>
1152 <div class="tab-pane" id="karma">
1155 <div class="tab-pane" id="badges">
1156 <t t-call="website_forum.user_badges"/>
1158 <div class="tab-pane" id="favourite_question" t-if="uid == user.id">
1159 <div t-foreach="favourite" t-as="question">
1160 <t t-call="website_forum.display_post"/>
1163 <div class="tab-pane" id="followed_question" t-if="uid == user.id">
1164 <div t-foreach="followed" t-as="question" class="mb16">
1165 <t t-call="website_forum.display_post"/>
1168 <div class="tab-pane" id="votes" t-if="uid == user.id">
1169 <t t-call="website_forum.user_votes"/>
1171 <div class="tab-pane" id="activity" t-if="uid == user.id">
1172 <ul class="list-unstyled">
1173 <li t-foreach="activities" t-as="activity">
1174 <span t-field="activity.date" t-field-options='{"format": "short"}'/>
1175 <span t-esc="activity.subtype_id.name" class="label label-info"/>
1176 <t t-set="post" t-value="posts[activity.res_id]"/>
1177 <span t-if="post[1]">
1178 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(post[0]) }#answer-#{ str(post[1].id) }">
1179 <span t-esc="post[0].name"/>
1182 <span t-if="not post[1]">
1183 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(post[0]) }">
1184 <span t-esc="post[0].name"/>
1194 <template id="user_badges">
1195 <table class="table mt32 mb64">
1196 <tr t-foreach="user.badge_ids" t-as="badge">
1198 <a t-attf-href="/forum/#{ slug(forum) }/badge/#{ slug(badge.badge_id) }" class="badge pull-left">
1199 <span t-if="badge.badge_id.level == 'gold'" class="fa fa-circle badge-gold"/>
1200 <span t-if="badge.badge_id.level == 'silver'" class="fa fa-circle badge-silver"/>
1201 <span t-if="badge.badge_id.level == 'bronze'" class="fa fa-circle badge-bronze"/>
1202 <span t-field="badge.badge_id.name"/>
1205 <b t-esc="badge.badge_id.stat_count_distinct"/>
1206 <i class="text-muted">awarded users</i>
1208 <span t-field="badge.badge_id.description"/>
1212 <div class="mb16" t-if="not user.badge_ids">
1213 <b>No badge yet!</b><br/>
1214 <a t-attf-href="/forum/#{ slug(forum) }/badge" class="fa fa-arrow-right"> Check available badges</a>
1218 <template id="user_votes">
1219 <div t-foreach="vote_post" t-as="vote">
1220 <t t-esc="vote.post_id.create_date"/>
1221 <span t-if="vote.vote == '1'" class="fa fa-thumbs-up text-success" style="margin-left:30px"/>
1222 <span t-if="vote.vote == '-1'" class="fa fa-thumbs-down text-warning" style="margin-left:30px"/>
1223 <t t-if="vote.post_id.parent_id">
1224 <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"/>
1226 <t t-if="not vote.post_id.parent_id">
1227 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ vote.post_id.id }" style=" color:black;margin-left:10px" t-esc="vote.post_id.name"/>
1230 <div class="mb16" t-if="not vote_post">
1231 <b>No vote given by you yet!</b>
1235 <!-- User Navbar -->
1236 <template id="content_new_forum" inherit_id="website.user_navbar" groups="base.group_user">
1237 <xpath expr="//ul[@id='oe_systray']/li/ul[@class='dropdown-menu oe_content_menu']" position="inside">
1238 <li><a href="#" data-action="new_forum">New Forum</a></li>