1 <?xml version="1.0" encoding="utf-8"?>
6 <template id="editor_head" inherit_id="website.editor_head"
8 <xpath expr="." position="inside">
9 <link rel='stylesheet' href="/website_forum/static/src/css/website_forum.css"/>
11 <script type="text/javascript" src="/website_forum/static/src/js/website.tour.forum.js"/>
12 <script type="text/javascript" src="/website_forum/static/src/js/website_forum.editor.js"/>
16 <!-- Layout add nav and footer -->
17 <template id="header_footer_custom" inherit_id="website.layout"
18 name="Footer Questions Link">
19 <xpath expr="//footer//ul[@name='products']" position="inside">
20 <li><a t-attf-href="/forum/%(website_forum.forum_help)d">Q&A</a></li>
21 <li><a href="/forum">Forums</a></li>
26 <template id="header" name="Forum Index">
27 <t t-call="website.layout">
29 <link rel='stylesheet' href="/web/static/lib/jquery.textext/jquery.textext.css"/>
30 <link rel='stylesheet' href='/website_forum/static/src/css/website_forum.css'/>
31 <script type="text/javascript" src="/website_forum/static/src/js/website_forum.js"/>
32 <script type="text/javascript" src="/web/static/lib/jquery.textext/jquery.textext.js"/>
33 <script type="text/javascript" src="/web/static/lib/ckeditor/ckeditor.js"/>
34 <script type="text/javascript">
35 CKEDITOR.config.toolbar = [['Bold','Italic','Underline','Strike'],['NumberedList','BulletedList', 'Blockquote']
36 ,['Outdent','Indent','Link','Unlink','Image'],] ;
39 <div class="container mt16">
40 <div class="navbar navbar-default">
41 <div class="navbar-header">
42 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#oe-help-navbar-collapse">
43 <span class="sr-only">Toggle navigation</span>
44 <span class="icon-bar"></span>
45 <!-- <span class="icon-bar"></span> -->
46 <span class="icon-bar"></span>
48 <a class="navbar-brand" t-attf-href="/forum/#{slug(forum)}">
49 <span t-field="forum.name"/>
52 <div class="collapse navbar-collapse" id="oe-help-navbar-collapse">
53 <ul class="nav navbar-nav">
54 <li t-att-class="filters in ('all', 'unanswered','followed','question','tag') and 'active' or '' ">
55 <a t-attf-href="/forum/#{ slug(forum) }">Questions</a>
57 <li t-att-class="searches.get('users') and 'active' or '' ">
58 <a t-attf-href="/forum/#{ slug(forum) }/users">People</a>
60 <li t-att-class="searches.get('tags') and 'active' or '' ">
61 <a t-attf-href="/forum/#{ slug(forum) }/tag">Tags</a>
63 <li t-att-class="searches.get('badges') and 'active' or '' ">
64 <a t-attf-href="/forum/#{ slug(forum) }/badge">Badges</a>
67 <form class="navbar-form navbar-right" role="search" t-attf-action="/forum/#{ slug(forum) }" method="get">
68 <div class="form-group">
69 <input type="search" class="form-control"
70 name="search" placeholder="Search a question..."
71 t-att-value="search or ''"/>
72 <button type="submit" class="btn btn-default">Search</button>
79 <div id="wrap" class="container">
81 <div class="col-sm-9">
82 <div t-foreach="notifications or []" t-as="notification" class="alert alert-success alert-dismissable">
83 <button type="button" class="close notification_close" t-att-id="notification.id" data-dismiss="alert" aria-hidden="true">&times;</button>
84 <div t-field="notification.body"/>
85 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ user.id }#badges" class="fa fa-arrow-right">View Your Badges</a>
89 <div class="col-sm-3" id="right-column">
90 <a t-if="not header.get('ask_hide')" class="btn btn-primary btn-lg btn-block mb16" t-attf-href="/forum/#{slug(forum)}/ask">Ask a Question</a>
91 <div class="panel panel-default" id="about_forum">
92 <div class="panel-heading">
93 <h3 class="panel-title">About This Forum</h3>
95 <div class="panel-body">
96 <t t-raw="forum.description"/><br/>
97 <a t-if="not header.get('is_guidelines')" t-attf-href="/forum/#{slug(forum)}/faq" class="fa fa-arrow-right"> Read Guidelines</a>
98 <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>
101 <div t-if="header.get('question_data')">
102 <div class="panel panel-default">
103 <div class="panel-heading text-center">
104 <h3 class="panel-title">Question tools</h3>
106 <div class="panel-body text-center">
107 <t t-call="website_mail.follow"><t t-set="object" t-value="question"/></t>
109 <strong><t t-raw="len(question.message_follower_ids)"/></strong> follower(s)
112 <div class="panel-heading text-center">
113 <h3 class="panel-title ">Stats</h3>
115 <div class="panel-body">
116 <table class="table">
117 <thead><tr><td> Asked: <strong><span t-field="question.create_date" t-field-options='{"format":"short"}'/></strong></td></tr></thead>
118 <tr><td> Seen: <strong><t t-raw="question.views"/></strong>
119 <span t-if="question.views>1">times</span>
120 <span t-if="question.views<=1">time</span>
122 <tr><td> Last updated: <strong><span t-field="question.write_date" t-field-options='{"format":"short"}'/></strong></td></tr>
130 <div class="oe_structure"/>
134 <!-- Display a post -->
135 <template id="display_post">
136 <div class="question clearfix">
137 <div class="pull-left text-center">
138 <div t-attf-class="box #{question.is_correct and 'oe_green' or 'oe_grey'} #{(question.child_count == 0) and 'text-muted' or ''}">
139 <span t-esc="question.child_count"/>
140 <div t-if="question.child_count>1" class="subtitle">Answers</div>
141 <div t-if="question.child_count<=1" class="subtitle">Answer</div>
144 <div style="margin-left: 95px; margin-top:-8px;">
145 <div class="question-name">
146 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
147 <span t-if="not question.active"><b> [Deleted]</b></span>
148 <span t-if="question.state == 'close'"><b> [Closed]</b></span>
150 <t t-foreach="question.tag_ids" t-as="question_tag">
151 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{slug(question_tag)}/questions">
152 <span t-attf-class="pull-right badge #{tag and tag.name == question_tag.name and 'badge-active' ''}" t-field="question_tag.name"
153 style="margin-right: 4px;"/>
156 <div class="text-muted">
157 by <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
158 t-field="question.create_uid" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
159 style="display: inline-block;"/>
160 on <span t-field="question.write_date" t-field-options='{"format":"short"}'/>
161 with <b t-field="question.views"/> views
162 <span t-if="question.vote_count>0"> and
163 <b t-esc="question.vote_count or 0"/>
164 <t t-if="question.vote_count>1">votes</t>
165 <t t-if="question.vote_count==1">vote</t>
172 <!-- Display a post as an answer -->
173 <template id="display_post_answer">
174 <div class="clearfix">
175 <div t-attf-class="pull-left text-center mb16 box #{len(answer.vote_ids) and 'oe_green' or 'oe_grey'}">
176 <div t-esc="len(answer.vote_ids)"/>
178 <div class="question-name" style="margin-left: 32px;">
179 <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"/>
180 <t t-if="len(answer.website_message_ids)>0">
181 (<t t-esc="len(answer.website_message_ids)"/>
182 <t t-if="len(answer.website_message_ids)>1">Comments</t>
183 <t t-if="len(answer.website_message_ids)<=1">Comment</t>)
191 <t t-call="website_forum.header">
192 <div t-field="forum.faq"/>
196 <!-- All Forums Layout -->
197 <template id="forum_all">
198 <t t-call="website.layout">
199 <div class="container">
200 <h1 class="mb32">Our forums</h1>
202 <div t-foreach="forums" t-as="forum" class="col-sm-3 text-center mb32">
203 <a t-attf-href="/forum/#{ slug(forum) }">
204 <div class="fa fa-5x fa-comment mb16"/>
205 <div t-field="forum.name"/>
213 <!-- Specific Forum Layout -->
214 <template id="forum_index" name="Forum">
215 <t t-call="website_forum.header">
216 <h1 class="page-header mt0">
217 <t t-esc="question_count"/> <span>Questions</span>
219 <small class="dropdown" t-if="filters in ('all', 'unanswered','followed', 'tag')">
220 <a href="#" class="dropdown-toggle" data-toggle="dropdown">
221 <t t-if="filters == 'all'">All</t>
222 <t t-if="filters == 'unanswered'">Unanswered</t>
223 <t t-if="filters == 'followed'">Followed</t>
224 <t t-if="tag"><span t-field="tag.name"/></t>
225 <t t-if="sorting == 'date'"> by activity date</t>
226 <t t-if="sorting == 'answered'"> by most answered</t>
227 <t t-if="sorting == 'vote'"> by most voted</t>
230 <ul class="dropdown-menu">
231 <li class="dropdown-header">Filter on</li>
232 <li t-att-class="filters == 'all' and 'active' or '' ">
233 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='all')">All</a>
235 <li t-att-class="filters == 'unanswered' and 'active' or '' ">
236 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='unanswered')">Unanswered</a>
238 <li t-if="uid" t-att-class="filters == 'followed' and 'active' or '' ">
239 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'sorting', filters='followed')">Followed</a>
241 <li class="dropdown-header">Tags</li>
242 <li t-if="tag" t-att-class="tag and 'active' or '' ">
243 <a href=""><t t-esc="tag.name"/></a>
245 <li class="dropdown-header">Sort by</li>
246 <li t-att-class="sorting == 'date' and 'active' or '' ">
247 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='date')">Last activity date</a>
249 <li t-att-class="sorting == 'answered' and 'active' or '' ">
250 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='answered')">Most answered</a>
252 <li t-att-class="sorting == 'vote' and 'active' or '' ">
253 <a t-att-href="url_for('') + '?' + keep_query( 'search', 'filters', sorting='vote')">Most voted</a>
258 <div t-foreach="question_ids" t-as="question" class="mb16">
259 <t t-call="website_forum.display_post"/>
261 <t t-call="website.pager"/>
266 <t t-call="website_forum.header">
267 <div class="oe_structure oe_empty"/>
268 <h1 class="mt32">Question not found!</h1>
269 <p>Sorry, this question is not available anymore.</p>
271 <a t-attf-href="/forum">Return to the question list.</a>
276 <!-- Edition: ask your question -->
277 <template id="ask_question">
278 <t t-call="website_forum.header">
279 <h1 class="mt0">Ask your Question</h1>
281 <li> please, try to make your question interesting to others </li>
282 <li> provide enough details and, if possible, give an example </li>
283 <li> be clear and concise, avoid unnecessary introductions (Hi, ... Thanks...) </li>
285 <form t-attf-action="/forum/#{ slug(forum) }/question/new" method="post" role="form" class="tag_text">
286 <input type="text" name="question_name" required="True" t-attf-value="#{question_name}"
287 class="form-control" placeholder="Enter your Question"/>
288 <h5 class="mt20">Please enter a descriptive question (should finish by a '?')</h5>
289 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
290 <textarea name="content" required="True" class="form-control load_editor">
291 <t t-esc="question_content"/>
294 <input type="text" name="question_tags" placeholder="Tags" class="form-control load_tags"/>
296 <button class="btn btn-primary" id="btn_ask_your_question">Post Your Question</button>
298 <script type="text/javascript">
299 CKEDITOR.replace("content");
304 <!-- Edition: edit a post -->
305 <template id="edit_post">
306 <t t-call="website_forum.header">
307 <h3 t-if="not is_answer">Edit question</h3>
308 <h3 t-if="is_answer">Edit answer</h3>
309 <form t-attf-action="/forum/#{slug(forum)}/post/#{slug(post)}/save" method="post" role="form" class="tag_text">
310 <div t-if="not is_answer">
311 <input type="text" name="question_name" id="question_name" required="True"
312 t-attf-value="#{post.name}" class="form-control" placeholder="Edit your Question"/>
313 <h5 class="mt20">Please enter a descriptive question (should finish by a '?')</h5>
315 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
316 <textarea name="content" required="True" class="form-control load_editor">
317 <t t-esc="post.content"/>
319 <div t-if="not is_answer">
321 <input type="text" name="question_tag" class="form-control col-md-9 load_tags" placeholder="Tags" t-attf-value="#{tags}"/>
324 <button class="btn btn-primary btn-lg">Save</button>
326 <script type="text/javascript">
327 CKEDITOR.replace("content");
332 <!-- Moderation: close a question -->
333 <template id="close_question">
334 <t t-call="website_forum.header">
335 <h1 class="mt0">Close question</h1>
336 <p class="text-muted">
337 If you close this question, it will be hidden for most users. Only
338 users having a high karma can see closed questions to moderate
341 <form t-attf-action="/forum/#{ slug(forum) }/question/#{slug(question)}/close" method="post" role="form" class="form-horizontal mt32 mb64">
342 <input name="post_id" t-att-value="question.id" type="hidden"/>
343 <div class="form-group">
344 <label class="col-md-3 control-label" for="reason">Question:</label>
345 <div class="col-md-8 mt8">
346 <span t-field="question.name"/>
349 <div class="form-group">
350 <label class="col-md-3 control-label" for="reason">Reason:</label>
351 <div class="col-md-8">
352 <select class="form-control" name="reason_id">
353 <t t-foreach="reasons or []" t-as="reason">
354 <option t-att-value="reason.id" t-att-selected="reason.id == question.closed_reason_id.id"><t t-esc="reason.name"/></option>
359 <div class="form-group">
360 <div class="col-md-offset-3 col-md-8">
361 <button class="btn btn-primary">Close question</button>
362 <span class="text-muted">or</span>
363 <a class="btn btn-link" t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }">back to question</a>
370 <!-- Edition: post an answer -->
371 <template id="post_answer">
372 <h3 class="mt10">Your answer</h3>
374 <b>Please try to give a substantial answer.</b> If you wanted to comment on the question or answer, just
375 <b>use the commenting tool.</b> Please remember that you can always <b>revise your answers</b>
376 - no need to answer the same question twice. Also, please <b>don't forget to vote</b>
377 - it really helps to select the best questions and answers!
379 <form t-attf-action="/forum/#{ slug(forum) }/post/#{slug(question)}/new" method="post" role="form">
380 <input type="hidden" name="karma" t-attf-value="#{user.karma}" id="karma"/>
381 <textarea name="content" class="form-control load_editor" required="True"/>
382 <button class="btn btn-primary" id="btn_ask_your_question">Post Your Answer</button>
384 <script type="text/javascript">
385 CKEDITOR.replace("content");
390 <div t-attf-class="box oe_grey">
391 <a t-attf-class="vote_up fa fa-thumbs-up no-decoration #{post.user_vote == 1 and 'text-success' or ''}"
392 t-attf-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/upvote"/>
393 <span id="vote_count" t-esc="post.vote_count"/>
394 <a t-attf-class="vote_down fa fa-thumbs-down no-decoration #{post.user_vote == -1 and 'text-warning' or ''}"
395 t-attf-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/downvote"/>
396 <div t-if="vote_count > 1" class="subtitle">
399 <div t-if="vote_count < 2" class="subtitle">
405 <!-- Specific Post Layout -->
406 <template id="post_description_full" name="Question Navigation">
407 <t t-call="website_forum.header">
408 <div t-attf-class="question #{not question.active and 'alert alert-danger' or ''}">
409 <div class="text-center pull-left">
410 <t t-call="website_forum.vote">
411 <t t-set="post" t-value="question"/>
413 <div class="text-muted text-center">
414 <span t-field="question.views"/> Views
417 <a t-attf-href="/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
418 t-attf-class="favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}"/>
421 <div style="margin-left: 95px;">
423 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field="question.name"/>
424 <span t-if="not question.active"><b> [Deleted]</b></span>
425 <span t-if="question.state == 'close'"><b> [Closed]</b></span>
427 <div class="alert alert-info" t-if="question.state == 'close'">
428 <p class="mt32 mb16 text-center">
429 <b>The question has been closed for reason: <i t-esc="question.closed_reason_id.name"/>
431 <t t-if="question.closed_uid">
432 <i>by <a t-attf-href="/forum/#{ slug(forum) }/user/#{ slug(question.closed_uid) }" t-field="question.closed_uid"/> </i>
434 on <span t-field="question.closed_date"/></b>
436 <div t-if="question.state == 'close' and user.karma>=500" class="mb24 text-center">
437 <a class="fa fa-arrow-right" t-attf-href="/forum/#{ slug(forum) }/question/#{slug(question)}/reopen"> Reopen</a>
440 <t t-raw="question.content"/>
442 <div class="mt16 clearfix">
443 <div class="pull-right">
444 <div class="text-right">
445 <t t-foreach="question.tag_ids" t-as="tag">
446 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ tag.id }/questions" class="badge" t-field="tag.name"/>
449 <ul class="list-inline" id="options">
450 <li t-if="user.id == question.create_uid.id or user.karma>=50">
451 <a style="cursor: pointer" data-toggle="collapse" class="text-muted fa fa-comment-o"
452 t-attf-data-target="#comment#{ question._name.replace('.','') + '-' + str(question.id) }">
456 <li t-if="question.state != 'close' and ((user.id == question.create_uid.id and can_close_own) or can_close_all)">
457 <a class="text-muted fa fa-times" t-attf-href="/forum/#{ slug(forum) }/question/#{slug(question)}/ask_for_close"> Close</a>
459 <li t-if="question.state == 'close' and ((user.id == question.create_uid.id and can_close_own) or can_close_all)">
460 <a class="text-muted fa fa-undo" t-attf-href="/forum/#{ slug(forum) }/question/#{slug(question)}/reopen"> Reopen</a>
462 <li t-if="(user.id == question.create_uid.id and can_edit_own) or can_edit_all">
463 <a class="text-muted fa fa-edit" t-attf-href="/forum/#{ slug(forum) }/post/#{slug(question)}/edit"> Edit</a>
465 <li t-if="question.active and ((user.id == question.create_uid.id and can_unlink_own) or can_unlink_all)">
466 <a class="text-muted fa fa-trash-o" t-attf-href="/forum/#{ slug(forum) }/question/#{slug(question)}/delete"> Delete</a>
468 <li t-if="not question.active and ((user.id == question.create_uid.id and can_unlink_own) or can_unlink_all)">
469 <a class="text-muted fa fa-trash-o" t-attf-href="/forum/#{ slug(forum) }/question/#{slug(question)}/undelete"> Undelete</a>
474 <span t-field="question.create_uid.image" t-field-options='{"widget": "image", "class":"pull-left img img-circle img-avatar"}'/>
476 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
477 t-field="question.create_uid"
478 t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
479 style="display: inline-block;"/>
480 <div t-field="question.create_uid" t-field-options='{"widget": "contact", "badges": true, "fields": ["karma"]}'/>
484 <t t-call="website_forum.post_comment">
485 <t t-set="object" t-value="question"/>
491 <div t-foreach="question.child_ids" t-as="answer" class="mt16 mb32">
492 <a t-attf-id="answer-#{str(answer.id)}"/>
493 <div t-attf-class="forum_answer" t-attf-id="answer_#{answer.id}" >
494 <div class="text-center pull-left">
495 <t t-call="website_forum.vote">
496 <t t-set="post" t-value="answer"/>
498 <div class="text-muted mt8">
499 <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'}"
500 t-attf-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
503 <div style="margin-left: 95px;" class="clearfix">
504 <t t-raw="answer.content"/>
506 <ul class="list-inline pull-right">
507 <li t-if="user.id == answer.create_uid.id or user.karma>=50">
508 <a style="cursor: pointer" data-toggle="collapse" class="text-muted fa fa-comment-o"
509 t-attf-data-target="#comment#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Comment
512 <li t-if="(user.id == answer.create_uid.id and can_edit_own) or can_edit_all">
513 <a class="text-muted fa fa-edit" t-attf-href="/forum/#{slug(forum)}/post/#{slug(answer)}/edit"> Edit</a>
515 <li t-if="(user.id == answer.create_uid.id and can_unlink_own) or can_unlink_all">
516 <a class="text-muted fa fa-trash-o" t-attf-href="/forum/#{slug(forum)}/post/#{slug(answer)}/delete"> Delete</a>
518 <li t-if="user.id == answer.create_uid.id">
519 <a class="text-muted fa fa-magic" t-attf-href="/forum/#{slug(forum)}/post/#{slug(answer)}/convert_to_comment"> Convert as a comment</a>
522 <span t-field="answer.create_uid.image" t-field-options='{"widget": "image", "class":"pull-left img img-circle img-avatar"}'/>
524 <a t-attf-href="/forum/#{ slug(forum) }/user/#{ answer.create_uid.id }"
525 t-field="answer.create_uid"
526 t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
527 style="display: inline-block;"/>
528 <div t-field="answer.create_uid" t-field-options='{"widget": "contact", "badges": true, "fields": ["karma"]}'/>
529 <span class="text-muted">Answered on <span t-field="answer.create_date" t-field-options='{"format":"short"}'/></span>
532 <t t-call="website_forum.post_comment">
533 <t t-set="object" t-value="answer"/>
538 <div t-if="not question.uid_has_answered">
539 <t t-call="website_forum.post_answer"/>
541 <div t-if="question.uid_has_answered" class="mb16">
542 <a class="btn btn-primary" t-attf-href="/forum/#{slug(forum)}/question/#{slug(question)}/edit_answer">Edit Your Previous Answer</a>
543 <span class="text-muted">(only one answer per question is allowed)</span>
548 <!-- Utility template: Post a Comment -->
549 <template id="post_comment">
550 <div class="row clearfix">
551 <div class="col-sm-10 col-sm-offset-2">
552 <div t-foreach="reversed(object.website_message_ids)" t-as="message" class="comment oe_comment_grey">
553 <small class="text-muted">
554 <button type="button" t-if="user.partner_id.id == message.author_id.id and user.karma>=750"
555 t-attf-href="/forum/#{slug(forum)}/post/#{slug(object)}/comment/#{slug(message)}/delete"
556 class="close comment_delete">&times;</button>
557 <span t-field="message.body"/>
558 <a t-attf-href="/forum/#{slug(forum)}/partner/#{message.author_id.id}"
559 t-field="message.author_id" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
560 style="display: inline-block;"/>
561 on <span t-field="message.date" t-field-options='{"format":"short"}'/>
562 <a class="fa fa-magic text-muted pull-right"
563 t-attf-href="/forum/#{slug(forum)}/post/#{slug(object)}/comment/#{slug(message)}/convert_to_answer">Convert as an answer</a>
566 <div class="css_editable_mode_hidden">
567 <form t-attf-id="comment#{ object._name.replace('.','') + '-' + str(object.id) }" class="collapse oe_comment_grey"
568 t-attf-action="/forum/#{slug(forum)}/post/#{slug(object)}/comment" method="POST">
569 <input name="post_id" t-att-value="object.id" type="hidden" class="mt8"/>
570 <textarea name="comment" class="form-control" placeholder="Comment this post..."/>
571 <button type="submit" class="btn btn-primary mt8">Post</button>
579 <t t-call="website_forum.header">
583 <p class="text-muted">
584 A tag is a label that categorizes your question with other,
585 similar questions. Using the right tags makes it easier for
586 others to find and answer your question.
589 <div class="col-sm-3 mt16" t-foreach="tags" t-as="tag">
590 <a t-attf-href="/forum/#{ slug(forum) }/tag/#{ slug(tag) }/questions?{{ keep_query( filters='tag') }}" class="badge">
591 <span t-field="tag.name"/>
594 X <t t-esc="tag.posts_count"/>
601 <template id="badge">
602 <t t-call="website_forum.header">
607 Besides gaining reputation with your questions and answers,
608 you receive badges for being especially helpful. Badges
609 appear on your profile page, and your posts.
611 <table class="table mt32 mb64">
612 <tr t-foreach="badges" t-as="badge">
614 <a t-attf-href="/forum/#{ slug(forum) }/badge/#{ slug(badge) }" class="badge pull-left">
615 <span t-if="badge.level == 'gold'" class="fa fa-circle badge-gold"/>
616 <span t-if="badge.level == 'silver'" class="fa fa-circle badge-silver"/>
617 <span t-if="badge.level == 'bronze'" class="fa fa-circle badge-bronze"/>
618 <span t-field="badge.name"/>
621 <b t-esc="badge.stat_count_distinct"/>
622 <i class="text-muted">awarded users</i>
624 <span t-field="badge.description"/>
631 <template id="badge_user">
632 <t t-call="website_forum.header">
633 <h3 class="mt32 mb32">
634 <b>Badge "<span t-field="badge.name"/>"</b>
637 <div class="pull-left badge">
638 <span t-if="badge.level == 'gold'" class="fa fa-circle badge-gold"/>
639 <span t-if="badge.level == 'silver'" class="fa fa-circle badge-silver"/>
640 <span t-if="badge.level == 'bronze'" class="fa fa-circle badge-bronze"/>
641 <span t-field="badge.name"/>
643 <span t-field="badge.description" style="margin-left:20px"/>
646 <t class="pull-left" t-esc="badge.stat_count_distinct"/>
647 <span t-if="badge.stat_count_distinct>1">users</span>
648 <span t-if="badge.stat_count_distinct<=1">user</span>
652 <div class="col-sm-3 mt16" t-foreach="users" t-as="user">
653 <span t-field="user.image" t-field-options='{"widget": "image", "class":"pull-left img img-circle img-avatar"}'/>
655 <a t-attf-href="/forum/#{slug(forum)}/user/#{user.id}" t-field="user.name"/>
662 <template id="users">
663 <t t-call="website_forum.header">
665 <div t-foreach="users" t-as="user" class="col-sm-4">
666 <span t-field="user.image" t-field-options='{"widget": "image", "class":"pull-left img img-circle img-avatar"}'/>
668 <a t-attf-href="/forum/#{slug(forum)}/user/#{user.id}" t-field="user.name"/>
669 <t t-if="user.country_id">
670 <span t-field="user.country_id.image" t-field-options='{"widget": "image", "class": "country_flag"}'/>
672 <b><t t-esc="user.karma"/></b>
673 <t t-raw="separator"/>
676 <span class="fa fa-circle badge-gold"/>
677 <t t-esc="user.gold_badge"/>
678 <span class="fa fa-circle badge-silver"/>
679 <t t-esc="user.silver_badge"/>
680 <span class="fa fa-circle badge-bronze"/>
681 <t t-esc="user.bronze_badge"/>
687 <div class="pull-left">
688 <t t-call="website.pager"/>
693 <template id="edit_profile">
694 <t t-call="website_forum.header">
695 <h3>Edit Profile </h3>
696 <div class="col-md-2">
697 <span t-field="user.image" t-field-options='{"widget": "image", "class": "img img-responsive img-circle"}'/>
699 <form t-attf-action="/forum/#{slug(forum)}/user/#{slug(user)}/save" method="post" role="form" class="form-horizontal">
700 <input name="user_id" t-att-value="user.id" type="hidden"/>
701 <label class="col-md-2 control-label mb16" for="user.name">Real name</label>
702 <div class="col-md-7 mb16">
703 <input type="text" class="col-md-7 mb16 form-control" name="name" required="True" t-attf-value="#{user.name}"/>
705 <label class="col-md-2 control-label mb16" for="user.partner_id.website">Website</label>
706 <div class="col-md-7 mb16">
707 <input type="text" class="form-control" name="website" t-attf-value="#{user.partner_id.website or ''}"/>
709 <label class="col-md-4 control-label mb16" for="user.partner_id.email">Email</label>
710 <div class="col-md-7 mb16">
711 <input type="text" class="form-control" name="email" required="True" t-attf-value="#{user.partner_id.email}"/>
713 <label class="col-md-4 control-label mb16" for="user.partner_id.city">City</label>
714 <div class="col-md-7 mb16">
715 <input type="text" class="form-control" name="city" t-attf-value="#{user.partner_id.city or ''}"/>
717 <label class="col-md-4 control-label mb16" for="contact_name">Country</label>
718 <div class="col-md-7 mb16">
719 <select class="form-control" name="country">
720 <option value="">Country...</option>
721 <t t-foreach="countries or []" t-as="country">
722 <option t-att-value="country.id" t-att-selected="country.id == user.partner_id.country.id"><t t-esc="country.name"/></option>
726 <!--Note: using website_description fiels instead of using commnt firld of partner-->
727 <label class="col-md-4 control-label mb16" for="user.partner_id.website_description">Biography</label>
728 <div class="col-md-7 mb16">
729 <textarea name="description" style="min-height: 120px" required="True"
730 class="form-control"><t t-esc="user.partner_id.website_description"/></textarea>
732 <div class="col-sm-offset-4 col-md-4 mb16">
733 <button class="btn btn-primary btn-lg">Update</button>
739 <template id="user_detail_full">
740 <t t-call="website_forum.header">
741 <h1 class="mt0 page-header">
742 <span t-field="user.name"/>
743 <small>profile</small>
746 <div class="col-sm-2">
747 <span t-field="user.image"
748 t-field-options='{"widget": "image", "class": "img img-responsive img-circle"}'/>
750 <div class="col-sm-10">
751 <table class="table table-condensed">
753 <td rowspan="2" valign="top"><span class="text-muted">contributions</span></td>
754 <td>member since</td>
755 <td><span t-field="user.create_date" t-field-options='{"format": "short"}'/></td>
757 <td>last connection</td>
758 <td><span t-field="user.login_date" t-field-options='{"format": "short"}'/></td>
761 <td rowspan="2" valign="top"><span class="text-muted">bio</span></td>
764 <a t-att-href="user.website" t-if="user.website">
765 <span t-field="user.website"/>
771 <span t-field="user.city"/>
772 <span t-if="user.city and user.country_id">, </span>
773 <span t-field="user.country_id"/>
774 <t t-if="user.country_id"> <span t-field="user.country_id.image" t-field-options='{"widget": "image", "class": "country_flag"}'/></t>
779 <td rowspan="2" valign="top"><span class="text-muted">stats</span></td>
781 <td><span t-field="user.karma"/></td>
785 <span class="fa fa-thumbs-up"/>
786 <span t-esc="up_votes"/>
787 <span class="fa fa-thumbs-down"/>
788 <span t-esc="down_votes"/>
792 <div class="well well-sm">
793 <span t-field="user.partner_id.website_description" class="oe_no_empty"/>
794 <t t-if="uid == user.id">
795 <a class="fa fa-arrow-right" t-attf-href="/forum/#{slug(forum)}/user/#{slug(user)}/edit"> Edit Your Bio</a>
801 <ul class="nav nav-tabs">
803 <a href="#questions" data-toggle="tab"><t t-esc="len(questions)"/> Questions</a>
806 <a href="#answers" data-toggle="tab"><t t-esc="len(answers)"/> Answers</a>
808 <li t-if="uid == user.id">
809 <a href="#favourite_question" data-toggle="tab"><t t-esc="len(favourite)"/> Favourite Questions</a>
811 <li t-if="uid == user.id">
812 <a href="#followed_question" data-toggle="tab"><t t-esc="len(followed)"/> Followed Questions</a>
814 <li t-if="uid == user.id">
815 <a href="#activity" data-toggle="tab">Activity</a>
818 <a href="#badges" data-toggle="tab">Badges</a>
820 <li t-if="uid == user.id">
821 <a href="#votes" data-toggle="tab">Votes</a>
824 <div class="tab-content mt16">
825 <div class="tab-pane active" id="questions">
826 <div class="mb16" t-foreach="questions" t-as="question">
827 <t t-call="website_forum.display_post"/>
829 </div><div class="tab-pane" id="answers">
830 <div t-foreach="answers" t-as="answer">
831 <t t-call="website_forum.display_post_answer"/>
834 <div class="tab-pane" id="karma">
837 <div class="tab-pane" id="badges">
838 <t t-call="website_forum.user_badges"/>
840 <div class="tab-pane" id="favourite_question">
841 <div t-foreach="favourite" t-as="question">
842 <t t-call="website_forum.display_post"/>
845 <div class="tab-pane" id="followed_question">
846 <div t-foreach="followed" t-as="question" class="mb16">
847 <t t-call="website_forum.display_post"/>
850 <div class="tab-pane" id="votes">
851 <t t-call="website_forum.user_votes"/>
853 <div class="tab-pane" id="activity">
854 <ul class="list-unstyled">
855 <li t-foreach="activities" t-as="activity">
856 <span t-field="activity.date" t-field-options='{"format": "short"}'/>
857 <span t-esc="activity.subtype_id.name" class="label label-info"/>
858 <t t-set="post" t-value="posts[activity.res_id]"/>
859 <span t-if="post[1]">
860 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(post[0]) }#answer-#{ str(post[1].id) }">
861 <span t-esc="post[0].name"/>
864 <span t-if="not post[1]">
865 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ slug(post[0]) }">
866 <span t-esc="post[0].name"/>
876 <template id="user_badges">
877 <table class="table mt32 mb64">
878 <tr t-foreach="user.badge_ids" t-as="badge">
880 <a t-attf-href="/forum/#{ slug(forum) }/badge/#{ slug(badge.badge_id) }" class="badge pull-left">
881 <span t-if="badge.badge_id.level == 'gold'" class="fa fa-circle badge-gold"/>
882 <span t-if="badge.badge_id.level == 'silver'" class="fa fa-circle badge-silver"/>
883 <span t-if="badge.badge_id.level == 'bronze'" class="fa fa-circle badge-bronze"/>
884 <span t-field="badge.badge_id.name"/>
887 <b t-esc="badge.badge_id.stat_count_distinct"/>
888 <i class="text-muted">awarded users</i>
890 <span t-field="badge.badge_id.description"/>
894 <div class="mb16" t-if="not user.badge_ids">
895 <b>No badge yet!</b><br/>
896 <a t-attf-href="/forum/#{ slug(forum) }/badge" class="fa fa-arrow-right"> Check available badges</a>
900 <template id="user_votes">
901 <div t-foreach="vote_post" t-as="vote">
902 <t t-esc="vote.post_id.create_date"/>
903 <span t-if="vote.vote == '1'" class="fa fa-thumbs-up text-success" style="margin-left:30px"/>
904 <span t-if="vote.vote == '-1'" class="fa fa-thumbs-down text-warning" style="margin-left:30px"/>
905 <t t-if="vote.post_id.parent_id">
906 <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"/>
908 <t t-if="not vote.post_id.parent_id">
909 <a t-attf-href="/forum/#{ slug(forum) }/question/#{ vote.post_id.id }" style=" color:black;margin-left:10px" t-esc="vote.post_id.name"/>
912 <div class="mb16" t-if="not vote_post">
913 <b>No vote given by you yet!</b>