2014-02-21 13:16:08 +00:00
<?xml version="1.0" encoding="utf-8"?>
<openerp >
2014-02-28 05:33:13 +00:00
<data >
2014-04-11 13:29:39 +00:00
<!-- Layout add nav and footer -->
2014-06-02 15:01:44 +00:00
<template id= "header_footer_custom" inherit_id= "website.footer_default"
2014-04-11 13:29:39 +00:00
name="Footer Questions Link">
2014-06-02 14:56:36 +00:00
<xpath expr= "//ul[@id='products']" position= "inside" >
2014-04-11 13:29:39 +00:00
<li > <a t-attf-href= "/forum/%(website_forum.forum_help)d" > Q& A</a> </li>
<li > <a href= "/forum" > Forums</a> </li>
</xpath>
</template>
2014-02-28 05:33:13 +00:00
2014-05-12 16:34:55 +00:00
<!-- helper -->
2014-05-13 14:57:12 +00:00
<template id= "link_button" >
2014-05-12 16:34:55 +00:00
<form method= "POST" t-att-action= "url" >
2014-07-01 07:19:22 +00:00
<button t-attf-class= "fa btn-link #{classes} #{karma and 'karma_required text-muted' or ''}" t-attf-data-karma= "#{karma}" >
2014-05-12 16:34:55 +00:00
<t t-esc= "label" /> </button>
</form>
</template>
2014-08-28 15:04:01 +00:00
<template id= "assets_frontend" inherit_id= "website.assets_frontend" name= "website_forum assets" >
<xpath expr= "." position= "inside" >
2014-08-28 10:21:47 +00:00
<link rel= 'stylesheet' href= "/web/static/lib/jquery.textext/jquery.textext.css" />
<link rel= 'stylesheet' href= '/website_forum/static/src/css/website_forum.css' />
<script type= "text/javascript" src= "/web/static/lib/jquery.textext/jquery.textext.js" />
2014-11-18 15:20:58 +00:00
<script type= "text/javascript" src= "/web/static/lib/select2/select2.js" > </script>
<link rel= "stylesheet" href= "/web/static/lib/select2/select2.css" />
<link rel= "stylesheet" href= "/website/static/lib/select2-bootstrap-css/select2-bootstrap.css" />
2014-11-18 16:42:13 +00:00
<script type= "text/javascript" src= "/website_forum/static/src/js/website_forum.js" />
2014-08-28 10:21:47 +00:00
</xpath>
</template>
2014-09-11 12:08:03 +00:00
<template id= "assets_editor" inherit_id= "website.assets_editor" name= "Forum Editor" groups= "base.group_user" >
<xpath expr= "." position= "inside" >
<script type= "text/javascript" src= "/website_forum/static/src/js/website.tour.forum.js" />
<script type= "text/javascript" src= "/website_forum/static/src/js/website_forum.editor.js" />
</xpath>
</template>
2014-04-11 13:29:39 +00:00
<!-- Page Index -->
<template id= "header" name= "Forum Index" >
<t t-call= "website.layout" >
<t t-set= "head" >
<script type= "text/javascript" src= "/web/static/lib/ckeditor/ckeditor.js" />
<script type= "text/javascript" >
CKEDITOR.config.toolbar = [['Bold','Italic','Underline','Strike'],['NumberedList','BulletedList', 'Blockquote']
,['Outdent','Indent','Link','Unlink','Image'],] ;
</script>
</t>
2014-08-28 10:21:47 +00:00
<div class= "container mt16 website_forum" >
2014-04-11 13:29:39 +00:00
<div class= "navbar navbar-default" >
<div class= "navbar-header" >
<button type= "button" class= "navbar-toggle" data-toggle= "collapse" data-target= "#oe-help-navbar-collapse" >
<span class= "sr-only" > Toggle navigation</span>
<span class= "icon-bar" > </span>
<!-- <span class="icon - bar"></span> -->
<span class= "icon-bar" > </span>
</button>
<a class= "navbar-brand" t-attf-href= "/forum/#{slug(forum)}" >
<span t-field= "forum.name" />
</a>
2014-02-28 05:33:13 +00:00
</div>
2014-04-11 13:29:39 +00:00
<div class= "collapse navbar-collapse" id= "oe-help-navbar-collapse" >
<ul class= "nav navbar-nav" >
<li t-att-class= "filters in ('all', 'unanswered','followed','question','tag') and 'active' or '' " >
<a t-attf-href= "/forum/#{ slug(forum) }" > Questions</a>
</li>
<li t-att-class= "searches.get('users') and 'active' or '' " >
<a t-attf-href= "/forum/#{ slug(forum) }/users" > People</a>
</li>
<li t-att-class= "searches.get('tags') and 'active' or '' " >
<a t-attf-href= "/forum/#{ slug(forum) }/tag" > Tags</a>
</li>
<li t-att-class= "searches.get('badges') and 'active' or '' " >
<a t-attf-href= "/forum/#{ slug(forum) }/badge" > Badges</a>
</li>
2014-05-22 11:49:41 +00:00
<li t-if= "not is_public_user" t-att-class= "searches.get('my_profile') and 'active' or '' " >
2014-08-05 06:41:21 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/user/#{uid}" > My Profile</a>
2014-05-22 11:49:41 +00:00
</li>
2014-04-11 13:29:39 +00:00
</ul>
<form class= "navbar-form navbar-right" role= "search" t-attf-action= "/forum/#{ slug(forum) }" method= "get" >
<div class= "form-group" >
<input type= "search" class= "form-control"
name="search" placeholder="Search a question..."
t-att-value="search or ''"/>
<button type= "submit" class= "btn btn-default" > Search</button>
2014-03-03 15:53:55 +00:00
</div>
2014-04-11 13:29:39 +00:00
</form>
2014-02-28 05:33:13 +00:00
</div>
</div>
2014-04-11 13:29:39 +00:00
</div>
2014-02-28 05:33:13 +00:00
2014-04-11 13:29:39 +00:00
<div id= "wrap" class= "container" >
<div class= "row" >
<div class= "col-sm-9" >
<div t-foreach= "notifications or []" t-as= "notification" class= "alert alert-success alert-dismissable" >
<button type= "button" class= "close notification_close" t-att-id= "notification.id" data-dismiss= "alert" aria-hidden= "true" > & times;</button>
<div t-field= "notification.body" />
2014-04-23 14:20:34 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/user/#{ user.id }#badges" class= "fa fa-arrow-right" > View Your Badges</a>
2014-04-11 13:29:39 +00:00
</div>
2014-09-19 07:25:19 +00:00
<div t-if= "not validation_email_sent and not is_public_user and user.karma == 0" class= "alert alert-danger alert-dismissable" >
<button type= "button" class= "close validation_email_close" data-dismiss= "alert" aria-hidden= "true" > & times;</button>
<div >
<p >
It appears your email has not been verified.
<a class= "send_validation_email" href= "#" t-att-forum-id= "forum.id" > Click here to send a verification email allowing you to participate to the forum.</a>
</p>
</div>
</div>
<div t-if= "validation_email_done" class= "alert alert-success alert-dismissable" >
<button type= "button" class= "close validated_email_close" data-dismiss= "alert" aria-hidden= "true" > & times;</button>
<div >
<p > Congratulations! Your email has just been validated. You may now participate to our forums.</p>
</div>
</div>
2014-04-11 13:29:39 +00:00
<t t-raw= "0" />
</div>
<div class= "col-sm-3" id= "right-column" >
2014-10-20 23:19:05 +00:00
<a t-if= "not header.get('ask_hide')"
2014-10-22 11:48:19 +00:00
t-attf-class="btn btn-primary btn-lg btn-block mb16 #{(user.karma < forum.karma_ask) and 'karma_required' or ''}"
2014-10-20 23:19:05 +00:00
t-attf-href="/forum/#{slug(forum)}/ask"
t-attf-data-karma="#{forum.karma_ask}">Ask a Question</a>
2014-05-22 11:49:41 +00:00
<div class= "panel panel-default" >
<div class= "panel-heading" >
<h3 class= "panel-title" > Keep Informed</h3>
</div>
<div class= "panel-body" >
<t t-call= "website_mail.follow" >
<t t-set= "email" t-value= "user.email" />
<t t-set= "object" t-value= "forum" />
</t>
</div>
</div>
2014-04-17 11:28:44 +00:00
<div class= "panel panel-default" id= "about_forum" >
2014-04-11 13:29:39 +00:00
<div class= "panel-heading" >
<h3 class= "panel-title" > About This Forum</h3>
2014-02-28 05:33:13 +00:00
</div>
2014-04-11 13:29:39 +00:00
<div class= "panel-body" >
2014-05-22 11:49:41 +00:00
<t t-raw= "forum.description" />
2014-05-05 15:45:23 +00:00
<a t-if= "not header.get('is_guidelines')" t-attf-href= "/forum/#{slug(forum)}/faq" class= "fa fa-arrow-right" > Read Guidelines</a>
<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>
2014-02-28 05:33:13 +00:00
</div>
</div>
2014-04-11 13:29:39 +00:00
<div t-if= "header.get('question_data')" >
<div class= "panel panel-default" >
<div class= "panel-heading text-center" >
<h3 class= "panel-title" > Question tools</h3>
2014-03-03 20:41:42 +00:00
</div>
2014-04-11 13:29:39 +00:00
<div class= "panel-body text-center" >
<t t-call= "website_mail.follow" > <t t-set= "object" t-value= "question" /> </t>
<div class= "mt8" >
<strong > <t t-raw= "len(question.message_follower_ids)" /> </strong> follower(s)
2014-04-09 16:50:59 +00:00
</div>
</div>
2014-04-11 13:29:39 +00:00
<div class= "panel-heading text-center" >
<h3 class= "panel-title " > Stats</h3>
</div>
2014-06-02 14:56:36 +00:00
<div class= "panel-body" >
2014-04-11 13:29:39 +00:00
<table class= "table" >
<thead > <tr > <td > Asked: <strong > <span t-field= "question.create_date" t-field-options= '{"format":"short"}' /> </strong> </td> </tr> </thead>
<tr > <td > Seen: <strong > <t t-raw= "question.views" /> </strong>
<span t-if= "question.views>1" > times</span>
<span t-if= "question.views<=1" > time</span>
</td> </tr>
<tr > <td > Last updated: <strong > <span t-field= "question.write_date" t-field-options= '{"format":"short"}' /> </strong> </td> </tr>
</table>
2014-03-28 05:16:06 +00:00
</div>
2014-02-28 05:33:13 +00:00
</div>
</div>
</div>
2014-04-11 13:29:39 +00:00
</div>
</div>
<div class= "oe_structure" />
</t>
</template>
2014-03-04 10:49:30 +00:00
2014-04-11 13:29:39 +00:00
<!-- Display a post -->
<template id= "display_post" >
2014-08-19 14:30:55 +00:00
<div class= "question row" >
2014-06-12 13:01:41 +00:00
<div class= "col-md-2 hidden-xs text-center" >
2014-04-21 17:23:30 +00:00
<div t-attf-class= "box #{question.is_correct and 'oe_green' or 'oe_grey'} #{(question.child_count == 0) and 'text-muted' or ''}" >
2014-04-11 13:29:39 +00:00
<span t-esc= "question.child_count" />
2014-04-21 17:23:30 +00:00
<div t-if= "question.child_count>1" class= "subtitle" > Answers</div>
<div t-if= "question.child_count<=1" class= "subtitle" > Answer</div>
2014-04-11 13:29:39 +00:00
</div>
</div>
2014-07-01 07:19:22 +00:00
<div class= "col-md-10 clearfix" >
2014-04-11 13:29:39 +00:00
<div class= "question-name" >
<a t-attf-href= "/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field= "question.name" />
<span t-if= "not question.active" > <b > [Deleted]</b> </span>
<span t-if= "question.state == 'close'" > <b > [Closed]</b> </span>
</div>
2014-05-06 12:30:01 +00:00
<t t-foreach= "question.tag_ids" t-as= "question_tag" >
<a t-attf-href= "/forum/#{ slug(forum) }/tag/#{slug(question_tag)}/questions" >
<span t-attf-class= "pull-right badge #{tag and tag.name == question_tag.name and 'badge-active' ''}" t-field= "question_tag.name"
style="margin-right: 4px;"/>
</a>
2014-04-21 17:23:30 +00:00
</t>
2014-04-11 13:29:39 +00:00
<div class= "text-muted" >
by <a t-attf-href= "/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
t-field="question.create_uid" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
style="display: inline-block;"/>
on <span t-field= "question.write_date" t-field-options= '{"format":"short"}' />
2014-06-12 13:01:41 +00:00
<span class= "visible-xs" >
<b t-esc= "question.child_count or 0" />
<t t-if= "question.child_count>1" > answers</t>
<t t-if= "question.child_count==1" > answers</t>
</span>
2014-04-21 17:23:30 +00:00
with <b t-field= "question.views" /> views
2014-06-02 14:56:36 +00:00
<span t-if= "question.vote_count>0" > and
2014-04-21 17:23:30 +00:00
<b t-esc= "question.vote_count or 0" />
<t t-if= "question.vote_count>1" > votes</t>
<t t-if= "question.vote_count==1" > vote</t>
</span>
2014-04-11 13:29:39 +00:00
</div>
</div>
</div>
</template>
2014-03-03 19:36:54 +00:00
2014-04-11 13:29:39 +00:00
<!-- Display a post as an answer -->
<template id= "display_post_answer" >
<div class= "clearfix" >
<div t-attf-class= "pull-left text-center mb16 box #{len(answer.vote_ids) and 'oe_green' or 'oe_grey'}" >
<div t-esc= "len(answer.vote_ids)" />
</div>
<div class= "question-name" style= "margin-left: 32px;" >
<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" />
<t t-if= "len(answer.website_message_ids)>0" >
(<t t-esc= "len(answer.website_message_ids)" />
<t t-if= "len(answer.website_message_ids)>1" > Comments</t>
<t t-if= "len(answer.website_message_ids)<=1" > Comment</t> )
2014-02-28 05:33:13 +00:00
</t>
2014-04-11 13:29:39 +00:00
</div>
</div>
</template>
2014-02-28 05:33:13 +00:00
2014-04-11 13:29:39 +00:00
<!-- FAQ Layout -->
<template id= "faq" >
<t t-call= "website_forum.header" >
<div t-field= "forum.faq" />
</t>
</template>
2014-02-28 05:33:13 +00:00
2014-04-11 13:29:39 +00:00
<!-- All Forums Layout -->
<template id= "forum_all" >
<t t-call= "website.layout" >
<div class= "container" >
<h1 class= "mb32" > Our forums</h1>
<div class= "row" >
<div t-foreach= "forums" t-as= "forum" class= "col-sm-3 text-center mb32" >
<a t-attf-href= "/forum/#{ slug(forum) }" >
<div class= "fa fa-5x fa-comment mb16" />
<div t-field= "forum.name" />
</a>
2014-02-28 05:33:13 +00:00
</div>
</div>
2014-04-11 13:29:39 +00:00
</div>
</t>
</template>
2014-02-28 05:33:13 +00:00
2014-04-11 13:29:39 +00:00
<!-- Specific Forum Layout -->
<template id= "forum_index" name= "Forum" >
<t t-call= "website_forum.header" >
<h1 class= "page-header mt0" >
2014-05-05 15:45:23 +00:00
<t t-esc= "question_count" /> <span > Questions</span>
2014-04-11 13:29:39 +00:00
<t t-esc= "search" />
<small class= "dropdown" t-if= "filters in ('all', 'unanswered','followed', 'tag')" >
<a href= "#" class= "dropdown-toggle" data-toggle= "dropdown" >
<t t-if= "filters == 'all'" > All</t>
<t t-if= "filters == 'unanswered'" > Unanswered</t>
<t t-if= "filters == 'followed'" > Followed</t>
2014-05-06 12:30:01 +00:00
<t t-if= "tag" > <span t-field= "tag.name" /> </t>
2014-04-11 13:29:39 +00:00
<t t-if= "sorting == 'date'" > by activity date</t>
2014-05-15 09:23:11 +00:00
<t t-if= "sorting == 'creation'" > by creation date</t>
2014-04-11 13:29:39 +00:00
<t t-if= "sorting == 'answered'" > by most answered</t>
<t t-if= "sorting == 'vote'" > by most voted</t>
<b class= "caret" />
</a>
<ul class= "dropdown-menu" >
<li class= "dropdown-header" > Filter on</li>
<li t-att-class= "filters == 'all' and 'active' or '' " >
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'sorting', filters='all')" > All</a>
</li>
<li t-att-class= "filters == 'unanswered' and 'active' or '' " >
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'sorting', filters='unanswered')" > Unanswered</a>
</li>
<li t-if= "uid" t-att-class= "filters == 'followed' and 'active' or '' " >
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'sorting', filters='followed')" > Followed</a>
</li>
<li class= "dropdown-header" > Tags</li>
<li t-if= "tag" t-att-class= "tag and 'active' or '' " >
<a href= "" > <t t-esc= "tag.name" /> </a>
</li>
<li class= "dropdown-header" > Sort by</li>
<li t-att-class= "sorting == 'date' and 'active' or '' " >
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'filters', sorting='date')" > Last activity date</a>
</li>
2014-05-15 09:23:11 +00:00
<li t-att-class= "sorting == 'creation' and 'active' or '' " >
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'filters', sorting='creation')" > Newest</a>
</li>
2014-04-11 13:29:39 +00:00
<li t-att-class= "sorting == 'answered' and 'active' or '' " >
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'filters', sorting='answered')" > Most answered</a>
</li>
<li t-att-class= "sorting == 'vote' and 'active' or '' " >
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'filters', sorting='vote')" > Most voted</a>
</li>
</ul>
</small>
</h1>
<div t-foreach= "question_ids" t-as= "question" class= "mb16" >
<t t-call= "website_forum.display_post" />
</div>
<t t-call= "website.pager" />
</t>
</template>
2014-02-28 05:33:13 +00:00
2014-04-11 13:29:39 +00:00
<template id= "404" >
<t t-call= "website_forum.header" >
<div class= "oe_structure oe_empty" />
<h1 class= "mt32" > Question not found!</h1>
<p > Sorry, this question is not available anymore.</p>
<p >
<a t-attf-href= "/forum" > Return to the question list.</a>
</p>
</t>
</template>
2014-03-12 06:34:07 +00:00
2014-04-11 13:29:39 +00:00
<!-- Edition: ask your question -->
<template id= "ask_question" >
<t t-call= "website_forum.header" >
<h1 class= "mt0" > Ask your Question</h1>
<ul >
<li > please, try to make your question interesting to others </li>
<li > provide enough details and, if possible, give an example </li>
<li > be clear and concise, avoid unnecessary introductions (Hi, ... Thanks...) </li>
</ul>
<form t-attf-action= "/forum/#{ slug(forum) }/question/new" method= "post" role= "form" class= "tag_text" >
<input type= "text" name= "question_name" required= "True" t-attf-value= "#{question_name}"
class="form-control" placeholder="Enter your Question"/>
2014-08-10 04:47:17 +00:00
<h5 class= "mt20" > Please enter a descriptive question (should finish with a '?')</h5>
2014-04-11 13:29:39 +00:00
<input type= "hidden" name= "karma" t-attf-value= "#{user.karma}" id= "karma" />
2014-11-14 18:14:12 +00:00
<input type= "hidden" name= "karma_retag" t-attf-value= "#{forum.karma_retag}" id= "karma_retag" />
2014-04-11 13:29:39 +00:00
<textarea name= "content" required= "True" class= "form-control load_editor" >
<t t-esc= "question_content" />
</textarea>
<br />
2014-11-14 18:14:12 +00:00
<input type= "hidden" name= "tag_type" value= "select2" />
<input type= "hidden" name= "question_tags" placeholder= "Tags" class= "form-control js_select2" />
2014-04-11 13:29:39 +00:00
<br />
2014-10-22 11:48:19 +00:00
<button t-attf-class= "btn btn-primary #{(user.karma < forum.karma_ask) and 'karma_required' or ''}"
2014-10-20 23:19:05 +00:00
id="btn_ask_your_question" t-att-data-karma="forum.karma_ask">Post Your Question</button>
2014-04-11 13:29:39 +00:00
</form>
<script type= "text/javascript" >
CKEDITOR.replace("content");
</script>
</t>
</template>
2014-03-21 12:57:47 +00:00
2014-04-11 13:29:39 +00:00
<!-- Edition: edit a post -->
<template id= "edit_post" >
<t t-call= "website_forum.header" >
<h3 t-if= "not is_answer" > Edit question</h3>
<h3 t-if= "is_answer" > Edit answer</h3>
2014-04-11 16:44:55 +00:00
<form t-attf-action= "/forum/#{slug(forum)}/post/#{slug(post)}/save" method= "post" role= "form" class= "tag_text" >
2014-04-11 13:29:39 +00:00
<div t-if= "not is_answer" >
<input type= "text" name= "question_name" id= "question_name" required= "True"
2014-04-11 16:44:55 +00:00
t-attf-value="#{post.name}" class="form-control" placeholder="Edit your Question"/>
2014-04-11 13:29:39 +00:00
<h5 class= "mt20" > Please enter a descriptive question (should finish by a '?')</h5>
</div>
<input type= "hidden" name= "karma" t-attf-value= "#{user.karma}" id= "karma" />
2014-11-14 18:14:12 +00:00
<input type= "hidden" name= "karma_retag" t-attf-value= "#{forum.karma_retag}" id= "karma_retag" />
2014-04-11 13:29:39 +00:00
<textarea name= "content" required= "True" class= "form-control load_editor" >
2014-04-11 16:44:55 +00:00
<t t-esc= "post.content" />
2014-04-11 13:29:39 +00:00
</textarea>
<div t-if= "not is_answer" >
<br />
2014-11-14 18:14:12 +00:00
<input type= "hidden" name= "tag_type" value= "select2" />
2014-12-01 16:27:50 +00:00
<input type= "hidden" name= "question_tag" class= "form-control col-md-9 js_select2" placeholder= "Tags" value= "see data init value" t-attf-data-init-value= "#{tags}" />
2014-04-11 13:29:39 +00:00
<br />
</div>
<button class= "btn btn-primary btn-lg" > Save</button>
</form>
<script type= "text/javascript" >
CKEDITOR.replace("content");
</script>
</t>
</template>
2014-03-25 06:19:01 +00:00
2014-04-11 13:29:39 +00:00
<!-- Moderation: close a question -->
<template id= "close_question" >
<t t-call= "website_forum.header" >
2014-04-21 18:43:47 +00:00
<h1 class= "mt0" > Close question</h1>
<p class= "text-muted" >
If you close this question, it will be hidden for most users. Only
users having a high karma can see closed questions to moderate
them.
</p>
2014-05-05 15:45:23 +00:00
<form t-attf-action= "/forum/#{ slug(forum) }/question/#{slug(question)}/close" method= "post" role= "form" class= "form-horizontal mt32 mb64" >
2014-04-18 13:29:05 +00:00
<input name= "post_id" t-att-value= "question.id" type= "hidden" />
2014-04-21 18:43:47 +00:00
<div class= "form-group" >
<label class= "col-md-3 control-label" for= "reason" > Question:</label>
<div class= "col-md-8 mt8" >
2014-05-05 15:45:23 +00:00
<span t-field= "question.name" />
2014-04-21 18:43:47 +00:00
</div>
</div>
<div class= "form-group" >
<label class= "col-md-3 control-label" for= "reason" > Reason:</label>
<div class= "col-md-8" >
<select class= "form-control" name= "reason_id" >
2014-04-11 13:29:39 +00:00
<t t-foreach= "reasons or []" t-as= "reason" >
2014-04-18 13:29:05 +00:00
<option t-att-value= "reason.id" t-att-selected= "reason.id == question.closed_reason_id.id" > <t t-esc= "reason.name" /> </option>
2014-04-11 13:29:39 +00:00
</t>
</select>
2014-04-02 05:55:36 +00:00
</div>
</div>
2014-04-21 18:43:47 +00:00
<div class= "form-group" >
<div class= "col-md-offset-3 col-md-8" >
<button class= "btn btn-primary" > Close question</button>
<span class= "text-muted" > or</span>
2014-05-05 15:45:23 +00:00
<a class= "btn btn-link" t-attf-href= "/forum/#{ slug(forum) }/question/#{ slug(question) }" > back to question</a>
2014-04-21 18:43:47 +00:00
</div>
2014-04-11 13:29:39 +00:00
</div>
</form>
</t>
</template>
2014-04-02 05:55:36 +00:00
2014-04-11 13:29:39 +00:00
<!-- Edition: post an answer -->
<template id= "post_answer" >
<h3 class= "mt10" > Your answer</h3>
<p >
<b > Please try to give a substantial answer.</b> If you wanted to comment on the question or answer, just
<b > use the commenting tool.</b> Please remember that you can always <b > revise your answers</b>
- no need to answer the same question twice. Also, please <b > don't forget to vote</b>
- it really helps to select the best questions and answers!
</p>
<form t-attf-action= "/forum/#{ slug(forum) }/post/#{slug(question)}/new" method= "post" role= "form" >
<input type= "hidden" name= "karma" t-attf-value= "#{user.karma}" id= "karma" />
<textarea name= "content" class= "form-control load_editor" required= "True" />
2014-10-20 23:19:05 +00:00
<button t-attf-class= "btn btn-primary mt16 #{not question.can_answer and 'karma_required' or ''}"
id="btn_ask_your_question" t-att-data-karma="question.karma_answer">Post Your Answer</button>
2014-04-11 13:29:39 +00:00
</form>
<script type= "text/javascript" >
CKEDITOR.replace("content");
</script>
</template>
2014-03-06 09:40:42 +00:00
2014-04-11 13:29:39 +00:00
<template id= "vote" >
<div t-attf-class= "box oe_grey" >
2014-07-01 07:19:22 +00:00
<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 ''}"
t-attf-data-karma="#{post.user_vote == 1 and post.karma_downvote or post.karma_upvote}"
2014-05-12 16:34:55 +00:00
t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/upvote"/>
2014-04-11 13:29:39 +00:00
<span id= "vote_count" t-esc= "post.vote_count" />
2014-07-01 07:19:22 +00:00
<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 ''}"
2014-07-09 14:47:09 +00:00
t-attf-data-karma="#{post.user_vote == -1 and post.karma_upvote or post.karma_downvote}"
2014-05-12 16:34:55 +00:00
t-attf-data-href="/forum/#{slug(post.forum_id)}/post/#{slug(post)}/downvote"/>
2014-04-21 17:23:30 +00:00
<div t-if= "vote_count > 1" class= "subtitle" >
2014-04-11 13:29:39 +00:00
votes
</div>
2014-04-21 17:23:30 +00:00
<div t-if= "vote_count < 2" class= "subtitle" >
vote
</div>
2014-04-11 13:29:39 +00:00
</div>
</template>
2014-03-03 19:17:48 +00:00
2014-04-11 13:29:39 +00:00
<!-- Specific Post Layout -->
<template id= "post_description_full" name= "Question Navigation" >
<t t-call= "website_forum.header" >
2014-08-19 14:33:25 +00:00
<div t-attf-class= "row question #{not question.active and 'alert alert-danger' or ''}" >
2014-06-12 13:01:41 +00:00
<div class= "col-md-2 hidden-xs text-center" >
2014-04-11 13:29:39 +00:00
<t t-call= "website_forum.vote" >
<t t-set= "post" t-value= "question" />
</t>
2014-04-21 17:23:30 +00:00
<div class= "text-muted text-center" >
<span t-field= "question.views" /> Views
2014-02-28 09:56:40 +00:00
</div>
2014-04-21 17:23:30 +00:00
<div class= "mt4" >
2014-05-12 16:34:55 +00:00
<a t-attf-data-href= "/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
2014-04-11 13:29:39 +00:00
t-attf-class="favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}"/>
</div>
</div>
2014-07-01 07:19:22 +00:00
<div class= "col-md-10" >
2014-04-11 13:29:39 +00:00
<h1 class= "mt0" >
2014-04-23 14:20:34 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field= "question.name" />
2014-04-11 13:29:39 +00:00
<span t-if= "not question.active" > <b > [Deleted]</b> </span>
<span t-if= "question.state == 'close'" > <b > [Closed]</b> </span>
</h1>
2014-05-19 12:40:55 +00:00
<div class= "alert alert-info text-center" t-if= "question.state == 'close'" >
<p class= "mt16" >
2014-05-20 12:50:51 +00:00
<b > The question has been closed<t t-if= "question.closed_reason_id" > for reason: <i t-esc= "question.closed_reason_id.name" /> </t> </b>
2014-04-21 18:43:47 +00:00
</p>
2014-05-19 12:40:55 +00:00
<t t-if= "question.closed_uid" >
<b > by <a t-attf-href= "/forum/#{ slug(forum) }/user/#{ question.closed_uid.id }"
t-field="question.closed_uid"
t-field-options='{"widget": "contact", "fields": ["name"]}'
style="display: inline-block;"/></b>
</t>
<b > on <span t-field= "question.closed_date" /> </b>
2014-07-01 07:19:22 +00:00
<div class= "mt16 mb24 text-center" >
2014-05-13 14:57:12 +00:00
<t t-call= "website_forum.link_button" >
2014-05-14 16:36:58 +00:00
<t t-set= "url" t-value= "'/forum/' + slug(forum) + '/question/' + slug(question) + '/reopen'" />
<t t-set= "label" t-value= "'Reopen'" />
<t t-set= "classes" t-value= "'fa-arrow-right'" />
2014-07-01 07:19:22 +00:00
<t t-set= "karma" t-value= "not question.can_close and question.karma_close or 0" />
2014-05-13 14:57:12 +00:00
</t>
2014-04-21 18:43:47 +00:00
</div>
</div>
2014-04-11 13:29:39 +00:00
<t t-raw= "question.content" />
<div class= "mt16 clearfix" >
<div class= "pull-right" >
<div class= "text-right" >
<t t-foreach= "question.tag_ids" t-as= "tag" >
<a t-attf-href= "/forum/#{ slug(forum) }/tag/#{ tag.id }/questions" class= "badge" t-field= "tag.name" />
2014-04-04 10:40:37 +00:00
</t>
2014-03-03 19:17:48 +00:00
</div>
2014-04-21 20:23:50 +00:00
<ul class= "list-inline" id= "options" >
2014-07-01 07:19:22 +00:00
<li >
2014-10-20 23:19:05 +00:00
<a style= "cursor: pointer" t-att-data-toggle= "question.can_comment and 'collapse' or ''"
2014-07-01 07:19:22 +00:00
t-attf-class="fa fa-comment-o #{not question.can_comment and 'karma_required text-muted' or ''}"
t-attf-data-karma="#{not question.can_comment and question.karma_comment or 0}"
t-attf-data-target="#comment#{ question._name.replace('.','') + '-' + str(question.id) }">
2014-04-21 17:23:30 +00:00
Comment
2014-04-11 13:29:39 +00:00
</a>
</li>
2014-07-01 07:19:22 +00:00
<li t-if= "question.state != 'close'" >
2014-05-13 14:57:12 +00:00
<t t-call= "website_forum.link_button" >
2014-05-14 16:36:58 +00:00
<t t-set= "url" t-value= "'/forum/' + slug(forum) +'/question/' + slug(question) + '/ask_for_close'" />
<t t-set= "label" t-value= "'Close'" />
2014-07-01 07:19:22 +00:00
<t t-set= "classes" t-value= "'fa-times'" />
<t t-set= "karma" t-value= "not question.can_close and question.karma_close or 0" />
2014-05-13 14:57:12 +00:00
</t>
2014-04-11 13:29:39 +00:00
</li>
2014-07-01 07:19:22 +00:00
<li t-if= "question.state == 'close'" >
2014-05-13 14:57:12 +00:00
<t t-call= "website_forum.link_button" >
2014-05-14 16:36:58 +00:00
<t t-set= "url" t-value= "'/forum/' + slug(forum) +'/question/' + slug(question) + '/reopen'" />
<t t-set= "label" t-value= "'Reopen'" />
2014-07-01 07:19:22 +00:00
<t t-set= "classes" t-value= "'fa-undo'" />
<t t-set= "karma" t-value= "not question.can_close and question.karma_close or 0" />
2014-05-13 14:57:12 +00:00
</t>
2014-04-22 15:11:11 +00:00
</li>
2014-07-01 07:19:22 +00:00
<li >
2014-05-13 14:57:12 +00:00
<t t-call= "website_forum.link_button" >
2014-11-14 18:14:12 +00:00
<t t-set= "url" t-value= "'/forum/' + slug(forum) +'/post/' + slug(question) + '/edition'" />
2014-05-14 16:36:58 +00:00
<t t-set= "label" t-value= "'Edit'" />
2014-07-01 07:19:22 +00:00
<t t-set= "classes" t-value= "'fa-edit'" />
<t t-set= "karma" t-value= "not question.can_edit and question.karma_edit or 0" />
2014-05-13 14:57:12 +00:00
</t>
2014-04-11 13:29:39 +00:00
</li>
2014-07-01 07:19:22 +00:00
<li t-if= "question.active" >
2014-05-13 14:57:12 +00:00
<t t-call= "website_forum.link_button" >
2014-05-14 16:36:58 +00:00
<t t-set= "url" t-value= "'/forum/' + slug(forum) +'/question/' + slug(question) + '/delete'" />
<t t-set= "label" t-value= "'Delete'" />
2014-07-01 07:19:22 +00:00
<t t-set= "classes" t-value= "'fa-trash-o'" />
<t t-set= "karma" t-value= "not question.can_unlink and question.karma_unlink or 0" />
2014-05-13 14:57:12 +00:00
</t>
2014-04-11 13:29:39 +00:00
</li>
2014-07-01 07:19:22 +00:00
<li t-if= "not question.active" >
2014-05-13 14:57:12 +00:00
<t t-call= "website_forum.link_button" >
2014-05-14 16:36:58 +00:00
<t t-set= "url" t-value= "'/forum/' + slug(forum) +'/question/' + slug(question) + '/undelete'" />
<t t-set= "label" t-value= "'Undelete'" />
2014-07-01 07:19:22 +00:00
<t t-set= "classes" t-value= "'fa-trash-o'" />
<t t-set= "karma" t-value= "not question.can_unlink and question.karma_unlink or 0" />
2014-05-13 14:57:12 +00:00
</t>
2014-04-11 13:29:39 +00:00
</li>
</ul>
</div>
<div >
2014-05-14 14:32:54 +00:00
<img class= "pull-left img img-circle img-avatar" t-attf-src= "/forum/user/#{question.create_uid.id}/avatar" />
2014-04-11 13:29:39 +00:00
<div >
2014-05-05 15:45:23 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/user/#{ question.create_uid.id }"
2014-04-11 13:29:39 +00:00
t-field="question.create_uid"
t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
style="display: inline-block;"/>
<div t-field= "question.create_uid" t-field-options= '{"widget": "contact", "badges": true, "fields": ["karma"]}' />
2014-05-20 13:05:27 +00:00
<span class= "text-muted" > Asked on <span t-field= "question.create_date" t-field-options= '{"format":"short"}' /> </span>
2014-03-03 19:17:48 +00:00
</div>
</div>
2014-06-12 13:01:41 +00:00
<div class= "visible-xs text-center" >
<t t-call= "website_forum.vote" >
<t t-set= "post" t-value= "question" />
</t>
<div class= "text-muted text-center" >
<span t-field= "question.views" /> Views
</div>
<div class= "mt4" >
<a t-attf-data-href= "/forum/#{slug(question.forum_id)}/question/#{slug(question)}/toggle_favourite"
t-attf-class="favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}"/>
</div>
</div>
2014-02-28 05:33:13 +00:00
</div>
2014-04-11 13:29:39 +00:00
<t t-call= "website_forum.post_comment" >
<t t-set= "object" t-value= "question" />
</t>
</div>
</div>
<hr />
2014-02-28 05:33:13 +00:00
2014-04-11 13:29:39 +00:00
<div t-foreach= "question.child_ids" t-as= "answer" class= "mt16 mb32" >
<a t-attf-id= "answer-#{str(answer.id)}" />
2014-08-20 10:21:38 +00:00
<div t-attf-class= "forum_answer row" t-attf-id= "answer_#{answer.id}" >
2014-06-12 13:01:41 +00:00
<div class= "col-md-2 hidden-xs text-center" >
2014-04-11 13:29:39 +00:00
<t t-call= "website_forum.vote" >
<t t-set= "post" t-value= "answer" />
</t>
2014-04-21 17:23:30 +00:00
<div class= "text-muted mt8" >
2014-07-01 07:19:22 +00:00
<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 ''}"
t-attf-data-karma="#{answer.karma_accept}"
2014-05-12 16:34:55 +00:00
t-attf-data-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
2014-03-06 11:28:16 +00:00
</div>
2014-04-11 13:29:39 +00:00
</div>
2014-06-12 13:01:41 +00:00
<div class= "col-md-10 clearfix" >
2014-04-11 13:29:39 +00:00
<t t-raw= "answer.content" />
<div class= "mt16" >
<ul class= "list-inline pull-right" >
2014-07-01 07:19:22 +00:00
<li >
<a t-attf-class= "fa fa-comment-o #{not answer.can_comment and 'karma_required text-muted' or ''}"
t-attf-data-karma="#{not answer.can_comment and answer.karma_comment or 0}"
2014-10-20 23:19:05 +00:00
style="cursor: pointer" t-att-data-toggle="answer.can_comment and 'collapse' or ''"
2014-07-01 07:19:22 +00:00
t-attf-data-target="#comment#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Comment
2014-04-11 13:29:39 +00:00
</a>
</li>
2014-07-01 07:19:22 +00:00
<li >
2014-07-01 11:43:16 +00:00
<t t-call= "website_forum.link_button" >
<t t-set= "url" t-value= "'/forum/' + slug(forum) + '/post/' + slug(answer) + '/edit'" />
<t t-set= "label" t-value= "'Edit'" />
<t t-set= "classes" t-value= "'fa fa-edit'" />
<t t-set= "karma" t-value= "not answer.can_edit and answer.karma_edit or 0" />
</t>
2014-04-11 13:29:39 +00:00
</li>
2014-07-01 07:19:22 +00:00
<li >
2014-05-13 14:57:12 +00:00
<t t-call= "website_forum.link_button" >
2014-05-14 16:36:58 +00:00
<t t-set= "url" t-value= "'/forum/' + slug(forum) + '/post/' + slug(answer) + '/delete'" />
<t t-set= "label" t-value= "'Delete'" />
2014-07-01 07:19:22 +00:00
<t t-set= "classes" t-value= "'fa-trash-o'" />
<t t-set= "karma" t-value= "not answer.can_unlink and answer.karma_unlink or 0" />
2014-05-12 16:34:55 +00:00
</t>
2014-04-11 13:29:39 +00:00
</li>
2014-07-01 07:19:22 +00:00
<li >
2014-05-13 14:57:12 +00:00
<t t-call= "website_forum.link_button" >
2014-05-14 16:36:58 +00:00
<t t-set= "url" t-value= "'/forum/' + slug(forum) + '/post/' + slug(answer) + '/convert_to_comment'" />
<t t-set= "label" t-value= "'Convert as a comment'" />
2014-07-01 07:19:22 +00:00
<t t-set= "classes" t-value= "'fa-magic'" />
<t t-set= "karma" t-value= "not answer.can_comment_convert and answer.karma_comment_convert or 0" />
2014-05-12 16:34:55 +00:00
</t>
2014-04-11 13:29:39 +00:00
</li>
</ul>
2014-05-14 14:32:54 +00:00
<img class= "pull-left img img-circle img-avatar" t-attf-src= "/forum/user/#{answer.create_uid.id}/avatar" />
2014-04-11 13:29:39 +00:00
<div >
2014-04-25 12:49:11 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/user/#{ answer.create_uid.id }"
2014-04-11 13:29:39 +00:00
t-field="answer.create_uid"
t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
style="display: inline-block;"/>
<div t-field= "answer.create_uid" t-field-options= '{"widget": "contact", "badges": true, "fields": ["karma"]}' />
2015-01-12 14:22:21 +00:00
<span class= "text-muted" >
<a t-attf-href= "/forum/#{slug(question.forum_id)}/question/#{slug(question)}#answer_#{answer.id}" > Answered on</a>
<span t-field= "answer.create_date" t-field-options= '{"format":"short"}' />
</span>
2014-04-11 13:29:39 +00:00
</div>
2014-06-12 13:01:41 +00:00
<div class= "visible-xs text-center" >
<t t-call= "website_forum.vote" >
<t t-set= "post" t-value= "answer" />
</t>
<div class= "text-muted mt8" >
2014-07-01 07:19:22 +00:00
<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 ''}"
t-attf-data-karma="#{answer.karma_accept}"
2014-06-12 13:01:41 +00:00
t-attf-data-href="/forum/#{slug(question.forum_id)}/post/#{slug(answer)}/toggle_correct"/>
</div>
</div>
2014-03-08 18:08:59 +00:00
</div>
2014-04-11 13:29:39 +00:00
<t t-call= "website_forum.post_comment" >
<t t-set= "object" t-value= "answer" />
</t>
2014-03-08 18:08:59 +00:00
</div>
</div>
2014-04-11 13:29:39 +00:00
</div>
<div t-if= "not question.uid_has_answered" >
<t t-call= "website_forum.post_answer" />
</div>
<div t-if= "question.uid_has_answered" class= "mb16" >
<a class= "btn btn-primary" t-attf-href= "/forum/#{slug(forum)}/question/#{slug(question)}/edit_answer" > Edit Your Previous Answer</a>
<span class= "text-muted" > (only one answer per question is allowed)</span>
</div>
</t>
</template>
2014-02-28 09:56:40 +00:00
2014-04-11 13:29:39 +00:00
<!-- Utility template: Post a Comment -->
<template id= "post_comment" >
<div class= "row clearfix" >
<div class= "col-sm-10 col-sm-offset-2" >
2014-04-21 18:12:28 +00:00
<div t-foreach= "reversed(object.website_message_ids)" t-as= "message" class= "comment oe_comment_grey" >
2014-04-11 13:29:39 +00:00
<small class= "text-muted" >
2014-08-27 08:57:29 +00:00
<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" />
<t t-call= "website_forum.link_button" >
<t t-set= "url" t-value= "'/forum/' + slug(forum) + '/post/' + slug(object) + '/comment/' + slug(message) + '/delete'" />
<t t-set= "label" t-value= "' '" />
<t t-set= "karma" t-value= "user.karma<required_karma and required_karma or 0" />
<t t-set= "classes" t-value= "'close comment_delete fa-times'" />
</t>
2014-04-11 13:29:39 +00:00
<span t-field= "message.body" />
2014-07-01 07:19:22 +00:00
<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" />
2014-05-14 16:36:58 +00:00
<t t-call= "website_forum.link_button" >
<t t-set= "url" t-value= "'/forum/' + slug(forum) + '/post/' + slug(object) + '/comment/' + slug(message) + '/convert_to_answer'" />
<t t-set= "label" t-value= "'Convert as an answer'" />
2014-07-01 07:19:22 +00:00
<t t-set= "karma" t-value= "user.karma<required_karma and required_karma or 0" />
<t t-set= "classes" t-value= "'fa-magic pull-right'" />
2014-05-14 16:36:58 +00:00
</t>
2014-04-18 15:32:17 +00:00
<a t-attf-href= "/forum/#{slug(forum)}/partner/#{message.author_id.id}"
2014-04-11 16:19:16 +00:00
t-field="message.author_id" t-field-options='{"widget": "contact", "country_image": true, "fields": ["name", "country_id"]}'
style="display: inline-block;"/>
on <span t-field= "message.date" t-field-options= '{"format":"short"}' />
2014-04-11 13:29:39 +00:00
</small>
</div>
<div class= "css_editable_mode_hidden" >
2014-04-21 18:12:28 +00:00
<form t-attf-id= "comment#{ object._name.replace('.','') + '-' + str(object.id) }" class= "collapse oe_comment_grey"
2014-04-11 16:19:16 +00:00
t-attf-action="/forum/#{slug(forum)}/post/#{slug(object)}/comment" method="POST">
2014-04-21 18:12:28 +00:00
<input name= "post_id" t-att-value= "object.id" type= "hidden" class= "mt8" />
2014-04-11 13:29:39 +00:00
<textarea name= "comment" class= "form-control" placeholder= "Comment this post..." />
<button type= "submit" class= "btn btn-primary mt8" > Post</button>
</form>
</div>
</div>
</div>
</template>
2014-03-03 11:06:20 +00:00
2014-04-11 13:29:39 +00:00
<template id= "tag" >
<t t-call= "website_forum.header" >
<h1 class= "mt0" >
Tags
</h1>
<p class= "text-muted" >
A tag is a label that categorizes your question with other,
similar questions. Using the right tags makes it easier for
others to find and answer your question.
</p>
<div class= "row" >
<div class= "col-sm-3 mt16" t-foreach= "tags" t-as= "tag" >
<a t-attf-href= "/forum/#{ slug(forum) }/tag/#{ slug(tag) }/questions?{{ keep_query( filters='tag') }}" class= "badge" >
<span t-field= "tag.name" />
</a>
2014-06-02 14:56:36 +00:00
<span >
2014-04-11 13:29:39 +00:00
X <t t-esc= "tag.posts_count" />
</span>
</div>
</div>
</t>
</template>
2014-03-07 09:34:30 +00:00
2014-04-11 13:29:39 +00:00
<template id= "badge" >
<t t-call= "website_forum.header" >
<h1 class= "mt0" >
Badges
</h1>
<p >
Besides gaining reputation with your questions and answers,
you receive badges for being especially helpful. Badges
appear on your profile page, and your posts.
</p>
<table class= "table mt32 mb64" >
<tr t-foreach= "badges" t-as= "badge" >
<td >
<a t-attf-href= "/forum/#{ slug(forum) }/badge/#{ slug(badge) }" class= "badge pull-left" >
2014-03-07 12:38:55 +00:00
<span t-if= "badge.level == 'gold'" class= "fa fa-circle badge-gold" />
<span t-if= "badge.level == 'silver'" class= "fa fa-circle badge-silver" />
<span t-if= "badge.level == 'bronze'" class= "fa fa-circle badge-bronze" />
<span t-field= "badge.name" />
2014-04-11 13:29:39 +00:00
</a>
</td> <td >
<b t-esc= "badge.stat_count_distinct" />
<i class= "text-muted" > awarded users</i>
</td> <td >
<span t-field= "badge.description" />
</td>
</tr>
</table>
</t>
</template>
<template id= "badge_user" >
<t t-call= "website_forum.header" >
2014-06-02 14:56:36 +00:00
<h3 class= "mt32 mb32" >
2014-04-11 13:29:39 +00:00
<b > Badge "<span t-field= "badge.name" /> "</b>
</h3>
<div >
<div class= "pull-left badge" >
<span t-if= "badge.level == 'gold'" class= "fa fa-circle badge-gold" />
<span t-if= "badge.level == 'silver'" class= "fa fa-circle badge-silver" />
<span t-if= "badge.level == 'bronze'" class= "fa fa-circle badge-bronze" />
<span t-field= "badge.name" />
</div>
<span t-field= "badge.description" style= "margin-left:20px" />
</div>
<h4 class= "mt32" >
<t class= "pull-left" t-esc= "badge.stat_count_distinct" />
<span t-if= "badge.stat_count_distinct>1" > users</span>
<span t-if= "badge.stat_count_distinct<=1" > user</span>
received this badge:
</h4>
<div class= "row" >
<div class= "col-sm-3 mt16" t-foreach= "users" t-as= "user" >
2014-05-14 14:32:54 +00:00
<img class= "pull-left img img-circle img-avatar" t-attf-src= "/forum/user/#{user.id}/avatar" />
2014-04-11 13:29:39 +00:00
<div >
<a t-attf-href= "/forum/#{slug(forum)}/user/#{user.id}" t-field= "user.name" />
2014-03-07 09:34:30 +00:00
</div>
2014-04-11 13:29:39 +00:00
</div>
</div>
</t>
</template>
<template id= "users" >
<t t-call= "website_forum.header" >
2014-05-26 11:37:58 +00:00
<div t-foreach= "users" t-as= "row_users" class= "row mt16" >
<div t-foreach= "row_users" t-as= "user" class= "col-sm-4" >
2014-05-14 14:32:54 +00:00
<img class= "pull-left img img-circle img-avatar" t-attf-src= "/forum/user/#{user.id}/avatar" />
2014-04-11 13:29:39 +00:00
<div >
<a t-attf-href= "/forum/#{slug(forum)}/user/#{user.id}" t-field= "user.name" />
<t t-if= "user.country_id" >
<span t-field= "user.country_id.image" t-field-options= '{"widget": "image", "class": "country_flag"}' />
</t>
<b > <t t-esc= "user.karma" /> </b>
<t t-raw= "separator" />
<div >
<b > badges:</b>
<span class= "fa fa-circle badge-gold" />
<t t-esc= "user.gold_badge" />
<span class= "fa fa-circle badge-silver" />
<t t-esc= "user.silver_badge" />
<span class= "fa fa-circle badge-bronze" />
<t t-esc= "user.bronze_badge" />
2014-03-07 09:34:30 +00:00
</div>
2014-04-11 13:29:39 +00:00
<t t-raw= "0" />
2014-03-07 09:34:30 +00:00
</div>
2014-04-11 13:29:39 +00:00
</div>
2014-05-26 11:37:58 +00:00
</div>
2014-04-11 13:29:39 +00:00
<div class= "pull-left" >
<t t-call= "website.pager" />
</div>
</t>
</template>
2014-03-07 09:34:30 +00:00
2014-06-12 14:33:33 +00:00
<!-- Private profile -->
<template id= "private_profile" >
<t t-call= "website_forum.header" >
<h1 class= "mt32" > This profile is private!</h1>
<p >
<a t-attf-href= "/forum/#{slug(forum)}" > Return to the question list.</a>
</p>
</t>
</template>
2014-04-11 13:29:39 +00:00
<template id= "edit_profile" >
<t t-call= "website_forum.header" >
2014-08-28 09:29:19 +00:00
<h3 > Edit Profile</h3>
<div class= "row" >
<div class= "col-md-2" >
<img class= "img img-responsive img-circle" t-attf-src= "/forum/user/#{user.id}/avatar" />
2014-06-12 14:33:33 +00:00
</div>
2014-08-28 09:29:19 +00:00
<div class= "col-md-10" >
<form t-attf-action= "/forum/#{slug(forum)}/user/#{slug(user)}/save" method= "post" role= "form" class= "form-horizontal" >
<input name= "user_id" t-att-value= "user.id" type= "hidden" />
<div class= "form-group" >
<label class= "col-md-2 control-label mb16" for= "user_name" > Real name</label>
<div class= "col-md-8 mb16" >
<input type= "text" class= "form-control" name= "name" id= "user_name" required= "True" t-attf-value= "#{user.name}" />
</div>
</div>
<div class= "form-group" >
<label class= "col-md-2 control-label mb16" for= "user_website_published" t-if= "user.id == uid" > Public profile</label>
<div class= "col-md-8 mb16" t-if= "user.id == uid" >
<input type= "checkbox" class= "mt8" name= "website_published" id= "user_website_published" value= "True" t-if= "not user.website_published" />
<input type= "checkbox" class= "mt8" name= "website_published" id= "user_website_published" value= "True" checked= "checked" t-if= "user.website_published" />
</div>
</div>
<div class= "form-group" >
<label class= "col-md-2 control-label mb16" for= "user_website" > Website</label>
<div class= "col-md-8 mb16" >
<input type= "text" class= "form-control" name= "website" id= "user_website" t-attf-value= "#{user.partner_id.website or ''}" />
</div>
</div>
<div class= "form-group" >
<div t-if= "email_required" class= "alert alert-danger alert-dismissable oe_forum_email_required" >
<button type= "button" class= "close" data-dismiss= "alert" > x</button>
<p > Please enter a valid email address in order to receive notifications from answers or comments.</p>
</div>
<label class= "col-md-2 control-label mb16" for= "user_email" > Email</label>
<div class= "col-md-8 mb16" >
<input type= "text" class= "form-control" name= "email" id= "user_email" required= "True" t-attf-value= "#{user.partner_id.email}" />
</div>
</div>
<div class= "form-group" >
<label class= "col-md-2 control-label mb16" for= "user_city" > City</label>
<div class= "col-md-8 mb16" >
<input type= "text" class= "form-control" name= "city" id= "user_city" t-attf-value= "#{user.partner_id.city or ''}" />
</div>
</div>
<div class= "form-group" >
<label class= "col-md-2 control-label mb16" > Country</label>
<div class= "col-md-8 mb16" >
<select class= "form-control" name= "country" >
<option value= "" > Country...</option>
<t t-foreach= "countries or []" t-as= "country" >
<option t-att-value= "country.id" t-att-selected= "country.id == user.partner_id.country_id.id" > <t t-esc= "country.name" /> </option>
</t>
</select>
</div>
</div>
<!-- Note: using website_description fiels instead of using commnt firld of partner -->
<div class= "form-group" >
<label class= "col-md-2 control-label mb16" for= "description" > Biography</label>
<div class= "col-md-8 mb16" >
<textarea name= "description" id= "description" style= "min-height: 120px" required= "True"
class="form-control load_editor"><t t-esc= "user.partner_id.website_description" /> </textarea>
</div>
</div>
<div class= "col-sm-offset-2 col-md-2 mb16" >
<button class= "btn btn-primary btn-lg" > Update</button>
</div>
</form>
2014-06-12 14:33:33 +00:00
</div>
2014-08-28 09:29:19 +00:00
</div>
2014-08-05 06:41:21 +00:00
<script type= "text/javascript" >
CKEDITOR.replace("description");
</script>
2014-04-11 13:29:39 +00:00
</t>
</template>
2014-02-28 05:33:13 +00:00
2014-04-11 13:29:39 +00:00
<template id= "user_detail_full" >
<t t-call= "website_forum.header" >
<h1 class= "mt0 page-header" >
<span t-field= "user.name" />
<small > profile</small>
2014-06-12 14:33:33 +00:00
<t t-call= "website.publish_management" groups= "base.group_website_publisher" >
<t t-set= "object" t-value= "user" />
</t>
2014-04-11 13:29:39 +00:00
</h1>
<div class= "row" >
<div class= "col-sm-2" >
2014-05-14 14:32:54 +00:00
<img class= "img img-responsive img-circle" t-attf-src= "/forum/user/#{user.id}/avatar" />
2014-04-11 13:29:39 +00:00
</div>
<div class= "col-sm-10" >
<table class= "table table-condensed" >
<tr >
<td rowspan= "2" valign= "top" > <span class= "text-muted" > contributions</span> </td>
<td > member since</td>
<td > <span t-field= "user.create_date" t-field-options= '{"format": "short"}' /> </td>
</tr> <tr >
<td > last connection</td>
<td > <span t-field= "user.login_date" t-field-options= '{"format": "short"}' /> </td>
</tr>
<tr >
<td rowspan= "2" valign= "top" > <span class= "text-muted" > bio</span> </td>
<td > website</td>
2014-03-24 12:26:45 +00:00
<td >
2014-04-11 13:29:39 +00:00
<a t-att-href= "user.website" t-if= "user.website" >
<span t-field= "user.website" />
2014-03-24 12:26:45 +00:00
</a>
2014-04-11 13:29:39 +00:00
</td>
</tr> <tr >
<td > location</td>
<td >
<span t-field= "user.city" />
<span t-if= "user.city and user.country_id" > , </span>
<span t-field= "user.country_id" />
2014-04-11 18:22:54 +00:00
<t t-if= "user.country_id" > <span t-field= "user.country_id.image" t-field-options= '{"widget": "image", "class": "country_flag"}' /> </t>
2014-06-02 14:56:36 +00:00
2014-04-11 13:29:39 +00:00
</td>
</tr>
<tr >
<td rowspan= "2" valign= "top" > <span class= "text-muted" > stats</span> </td>
<td > karma</td>
<td > <span t-field= "user.karma" /> </td>
</tr> <tr >
<td > votes</td>
<td >
<span class= "fa fa-thumbs-up" />
<span t-esc= "up_votes" />
<span class= "fa fa-thumbs-down" />
<span t-esc= "down_votes" />
2014-03-24 12:26:45 +00:00
</td>
</tr>
2014-04-11 13:29:39 +00:00
</table>
<div class= "well well-sm" >
2014-04-21 17:23:30 +00:00
<span t-field= "user.partner_id.website_description" class= "oe_no_empty" />
2014-04-11 13:29:39 +00:00
<t t-if= "uid == user.id" >
<a class= "fa fa-arrow-right" t-attf-href= "/forum/#{slug(forum)}/user/#{slug(user)}/edit" > Edit Your Bio</a>
</t>
</div>
2014-03-09 20:19:32 +00:00
</div>
2014-04-11 13:29:39 +00:00
</div>
2014-03-07 09:34:30 +00:00
2014-04-11 13:29:39 +00:00
<ul class= "nav nav-tabs" >
<li class= "active" >
2014-09-02 14:24:26 +00:00
<a href= "#questions" data-toggle= "tab" > <t t-esc= "count_questions" /> Questions</a>
2014-04-11 13:29:39 +00:00
</li>
<li >
2014-09-02 14:24:26 +00:00
<a href= "#answers" data-toggle= "tab" > <t t-esc= "count_answers" /> Answers</a>
2014-04-11 13:29:39 +00:00
</li>
<li t-if= "uid == user.id" >
<a href= "#favourite_question" data-toggle= "tab" > <t t-esc= "len(favourite)" /> Favourite Questions</a>
</li>
<li t-if= "uid == user.id" >
<a href= "#followed_question" data-toggle= "tab" > <t t-esc= "len(followed)" /> Followed Questions</a>
</li>
<li t-if= "uid == user.id" >
<a href= "#activity" data-toggle= "tab" > Activity</a>
</li>
<li >
<a href= "#badges" data-toggle= "tab" > Badges</a>
</li>
<li t-if= "uid == user.id" >
<a href= "#votes" data-toggle= "tab" > Votes</a>
</li>
</ul>
<div class= "tab-content mt16" >
<div class= "tab-pane active" id= "questions" >
<div class= "mb16" t-foreach= "questions" t-as= "question" >
<t t-call= "website_forum.display_post" />
</div>
</div> <div class= "tab-pane" id= "answers" >
<div t-foreach= "answers" t-as= "answer" >
<t t-call= "website_forum.display_post_answer" />
</div>
2014-03-18 11:12:29 +00:00
</div>
2014-04-11 13:29:39 +00:00
<div class= "tab-pane" id= "karma" >
<h1 > Karma</h1>
2014-03-18 12:06:59 +00:00
</div>
2014-04-11 13:29:39 +00:00
<div class= "tab-pane" id= "badges" >
<t t-call= "website_forum.user_badges" />
</div>
2014-09-02 14:24:26 +00:00
<div class= "tab-pane" id= "favourite_question" t-if= "uid == user.id" >
2014-04-11 13:29:39 +00:00
<div t-foreach= "favourite" t-as= "question" >
<t t-call= "website_forum.display_post" />
2014-03-21 12:37:16 +00:00
</div>
2014-04-11 13:29:39 +00:00
</div>
2014-09-02 14:24:26 +00:00
<div class= "tab-pane" id= "followed_question" t-if= "uid == user.id" >
2014-04-21 17:23:30 +00:00
<div t-foreach= "followed" t-as= "question" class= "mb16" >
2014-04-11 13:29:39 +00:00
<t t-call= "website_forum.display_post" />
2014-03-21 12:37:16 +00:00
</div>
</div>
2014-09-02 14:24:26 +00:00
<div class= "tab-pane" id= "votes" t-if= "uid == user.id" >
2014-04-11 13:29:39 +00:00
<t t-call= "website_forum.user_votes" />
</div>
2014-09-02 14:24:26 +00:00
<div class= "tab-pane" id= "activity" t-if= "uid == user.id" >
2014-04-11 13:29:39 +00:00
<ul class= "list-unstyled" >
<li t-foreach= "activities" t-as= "activity" >
<span t-field= "activity.date" t-field-options= '{"format": "short"}' />
<span t-esc= "activity.subtype_id.name" class= "label label-info" />
<t t-set= "post" t-value= "posts[activity.res_id]" />
2014-06-02 14:56:36 +00:00
<span t-if= "post[1]" >
2014-04-11 13:29:39 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/question/#{ slug(post[0]) }#answer-#{ str(post[1].id) }" >
<span t-esc= "post[0].name" />
</a>
</span>
<span t-if= "not post[1]" >
<a t-attf-href= "/forum/#{ slug(forum) }/question/#{ slug(post[0]) }" >
<span t-esc= "post[0].name" />
</a>
</span>
</li>
</ul>
</div>
</div>
</t>
</template>
<template id= "user_badges" >
<table class= "table mt32 mb64" >
<tr t-foreach= "user.badge_ids" t-as= "badge" >
<td >
<a t-attf-href= "/forum/#{ slug(forum) }/badge/#{ slug(badge.badge_id) }" class= "badge pull-left" >
<span t-if= "badge.badge_id.level == 'gold'" class= "fa fa-circle badge-gold" />
<span t-if= "badge.badge_id.level == 'silver'" class= "fa fa-circle badge-silver" />
<span t-if= "badge.badge_id.level == 'bronze'" class= "fa fa-circle badge-bronze" />
<span t-field= "badge.badge_id.name" />
</a>
</td> <td >
<b t-esc= "badge.badge_id.stat_count_distinct" />
<i class= "text-muted" > awarded users</i>
</td> <td >
<span t-field= "badge.badge_id.description" />
</td>
</tr>
</table>
<div class= "mb16" t-if= "not user.badge_ids" >
<b > No badge yet!</b> <br />
<a t-attf-href= "/forum/#{ slug(forum) }/badge" class= "fa fa-arrow-right" > Check available badges</a>
</div>
</template>
<template id= "user_votes" >
<div t-foreach= "vote_post" t-as= "vote" >
<t t-esc= "vote.post_id.create_date" />
<span t-if= "vote.vote == '1'" class= "fa fa-thumbs-up text-success" style= "margin-left:30px" />
<span t-if= "vote.vote == '-1'" class= "fa fa-thumbs-down text-warning" style= "margin-left:30px" />
<t t-if= "vote.post_id.parent_id" >
<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" />
</t>
<t t-if= "not vote.post_id.parent_id" >
<a t-attf-href= "/forum/#{ slug(forum) }/question/#{ vote.post_id.id }" style= " color:black;margin-left:10px" t-esc= "vote.post_id.name" />
</t>
</div>
<div class= "mb16" t-if= "not vote_post" >
<b > No vote given by you yet!</b>
</div>
</template>
2014-03-21 12:37:16 +00:00
2014-06-27 09:03:34 +00:00
<!-- User Navbar -->
<template id= "content_new_forum" inherit_id= "website.user_navbar" groups= "base.group_user" >
<xpath expr= "//ul[@id='oe_systray']/li/ul[@class='dropdown-menu oe_content_menu']" position= "inside" >
<li > <a href= "#" data-action= "new_forum" > New Forum</a> </li>
</xpath>
</template>
2014-02-28 05:33:13 +00:00
</data>
2014-02-21 13:16:08 +00:00
</openerp>