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 >
<template id= "editor_head" inherit_id= "website.editor_head"
2014-03-03 15:53:55 +00:00
name="Event Editor">
2014-02-28 05:33:13 +00:00
<xpath expr= "//script[@id='website_tour_js']" position= "after" >
<script type= "text/javascript"
2014-03-25 06:19:01 +00:00
src="/website_forum/static/src/js/website.tour.forum.js"/>
<script type= "text/javascript"
2014-03-26 10:51:07 +00:00
src="/website_forum/static/src/js/website_forum.editor.js"/>
2014-02-28 05:33:13 +00:00
</xpath>
</template>
<!-- Layout add nav and footer -->
<template id= "header_footer_custom" inherit_id= "website.layout"
name="Footer Questions Link">
<xpath expr= "//footer//ul[@name='products']" position= "inside" >
<li >
2014-04-09 12:09:56 +00:00
<a t-attf-href= "/forum/%(website_forum.forum_help)d" > Q& A</a>
</li>
<li >
<a href= "/forum" > Forums</a>
2014-02-28 05:33:13 +00:00
</li>
</xpath>
</template>
<!-- List of Questions -->
<template id= "post_list" >
2014-03-03 15:53:55 +00:00
<div class= "question clearfix" >
<div class= "pull-left text-center" >
2014-03-12 09:54:13 +00:00
<div t-attf-class= "box #{question.child_count and 'oe_green' or 'oe_grey'}" >
<span t-esc= "question.child_count" />
2014-04-09 16:50:59 +00:00
<span t-if= "question.is_correct" class= "fa fa-2x fa-check-circle" />
2014-03-12 09:54:13 +00:00
<div t-if= "question.child_count>1" > Answers</div>
<div t-if= "question.child_count<=1" > Answer</div>
2014-03-03 15:53:55 +00:00
</div>
<div class= "text-muted text-center" >
<span t-field= "question.views" /> Views
</div>
2014-02-28 05:33:13 +00:00
</div>
2014-03-03 20:22:24 +00:00
<div style= "margin-left: 95px;" >
2014-03-03 15:53:55 +00:00
<div class= "question-name" >
2014-03-04 12:53:50 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/question/#{ slug(question) }" t-field= "question.name" />
2014-03-24 06:06:50 +00:00
<span t-if= "not question.active" > <b > [Deleted]</b> </span>
<span t-if= "question.state == 'close'" > <b > [Closed]</b> </span>
2014-03-03 15:53:55 +00:00
</div>
<div class= "text-muted" >
2014-04-07 06:22:05 +00:00
by <a t-attf-href= "/forum/#{ slug(forum) }/user/#{ question.user_id.id }" t-field= "question.user_id" />
<t t-if= "question.user_id.country_id" >
<span t-field= "question.user_id.country_id.image" t-field-options= '{"widget": "image", "class":"forum_user_flag"}' />
</t>
2014-04-03 06:59:58 +00:00
on <span t-field= "question.write_date" t-field-options= '{"format":"short"}' />
2014-03-12 08:53:25 +00:00
<div t-if= "question.vote_count" >
<strong > with <span t-esc= "question.vote_count" /> votes</strong>
2014-03-03 15:53:55 +00:00
</div>
</div>
2014-04-09 16:50:59 +00:00
<t t-foreach= "question.tag_ids" t-as= "tag" >
2014-03-28 09:56:36 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/tag/#{ tag.id }/questions" class= "badge" t-field= "tag.name" />
2014-03-03 15:53:55 +00:00
</t>
2014-02-28 05:33:13 +00:00
</div>
</div>
</template>
2014-03-03 15:53:55 +00:00
<!-- Page Index -->
<template id= "header" name= "Forum Index" >
<t t-call= "website.layout" >
<t t-set= "head" >
2014-03-24 13:21:37 +00:00
<link rel= 'stylesheet' href= "/web/static/lib/jquery.textext/jquery.textext.css" />
2014-03-18 12:06:59 +00:00
<link rel= 'stylesheet' href= '/website_forum/static/src/css/website_forum.css' />
2014-03-26 10:51:07 +00:00
<!--
FP Note: Why do we need this ? Can we remove this code?
The problem is that you add your script for every page, not only for the forum
-->
<script type= "text/javascript" src= "/website_forum/static/src/js/website_forum.js" />
<script type= "text/javascript" src= "/web/static/lib/jquery.textext/jquery.textext.js" />
2014-03-26 11:23:07 +00:00
<script type= "text/javascript" src= "/web/static/lib/ckeditor/ckeditor.js" />
2014-03-26 10:51:07 +00:00
<script type= "text/javascript" >
CKEDITOR.config.toolbar = [['Bold','Italic','Underline','Strike'],['NumberedList','BulletedList', 'Blockquote']
2014-04-01 08:46:31 +00:00
,['Outdent','Indent','Link','Unlink','Image'],] ;
2014-03-26 10:51:07 +00:00
</script>
2014-03-03 15:53:55 +00:00
</t>
<div class= "container mt16" >
<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>
2014-04-09 16:50:59 +00:00
<!-- <span class="icon - bar"></span> -->
2014-03-03 15:53:55 +00:00
<span class= "icon-bar" > </span>
</button>
2014-03-09 18:41:19 +00:00
<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-03-03 15:53:55 +00:00
<div class= "collapse navbar-collapse" id= "oe-help-navbar-collapse" >
<ul class= "nav navbar-nav" >
2014-03-27 07:28:42 +00:00
<li t-att-class= "filters in ('all', 'unanswered','followed','question','tag') and 'active' or '' " >
2014-03-04 12:53:50 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }" > Questions</a>
2014-03-03 19:17:48 +00:00
</li>
2014-03-03 11:06:20 +00:00
<li t-att-class= "searches.get('users') and 'active' or '' " >
2014-03-04 12:53:50 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/users" > People</a>
2014-02-28 05:33:13 +00:00
</li>
2014-03-03 15:53:55 +00:00
<li t-att-class= "searches.get('tags') and 'active' or '' " >
2014-03-12 09:54:13 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/tag" > Tags</a>
2014-02-28 05:33:13 +00:00
</li>
2014-03-07 09:34:30 +00:00
<li t-att-class= "searches.get('badges') and 'active' or '' " >
2014-03-12 09:54:13 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/badge" > Badges</a>
2014-02-28 05:33:13 +00:00
</li>
</ul>
2014-03-04 12:53:50 +00:00
<form class= "navbar-form navbar-right" role= "search" t-attf-action= "/forum/#{ slug(forum) }" method= "get" >
2014-03-03 15:53:55 +00:00
<div class= "form-group" >
<input type= "search" class= "form-control"
name="search" placeholder="Search a question..."
2014-04-09 12:09:56 +00:00
t-att-value="search or ''"/>
2014-03-03 15:53:55 +00:00
<button type= "submit" class= "btn btn-default" > Search</button>
</div>
</form>
2014-02-28 05:33:13 +00:00
</div>
</div>
</div>
<div id= "wrap" class= "container" >
<div class= "row" >
2014-03-03 15:53:55 +00:00
<div class= "col-sm-9" >
2014-03-24 12:26:45 +00:00
<div t-foreach= "notifications.get('notifications') or []" t-as= "notification" class= "alert alert-success alert-dismissable" >
2014-03-19 09:07:35 +00:00
<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-03-24 12:26:45 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/user/#{ slug(notifications.get('user')) }#badges" class= "fa fa-arrow-right" > View Your Badges</a>
2014-03-03 20:41:42 +00:00
</div>
2014-03-03 15:53:55 +00:00
<t t-raw= "0" />
2014-03-19 09:07:35 +00:00
</div>
<div class= "col-sm-3" id= "right-column" >
2014-04-04 07:10:43 +00:00
<a t-if= "not ask_question" class= "btn btn-primary btn-lg btn-block mb16" t-attf-href= "/forum/#{ slug(forum) }/ask" > Ask a Question</a>
2014-04-09 16:50:59 +00:00
<div class= "panel panel-default" >
<div class= "panel-heading" >
<h3 class= "panel-title" > About This Forum</h3>
</div>
<div class= "panel-body" >
<t t-esc= "forum.description" /> <br />
<a t-attf-href= "/forum/#{slug(forum)}/faq" class= "fa fa-arrow-right" > Read Guidelines</a>
</div>
</div>
2014-03-28 05:16:06 +00:00
<div t-if= "question_data" >
<div class= "panel panel-default" >
<div class= "panel-heading text-center" >
<h3 class= "panel-title" > Question tools</h3>
</div>
<div class= "panel-body text-center" >
<a class= "btn btn-block btn-default btn-md" t-if= "not following"
t-attf-href="/forum/#{ slug(forum) }/question/#{ question.id }/subscribe">Follow</a>
<a class= "btn btn-block btn-default btn-md" t-if= "following"
t-attf-href="/forum/#{ slug(forum) }/question/#{ question.id }/unsubscribe">UnFollow</a>
<div class= "mt8" >
<strong > <t t-raw= "len(question.message_follower_ids)" /> </strong> follower
</div>
</div>
<div class= "panel-heading text-center" >
<h3 class= "panel-title " > Stats</h3>
</div>
<div class= "panel-body" >
<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>
</div>
</div>
</div>
2014-02-28 05:33:13 +00:00
</div>
</div>
</div>
2014-03-09 18:58:47 +00:00
<div class= "oe_structure" />
2014-03-03 15:53:55 +00:00
</t>
2014-02-28 05:33:13 +00:00
</template>
2014-03-04 10:49:30 +00:00
<template id= "faq" >
<t t-call= "website_forum.header" >
2014-03-09 18:41:19 +00:00
<div t-field= "forum.faq" />
2014-03-04 10:49:30 +00:00
</t>
</template>
<template id= "forum_index" >
<t t-call= "website.layout" >
2014-03-07 13:09:24 +00:00
<div class= "container" >
2014-03-09 08:45:52 +00:00
<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-03-07 13:09:24 +00:00
</div>
2014-03-09 08:45:52 +00:00
</div>
2014-03-07 13:09:24 +00:00
</div>
2014-03-03 19:36:54 +00:00
</t>
</template>
2014-04-09 12:09:56 +00:00
<template id= "index" name= "Forum" >
2014-03-03 15:53:55 +00:00
<t t-call= "website_forum.header" >
2014-03-03 19:29:27 +00:00
<h1 class= "page-header mt0" >
<t t-esc= "total_questions" />
<span > Questions</span>
2014-04-09 12:09:56 +00:00
<t t-esc= "search" />
2014-03-27 07:28:42 +00:00
<small class= "dropdown" t-if= "filters in ('all', 'unanswered','followed', 'tag')" >
2014-03-03 19:29:27 +00:00
<a href= "#" class= "dropdown-toggle" data-toggle= "dropdown" >
2014-03-16 12:58:36 +00:00
<t t-if= "filters == 'all'" > All</t>
<t t-if= "filters == 'unanswered'" > Unanswered</t>
<t t-if= "filters == 'followed'" > Followed</t>
2014-03-27 07:28:42 +00:00
<t t-if= "filters == 'tag'" > Tag</t>
2014-03-16 12:58:36 +00:00
<t t-if= "sorting == 'date'" > by activity date</t>
<t t-if= "sorting == 'answered'" > by most answered</t>
<t t-if= "sorting == 'vote'" > by most voted</t>
2014-03-03 19:29:27 +00:00
<b class= "caret" />
</a>
<ul class= "dropdown-menu" >
<li class= "dropdown-header" > Filter on</li>
2014-03-12 07:07:35 +00:00
<li t-att-class= "filters == 'all' and 'active' or '' " >
2014-04-09 12:09:56 +00:00
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'sorting', filters='all')" > All</a>
2014-03-03 19:29:27 +00:00
</li>
2014-03-12 07:07:35 +00:00
<li t-att-class= "filters == 'unanswered' and 'active' or '' " >
2014-04-09 12:09:56 +00:00
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'sorting', filters='unanswered')" > Unanswered</a>
2014-03-03 19:29:27 +00:00
</li>
2014-03-28 09:56:36 +00:00
<li t-if= "uid" t-att-class= "filters == 'followed' and 'active' or '' " >
2014-04-09 12:09:56 +00:00
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'sorting', filters='followed')" > Followed</a>
2014-03-27 07:28:42 +00:00
</li>
2014-03-28 09:56:36 +00:00
<li t-if= "tag" t-att-class= "tag and 'active' or '' " >
2014-03-27 07:28:42 +00:00
<a href= "" > <t t-esc= "tag.name" /> Tag</a>
2014-03-03 19:29:27 +00:00
</li>
<li class= "dropdown-header" > Sort by</li>
2014-03-12 09:16:02 +00:00
<li t-att-class= "sorting == 'date' and 'active' or '' " >
2014-04-09 12:09:56 +00:00
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'filters', sorting='date')" > Last activity date</a>
2014-03-03 19:29:27 +00:00
</li>
2014-03-12 09:16:02 +00:00
<li t-att-class= "sorting == 'answered' and 'active' or '' " >
2014-04-09 12:09:56 +00:00
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'filters', sorting='answered')" > Most answered</a>
2014-03-03 19:29:27 +00:00
</li>
2014-03-12 09:16:02 +00:00
<li t-att-class= "sorting == 'vote' and 'active' or '' " >
2014-04-09 12:09:56 +00:00
<a t-att-href= "url_for('') + '?' + keep_query( 'search', 'filters', sorting='vote')" > Most voted</a>
2014-03-03 19:29:27 +00:00
</li>
</ul>
</small>
</h1>
2014-03-03 15:53:55 +00:00
<div t-foreach= "question_ids" t-as= "question" class= "mb16" >
2014-03-18 12:06:59 +00:00
<t t-call= "website_forum.post_list" />
2014-02-28 05:33:13 +00:00
</div>
2014-03-18 12:06:59 +00:00
<t t-call= "website.pager" />
2014-02-28 05:33:13 +00:00
</t>
</template>
<template id= "404" >
2014-03-03 15:53:55 +00:00
<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>
2014-02-28 05:33:13 +00:00
</t>
</template>
<template id= "user_detail" >
2014-03-03 19:17:48 +00:00
<div >
2014-03-07 09:34:30 +00:00
<span t-field= "user.image" t-field-options= '{"widget": "image", "class":"pull-left img img-circle img-avatar"}' />
2014-03-03 19:17:48 +00:00
<div >
2014-03-04 12:53:50 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/user/#{ slug(user) }" t-field= "user.name" />
2014-04-07 06:22:05 +00:00
<t t-if= "user.country_id" >
<span t-field= "user.country_id.image" t-field-options= '{"widget": "image", "class":"forum_user_flag"}' />
</t>
<b > <t t-esc= "user.karma" /> </b>
<t t-raw= "separator" />
2014-04-09 12:09:56 +00:00
<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" />
</div>
<t t-raw= "0" />
2014-02-28 05:33:13 +00:00
</div>
</div>
</template>
<template id= "ask_question" >
2014-03-03 19:17:48 +00:00
<t t-call= "website_forum.header" >
<h1 class= "mt0" > Ask your Question</h1>
<ul >
2014-03-05 07:33:58 +00:00
<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>
2014-03-03 19:17:48 +00:00
</ul>
2014-04-04 07:10:43 +00:00
<form t-attf-action= "/forum/#{ slug(forum) }/question/ask" method= "post" role= "form" class= "tag_text" >
2014-04-02 12:04:22 +00:00
<input type= "text" name= "question_name" required= "True" t-attf-value= "#{question_name}"
2014-03-05 07:33:58 +00:00
class="form-control" placeholder="Enter your Question"/>
<h5 class= "mt20" > Please enter a descriptive question (should finish by a '?')</h5>
2014-04-02 12:04:22 +00:00
<input type= "hidden" name= "karma" t-attf-value= "#{user.karma}" id= "karma" />
2014-04-01 08:46:31 +00:00
<textarea name= "content" required= "True" class= "form-control load_editor" >
<t t-esc= "question_content" />
</textarea>
2014-03-24 13:21:37 +00:00
<br />
<input type= "text" name= "question_tags" t-attf-value= "#{question_tag or ''}"
2014-03-25 06:19:01 +00:00
placeholder="Tags" class="form-control load_tags"/>
2014-03-24 13:21:37 +00:00
<br />
2014-03-09 08:45:52 +00:00
<button class= "btn btn-primary" id= "btn_ask_your_question" > Post Your Question</button>
2014-03-03 19:17:48 +00:00
</form>
<script type= "text/javascript" >
2014-04-01 08:46:31 +00:00
CKEDITOR.replace("content");
2014-03-03 19:17:48 +00:00
</script>
2014-02-28 05:33:13 +00:00
</t>
</template>
2014-04-02 12:04:22 +00:00
<template id= "edit_post" >
2014-03-12 06:34:07 +00:00
<t t-call= "website_forum.header" >
2014-04-02 12:04:22 +00:00
<h3 t-if= "not is_answer" > Edit question</h3>
<h3 t-if= "is_answer" > Edit answer</h3>
<form t-attf-action= "/forum/#{ slug(forum) }/post/save" method= "post" role= "form" class= "tag_text" >
<div t-if= "not is_answer" >
<input type= "text" name= "question_name" id= "question_name" required= "True"
t-attf-value="#{question.name}" class="form-control" placeholder="Edit your Question"/>
<h5 class= "mt20" > Please enter a descriptive question (should finish by a '?')</h5>
</div>
2014-04-10 06:14:28 +00:00
<input type= "hidden" name= "karma" t-attf-value= "#{user.karma}" id= "karma" />
2014-04-01 08:46:31 +00:00
<textarea name= "content" required= "True" class= "form-control load_editor" >
2014-04-02 12:04:22 +00:00
<t t-if= "is_answer" > <t t-esc= "answer.content" /> </t>
<t t-if= "not is_answer" > <t t-esc= "question.content" /> </t>
2014-03-12 06:34:07 +00:00
</textarea>
2014-04-02 12:04:22 +00:00
<input name= "question_id" t-att-value= "question.id" type= "hidden" />
<div t-if= "is_answer" >
<input name= "answer_id" t-att-value= "answer.id" type= "hidden" />
</div>
<div t-if= "not is_answer" >
<br />
<input type= "text" name= "question_tag" class= "form-control col-md-9 load_tags" placeholder= "Tags" t-attf-value= "#{tags}" />
<br />
</div>
2014-03-12 06:34:07 +00:00
<button class= "btn btn-primary btn-lg" > Save</button>
</form>
<script type= "text/javascript" >
2014-03-31 12:32:43 +00:00
CKEDITOR.replace("content");
2014-03-12 06:34:07 +00:00
</script>
</t>
</template>
2014-03-21 12:57:47 +00:00
<template id= "close_question" >
<t t-call= "website_forum.header" >
<h3 class= "" > <b > Close question</b> </h3> <br />
2014-04-04 07:10:43 +00:00
<form t-attf-action= "/forum/#{ slug(forum) }/question/close" method= "post" role= "form" >
2014-03-21 12:57:47 +00:00
<input name= "post_id" t-att-value= "post.id" type= "hidden" />
<span class= "pull-left" > Close the question:</span>
<a t-attf-href= "/forum/#{ slug(forum) }/question/#{ slug(post) }" t-field= "post.name" />
<div class= "mt16" >
<label class= "col-md-2 control-label mb16" for= "reason" > Reasons:</label>
<div class= "col-md-9 mb16" >
<select class= "form-control" name= "reason" >
2014-03-24 07:11:52 +00:00
<t t-foreach= "reasons or []" t-as= "reason" >
<option t-att-value= "reason.id" t-att-selected= "reason.id == post.reason_id.id" > <t t-esc= "reason.name" /> </option>
2014-03-21 12:57:47 +00:00
</t>
</select>
</div>
</div>
<div >
<button class= "btn btn-primary btn-lg" > Close</button>
</div>
</form>
</t>
</template>
2014-03-25 06:19:01 +00:00
<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>
2014-04-04 07:10:43 +00:00
<form t-attf-action= "/forum/#{ slug(forum) }/question/postanswer" method= "post" role= "form" >
2014-04-02 12:04:22 +00:00
<input type= "hidden" name= "karma" t-attf-value= "#{user.karma}" id= "karma" />
2014-04-01 08:46:31 +00:00
<textarea name= "content" class= "form-control load_editor" required= "True" />
2014-03-25 06:19:01 +00:00
<input name= "post_id" t-att-value= "question.id" type= "hidden" />
<button class= "btn btn-primary" id= "btn_ask_your_question" > Post Your Answer</button>
</form>
<script type= "text/javascript" >
2014-04-01 08:46:31 +00:00
CKEDITOR.replace("content");
2014-03-25 06:19:01 +00:00
</script>
</template>
2014-04-02 05:55:36 +00:00
<template id= "vote" >
<div t-attf-class= "box oe_grey" >
2014-04-07 07:20:32 +00:00
<a t-attf-class= "vote_up fa fa-thumbs-up no-decoration #{post.user_vote == 1 and 'text-success' or ''}"
2014-04-02 05:55:36 +00:00
t-attf-id="#{post.id}" t-attf-value="1"/>
<span id= "vote_count" t-esc= "post.vote_count" />
2014-04-07 07:20:32 +00:00
<a t-attf-class= "vote_down fa fa-thumbs-down no-decoration #{post.user_vote == -1 and 'text-warning' or ''}"
2014-04-02 05:55:36 +00:00
t-attf-id="#{post.id}" t-attf-value="-1"/>
<div >
votes
</div>
</div>
</template>
2014-03-03 15:53:55 +00:00
<template id= "post_description_full" name= "Question Navigation" >
<t t-call= "website_forum.header" >
2014-03-06 09:40:42 +00:00
2014-03-24 06:06:50 +00:00
<div t-attf-class= "question #{not question.active and 'alert alert-danger' or ''}" >
2014-03-26 09:02:40 +00:00
<div class= "text-center pull-left" >
2014-04-02 05:55:36 +00:00
<t t-call= "website_forum.vote" >
<t t-set= "post" t-value= "question" />
</t>
2014-03-03 15:53:55 +00:00
<div class= "text-muted" >
2014-03-12 09:54:13 +00:00
<span t-esc= "question.child_count" />
<span t-if= "question.child_count>1" > Answers</span>
<span t-if= "question.child_count<=1" > Answer</span>
2014-03-03 15:53:55 +00:00
</div>
2014-04-07 07:20:32 +00:00
<div >
<a t-attf-id= "#{question.id}" t-attf-class= "favourite_question no-decoration fa fa-2x fa-star #{question.user_favourite and 'forum_favourite_question' or ''}" />
</div>
2014-02-28 05:33:13 +00:00
</div>
2014-03-03 20:22:24 +00:00
<div style= "margin-left: 95px;" >
2014-03-24 06:06:50 +00:00
<h1 class= "mt0" >
<span t-field= "question.name" />
<span t-if= "not question.active" > <b > [Deleted]</b> </span>
<span t-if= "question.state == 'close'" > <b > [Closed]</b> </span>
</h1>
2014-03-03 15:53:55 +00:00
<t t-raw= "question.content" />
2014-03-03 19:17:48 +00:00
<div class= "mt16 clearfix" >
<div class= "pull-right" >
2014-03-09 18:41:19 +00:00
<div class= "text-right" >
2014-04-09 16:50:59 +00:00
<t t-foreach= "question.tag_ids" t-as= "tag" >
2014-03-28 09:56:36 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/tag/#{ tag.id }/questions" class= "badge" t-field= "tag.name" />
2014-03-09 18:41:19 +00:00
</t>
</div>
<ul class= "list-inline" >
2014-04-09 12:09:56 +00:00
<li t-if= "user.id == question.user_id.id or user.karma>=50" >
2014-03-21 12:57:47 +00:00
<a style= "cursor: pointer" data-toggle= "collapse" class= "text-muted fa fa-comment-o"
2014-03-09 18:41:19 +00:00
t-attf-data-target="#comment#{ question._name.replace('.','') + '-' + str(question.id) }">
comment
</a>
</li>
2014-04-02 12:13:32 +00:00
<li t-if= "question.state != 'close' and (user.id == question.user_id.id or user.karma>=100)" >
2014-03-25 09:12:40 +00:00
<a class= "text-muted fa fa-times" t-attf-href= "/forum/#{ slug(forum) }/close/question/#{ question.id }" > close</a>
</li>
2014-04-02 12:13:32 +00:00
<li t-if= "question.state == 'close' and user.karma>=500" >
2014-03-25 09:12:40 +00:00
<a class= "text-muted fa fa-undo" t-attf-href= "/forum/#{ slug(forum) }/reopen/question/#{ question.id }" > reopen</a>
</li>
2014-03-28 10:19:15 +00:00
<li t-if= "user.id == question.user_id.id or user.karma>=300" >
2014-03-25 09:12:40 +00:00
<a class= "text-muted fa fa-edit" t-attf-href= "/forum/#{ slug(forum) }/edit/question/#{ question.id }" > edit</a>
</li>
2014-03-28 10:19:15 +00:00
<li t-if= "question.active and user.id == question.user_id.id or user.karma>=1000" >
2014-03-25 09:12:40 +00:00
<a class= "text-muted fa fa-trash-o" t-attf-href= "/forum/#{ slug(forum) }/delete/question/#{ question.id }" > delete</a>
</li>
<li t-if= "uid == question.user_id.id and not question.active" >
<a class= "text-muted fa fa-trash-o" t-attf-href= "/forum/#{ slug(forum) }/undelete/question/#{ question.id }" > undelete</a>
</li>
2014-03-21 12:57:47 +00:00
<li > <a class= "text-muted fa fa-share" href= "" > share</a> </li>
2014-03-09 18:41:19 +00:00
</ul>
2014-03-03 19:17:48 +00:00
</div>
2014-04-07 06:22:05 +00:00
<div >
<t t-call= "website_forum.user_detail" >
<t t-set= "user" t-value= "question.user_id" />
<span class= "text-muted" > Asked on <span t-field= "question.write_date" t-field-options= '{"format":"short"}' /> </span>
</t>
</div>
2014-03-21 12:57:47 +00:00
<div class= "alert alert-info" t-if= "question.state == 'close'" >
2014-03-24 06:06:50 +00:00
<p class= "mt32 mb32 text-center" >
2014-03-24 07:11:52 +00:00
<b > The question has been closed for the following reason "<span t-field= "question.reason_id.name" /> "
2014-03-21 12:57:47 +00:00
<i > by <a t-attf-href= "/forum/#{ slug(forum) }/user/#{ slug(question.closed_by) }" t-field= "question.closed_by.name" /> </i>
2014-04-03 06:59:58 +00:00
<br /> close date <span t-field= "question.closed_date" /> </b>
2014-03-21 12:57:47 +00:00
</p>
</div>
2014-02-28 09:56:40 +00:00
</div>
2014-03-06 11:28:16 +00:00
<t t-call= "website_forum.comments" >
<t t-set= "object" t-value= "question" />
</t>
2014-02-27 12:57:01 +00:00
</div>
2014-02-28 09:56:40 +00:00
</div>
<hr />
2014-03-03 15:53:55 +00:00
2014-04-04 10:40:37 +00:00
<div t-foreach= "question.child_ids" t-as= "answer" class= "mt16 mb32" >
2014-03-16 15:09:31 +00:00
<a t-attf-id= "answer-#{str(answer.id)}" />
2014-04-09 16:50:59 +00:00
<div t-attf-class= "#{answer.is_correct and 'alert alert-info answer_correct' or ''}" t-attf-id= "answer_#{answer.id}" >
2014-04-04 10:40:37 +00:00
<div class= "text-center pull-left" >
<t t-call= "website_forum.vote" >
<t t-set= "post" t-value= "answer" />
</t>
<div class= "text-muted" >
2014-04-09 16:50:59 +00:00
<a t-attf-id= "#{answer.id}" t-if= "answer.is_correct" class= "accept_answer fa fa-2x fa-check-circle no-decoration oe_answer_true" />
<a t-attf-id= "#{answer.id}" t-if= "not answer.is_correct" class= "accept_answer fa fa-2x fa-check-circle no-decoration oe_answer_false" />
2014-04-04 10:40:37 +00:00
</div>
2014-03-03 19:17:48 +00:00
</div>
2014-04-04 10:40:37 +00:00
<div style= "margin-left: 95px;" class= "clearfix" >
<t t-raw= "answer.content" />
<div class= "mt16" >
<ul class= "list-inline pull-right" >
2014-04-09 12:09:56 +00:00
<li t-if= "user.id == answer.user_id.id or user.karma>=50" >
2014-04-04 10:40:37 +00:00
<a style= "cursor: pointer" data-toggle= "collapse" class= "text-muted fa fa-comment-o"
t-attf-data-target="#comment#{ answer._name.replace('.','') + '-' + str(answer.id) }">comment
</a>
</li>
<li t-if= "user.id == answer.user_id.id or user.karma>=300" >
<a class= "text-muted fa fa-edit" t-attf-href= "/forum/#{ slug(forum) }/question/#{ question.id }/edit/#{ answer.id }" > edit</a>
</li>
<li t-if= "user.id == answer.user_id.id or user.karma>=1000" >
<a class= "text-muted delete fa fa-trash-o" href= "" t-attf-id= "#{answer.id}" > delete</a>
</li>
2014-04-09 12:09:56 +00:00
<li t-if= "user.id == answer.user_id.id" >
2014-04-04 10:40:37 +00:00
<a class= "text-muted fa fa-magic" t-attf-href= "/forum/#{ slug(forum) }/post/#{ answer.id }/converttocomment" > Convert as a comment</a>
</li>
<li > <a class= "text-muted fa fa-share" t-attf-href= "/forum/#{ slug(forum) }/question/#{ question.id }/#answer-#{ answer.id }" > share</a> </li>
</ul>
<t t-call= "website_forum.user_detail" >
<t t-set= "user" t-value= "answer.user_id" />
<span class= "text-muted" > Answered on <span t-field= "answer.create_date" t-field-options= '{"format":"short"}' /> </span>
</t>
</div>
<t t-call= "website_forum.comments" >
<t t-set= "object" t-value= "answer" />
2014-03-03 19:17:48 +00:00
</t>
</div>
</div>
2014-02-28 05:33:13 +00:00
</div>
2014-02-28 09:56:40 +00:00
<div t-if= "not answer_done" >
<t t-call= "website_forum.post_answer" />
</div>
2014-03-09 18:58:47 +00:00
<div t-if= "answer_done" class= "mb16" >
<a class= "btn btn-primary" t-attf-href= "/forum/#{ slug(forum) }/question/#{ question.id }/editanswer" > Edit Your Previous Answer</a>
<span class= "text-muted" > (only one answer per question is allowed)</span>
2014-03-05 07:33:58 +00:00
</div>
2014-02-28 05:33:13 +00:00
</t>
</template>
2014-03-06 11:28:16 +00:00
<template id= "comments" >
2014-03-08 18:08:59 +00:00
<div class= "row clearfix" >
<div class= "col-sm-10 col-sm-offset-2" >
2014-04-04 07:10:43 +00:00
<div t-foreach= "reversed(object.website_message_ids)" t-as= "message" id= "comment" class= "oe_comment_grey" style= "padding: 4px;" >
2014-03-08 18:08:59 +00:00
<small class= "text-muted" >
2014-03-28 10:19:15 +00:00
<button type= "button" t-if= "user.id == message.create_uid.id or user.karma>=750" t-att-id= "message.id" class= "close comment_delete" > & times;</button>
2014-03-19 09:07:35 +00:00
<span t-field= "message.body" />
<a t-attf-href= "/forum/#{ slug(forum) }/user/#{ message.create_uid.id }" t-field= "message.create_uid" />
2014-03-09 18:41:19 +00:00
on <span t-field= "message.date" t-field-options= '{"format":"short"}' />
2014-03-25 09:12:40 +00:00
<a class= "fa fa-magic text-muted pull-right" t-if= "uid == message.create_uid.id"
t-attf-href="/forum/#{ slug(forum) }/post/#{ object.id }/commet/#{ message.id }/converttoanswer">Convert as an answer</a>
2014-03-08 18:08:59 +00:00
</small>
2014-03-06 11:28:16 +00:00
</div>
2014-04-04 07:10:43 +00:00
<div class= "css_editable_mode_hidden" >
2014-03-08 18:08:59 +00:00
<form t-attf-id= "comment#{ object._name.replace('.','') + '-' + str(object.id) }" class= "collapse" t-attf-action= "/forum/#{ slug(forum) }/comment" method= "POST" >
<input name= "post_id" t-att-value= "object.id" type= "hidden" />
<textarea name= "comment" class= "form-control" placeholder= "Comment this post..." />
<button type= "submit" class= "btn btn-primary mt8" > Post</button>
</form>
</div>
</div>
</div>
2014-03-06 11:28:16 +00:00
</template>
2014-02-28 09:56:40 +00:00
2014-03-03 11:06:20 +00:00
<template id= "tag" >
2014-03-03 19:17:48 +00:00
<t t-call= "website_forum.header" >
<h1 class= "mt0" >
2014-03-08 12:01:43 +00:00
Tags
2014-03-03 19:17:48 +00:00
</h1>
2014-03-08 12:01:43 +00:00
<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>
2014-03-03 19:17:48 +00:00
<div class= "row" >
<div class= "col-sm-3 mt16" t-foreach= "tags" t-as= "tag" >
2014-03-27 07:28:42 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/tag/#{ slug(tag) }/questions?{{ keep_query( filters='tag') }}" class= "badge" >
2014-03-18 12:06:59 +00:00
<span t-field= "tag.name" />
2014-03-03 11:06:20 +00:00
</a>
<span >
2014-03-12 08:53:25 +00:00
X <t t-esc= "tag.posts_count" />
2014-03-03 11:06:20 +00:00
</span>
</div>
</div>
</t>
</template>
2014-03-07 09:34:30 +00:00
<template id= "badge" >
<t t-call= "website_forum.header" >
<h1 class= "mt0" >
2014-03-16 15:09:31 +00:00
Badges
2014-03-07 09:34:30 +00:00
</h1>
2014-03-08 12:01:43 +00:00
<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" >
<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" />
2014-03-18 12:06:59 +00:00
<span t-field= "badge.name" />
2014-03-08 12:01:43 +00:00
</a>
</td> <td >
2014-03-12 08:53:25 +00:00
<b t-esc= "badge.stat_count_distinct" />
2014-03-08 12:01:43 +00:00
<i class= "text-muted" > awarded users</i>
</td> <td >
<span t-field= "badge.description" />
</td>
</tr>
</table>
2014-03-07 09:34:30 +00:00
</t>
</template>
<template id= "badge_user" >
<t t-call= "website_forum.header" >
<h3 class= "mt32 mb32" >
<b > Badge "<span t-field= "badge.name" /> "</b>
</h3>
<div >
2014-03-07 12:38:55 +00:00
<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>
2014-03-07 09:34:30 +00:00
<span t-field= "badge.description" style= "margin-left:20px" />
</div>
<h4 class= "mt32" >
2014-03-12 08:53:25 +00:00
<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>
2014-03-07 09:34:30 +00:00
received this badge:
</h4>
<div class= "row" >
<div class= "col-sm-3 mt16" t-foreach= "users" t-as= "user" >
<span t-field= "user.image" t-field-options= '{"widget": "image", "class":"pull-left img img-circle img-avatar"}' />
<div >
<a t-attf-href= "/forum/#{ slug(forum) }/user/#{ slug(user) }" t-field= "user.name" />
</div>
</div>
</div>
</t>
</template>
2014-03-03 11:06:20 +00:00
<template id= "users" >
2014-03-03 19:17:48 +00:00
<t t-call= "website_forum.header" >
<div class= "row" >
<div t-foreach= "users" t-as= "user" class= "col-sm-4" >
<t t-set= "separator" > <br /> </t>
<t t-call= "website_forum.user_detail" />
2014-03-08 16:25:24 +00:00
<span class= "text-muted" > Joined on <span t-field= "user.create_date" t-field-options= '{"format":"short"}' /> </span>
2014-03-03 11:06:20 +00:00
</div>
</div>
2014-03-03 19:17:48 +00:00
<div class= "pull-left" >
2014-03-18 12:06:59 +00:00
<t t-call= "website.pager" />
2014-03-03 19:17:48 +00:00
</div>
2014-03-03 11:06:20 +00:00
</t>
</template>
2014-03-14 11:39:13 +00:00
<template id= "edit_profile" >
<t t-call= "website_forum.header" >
<h3 > Edit Profile </h3>
<div class= "col-md-2" >
<span t-field= "user.image" t-field-options= '{"widget": "image", "class": "img img-responsive img-circle"}' />
</div>
2014-04-04 07:10:43 +00:00
<form t-attf-action= "/forum/#{ slug(forum) }/save/profile" method= "post" role= "form" class= "form-horizontal" >
2014-03-14 11:39:13 +00:00
<input name= "user_id" t-att-value= "user.id" type= "hidden" />
<label class= "col-md-2 control-label mb16" for= "user.name" > Real name</label>
<div class= "col-md-7 mb16" >
2014-04-02 09:25:49 +00:00
<input type= "text" class= "col-md-7 mb16 form-control" name= "name" required= "True" t-attf-value= "#{user.name}" />
2014-03-14 11:39:13 +00:00
</div>
2014-03-28 11:13:50 +00:00
<label class= "col-md-2 control-label mb16" for= "user.partner_id.website" > Website</label>
2014-03-14 11:39:13 +00:00
<div class= "col-md-7 mb16" >
<input type= "text" class= "form-control" name= "website" t-attf-value= "#{user.partner_id.website or ''}" />
</div>
2014-04-02 09:25:49 +00:00
<label class= "col-md-4 control-label mb16" for= "user.partner_id.email" > Email</label>
<div class= "col-md-7 mb16" >
<input type= "text" class= "form-control" name= "email" required= "True" t-attf-value= "#{user.partner_id.email}" />
</div>
2014-03-14 11:39:13 +00:00
<label class= "col-md-4 control-label mb16" for= "user.partner_id.city" > City</label>
<div class= "col-md-7 mb16" >
<input type= "text" class= "form-control" name= "city" t-attf-value= "#{user.partner_id.city or ''}" />
</div>
<label class= "col-md-4 control-label mb16" for= "contact_name" > Country</label>
<div class= "col-md-7 mb16" >
<select class= "form-control" name= "country" >
<option value= "" > Country...</option>
2014-03-18 11:20:50 +00:00
<t t-foreach= "countries or []" t-as= "country" >
<option t-att-value= "country.id" t-att-selected= "country.id == user.partner_id.country.id" > <t t-esc= "country.name" /> </option>
</t>
2014-03-14 11:39:13 +00:00
</select>
</div>
2014-03-18 11:20:50 +00:00
<!-- Note: using website_description fiels instead of using commnt firld of partner -->
<label class= "col-md-4 control-label mb16" for= "user.partner_id.website_description" > Biography</label>
2014-03-14 11:39:13 +00:00
<div class= "col-md-7 mb16" >
2014-03-27 09:43:22 +00:00
<textarea name= "description" style= "min-height: 120px" required= "True"
class="form-control"><t t-esc= "user.partner_id.website_description" /> </textarea>
2014-03-14 11:39:13 +00:00
</div>
<div class= "col-sm-offset-4 col-md-4 mb16" >
<button class= "btn btn-primary btn-lg" > Update</button>
</div>
</form>
</t>
</template>
2014-03-03 11:06:20 +00:00
2014-02-28 05:33:13 +00:00
<template id= "user_detail_full" >
2014-03-03 19:17:48 +00:00
<t t-call= "website_forum.header" >
2014-03-03 20:22:24 +00:00
<h1 class= "mt0 page-header" >
2014-03-18 11:20:50 +00:00
<span t-field= "user.name" />
2014-03-03 20:22:24 +00:00
<small > profile</small>
</h1>
<div class= "row" >
<div class= "col-sm-2" >
<span t-field= "user.image"
t-field-options='{"widget": "image", "class": "img img-responsive img-circle"}'/>
</div>
2014-03-16 15:09:31 +00:00
<div class= "col-sm-10" >
2014-03-08 12:01:43 +00:00
<table class= "table table-condensed" >
<tr >
<td rowspan= "2" valign= "top" > <span class= "text-muted" > contributions</span> </td>
<td > member since</td>
2014-03-08 16:25:24 +00:00
<td > <span t-field= "user.create_date" t-field-options= '{"format": "short"}' /> </td>
2014-03-08 12:01:43 +00:00
</tr> <tr >
<td > last connection</td>
2014-03-08 16:25:24 +00:00
<td > <span t-field= "user.login_date" t-field-options= '{"format": "short"}' /> </td>
2014-03-08 12:01:43 +00:00
</tr>
<tr >
2014-03-16 15:09:31 +00:00
<td rowspan= "2" valign= "top" > <span class= "text-muted" > bio</span> </td>
<td > website</td>
<td >
<a t-att-href= "user.website" t-if= "user.website" >
<span t-field= "user.website" />
</a>
</td>
</tr> <tr >
<td > location</td>
<td >
<span t-field= "user.city" />
2014-03-18 11:20:50 +00:00
<span t-if= "user.city and user.country_id" > , </span>
<span t-field= "user.country_id" />
2014-04-07 06:22:05 +00:00
<t t-if= "user.country_id" > <span t-field= "user.country_id.image" t-field-options= '{"widget": "image", "class":"forum_user_flag"}' /> </t>
2014-03-16 15:09:31 +00:00
</td>
</tr>
<tr >
<td rowspan= "2" valign= "top" > <span class= "text-muted" > stats</span> </td>
2014-03-08 12:01:43 +00:00
<td > karma</td>
<td > <span t-field= "user.karma" /> </td>
</tr> <tr >
2014-03-16 15:09:31 +00:00
<td > votes</td>
2014-03-08 12:01:43 +00:00
<td >
2014-03-14 12:30:07 +00:00
<span class= "fa fa-thumbs-up" />
2014-03-08 12:01:43 +00:00
<span t-esc= "up_votes" />
2014-04-07 07:20:32 +00:00
<span class= "fa fa-thumbs-down" />
2014-03-08 12:01:43 +00:00
<span t-esc= "down_votes" />
</td>
</tr>
</table>
<div class= "well well-sm" >
2014-03-16 15:09:31 +00:00
<span t-field= "user.partner_id.website_description" />
2014-03-18 11:20:50 +00:00
<t t-if= "uid == user.id" >
<a class= "fa fa-arrow-right" t-attf-href= "/forum/#{ slug(forum) }/edit/profile/#{ user.id }" > Edit Your Bio</a>
</t>
2014-03-03 20:22:24 +00:00
</div>
2014-02-28 05:33:13 +00:00
</div>
2014-03-03 20:22:24 +00:00
</div>
2014-02-28 05:33:13 +00:00
2014-03-03 20:22:24 +00:00
<ul class= "nav nav-tabs" >
<li class= "active" >
2014-03-07 11:03:29 +00:00
<a href= "#questions" data-toggle= "tab" > <t t-esc= "len(questions)" /> Questions</a>
2014-03-03 20:26:47 +00:00
</li>
<li >
2014-03-07 11:03:29 +00:00
<a href= "#answers" data-toggle= "tab" > <t t-esc= "len(answers)" /> Answers</a>
2014-03-03 20:22:24 +00:00
</li>
2014-04-07 11:56:50 +00:00
<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>
2014-04-03 06:59:58 +00:00
<li t-if= "uid == user.id" >
2014-03-05 13:07:24 +00:00
<a href= "#activity" data-toggle= "tab" > Activity</a>
2014-03-03 20:22:24 +00:00
</li>
2014-03-07 09:34:30 +00:00
<li >
<a href= "#badges" data-toggle= "tab" > Badges</a>
</li>
2014-04-09 12:09:56 +00:00
<li t-if= "uid == user.id" >
2014-03-18 11:12:29 +00:00
<a href= "#votes" data-toggle= "tab" > Votes</a>
</li>
2014-03-03 20:22:24 +00:00
</ul>
2014-03-03 20:26:47 +00:00
<div class= "tab-content mt16" >
<div class= "tab-pane active" id= "questions" >
2014-03-24 12:26:45 +00:00
<div class= "mb16" t-foreach= "questions" t-as= "question" >
2014-03-18 12:06:59 +00:00
<t t-call= "website_forum.post_list" />
2014-03-03 20:26:47 +00:00
</div>
</div> <div class= "tab-pane" id= "answers" >
2014-03-21 13:21:40 +00:00
<div t-foreach= "answers" t-as= "answer" >
2014-03-21 12:37:16 +00:00
<t t-call= "website_forum.post_list_answer" />
2014-02-28 05:33:13 +00:00
</div>
</div>
2014-03-03 20:22:24 +00:00
<div class= "tab-pane" id= "karma" >
<h1 > Karma</h1>
</div>
2014-03-07 09:34:30 +00:00
<div class= "tab-pane" id= "badges" >
2014-03-18 12:06:59 +00:00
<t t-call= "website_forum.user_badges" />
2014-03-07 09:34:30 +00:00
</div>
2014-04-07 11:56:50 +00:00
<div class= "tab-pane" id= "favourite_question" >
<div t-foreach= "favourite" t-as= "question" >
<t t-call= "website_forum.post_list" />
</div>
</div>
2014-03-28 05:16:06 +00:00
<div class= "tab-pane" id= "followed_question" >
<div t-foreach= "followed" t-as= "question" >
<t t-call= "website_forum.post_list" />
</div>
</div>
2014-03-18 11:12:29 +00:00
<div class= "tab-pane" id= "votes" >
2014-03-18 12:06:59 +00:00
<t t-call= "website_forum.user_votes" />
2014-03-18 11:12:29 +00:00
</div>
2014-03-03 20:22:24 +00:00
<div class= "tab-pane" id= "activity" >
2014-03-16 15:09:31 +00:00
<ul class= "list-unstyled" >
<li t-foreach= "activities" t-as= "activity" >
2014-04-10 06:04:00 +00:00
<span t-field= "activity.date" t-field-options= '{"format": "short"}' />
2014-03-16 15:09:31 +00:00
<span t-esc= "activity.subtype_id.name" class= "label label-info" />
<t t-set= "post" t-value= "posts[activity.res_id]" />
<span t-if= "post[1]" >
<a t-attf-href= "/forum/#{ slug(forum) }/question/#{ slug(post[0]) }#answer-#{ str(post[1].id) }" >
2014-04-10 06:04:00 +00:00
<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>
2014-03-16 15:09:31 +00:00
</span>
</li>
</ul>
2014-03-03 20:22:24 +00:00
</div>
2014-02-28 05:33:13 +00:00
</div>
</t>
</template>
2014-03-07 09:34:30 +00:00
<template id= "user_badges" >
2014-03-24 12:26:45 +00:00
<table class= "table mt32 mb64" >
2014-04-09 16:50:59 +00:00
<tr t-foreach= "user.badge_ids" t-as= "badge" >
2014-03-24 12:26:45 +00:00
<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>
2014-04-09 16:50:59 +00:00
<div class= "mb16" t-if= "not user.badge_ids" >
2014-03-09 20:19:32 +00:00
<b > No badge yet!</b> <br />
2014-03-12 09:54:13 +00:00
<a t-attf-href= "/forum/#{ slug(forum) }/badge" class= "fa fa-arrow-right" > Check available badges</a>
2014-03-09 20:19:32 +00:00
</div>
2014-03-07 09:34:30 +00:00
</template>
2014-03-18 11:12:29 +00:00
<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>
2014-03-18 12:06:59 +00:00
<div class= "mb16" t-if= "not vote_post" >
<b > No vote given by you yet!</b>
</div>
2014-03-18 11:12:29 +00:00
</template>
2014-03-21 12:37:16 +00:00
<template id= "post_list_answer" >
<div class= "clearfix" >
2014-03-21 13:21:40 +00:00
<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)" />
2014-03-21 12:37:16 +00:00
</div>
2014-03-21 13:21:40 +00:00
<div class= "question-name" style= "margin-left: 32px;" >
2014-03-28 09:03:57 +00:00
<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" />
2014-03-21 13:21:40 +00:00
<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> )
</t>
2014-03-21 12:37:16 +00:00
</div>
</div>
</template>
2014-02-28 05:33:13 +00:00
</data>
2014-02-21 13:16:08 +00:00
</openerp>