[MRG] merge lp:~openerp-dev/openobject-addons/trunk-website-forum-tpa-template_ans-ssh adding answer template to show anwers on user profile.
bzr revid: tpa@tinyerp.com-20140321132140-hmnt072v4kw6it0q
This commit is contained in:
commit
224bc24310
|
@ -225,7 +225,7 @@ class website_forum(http.Controller):
|
|||
'searches': post,
|
||||
'forum': forum,
|
||||
'questions': user_questions,
|
||||
'answers': answers,
|
||||
'answers': user_answers,
|
||||
'total_votes': total_votes,
|
||||
'up_votes': up_votes,
|
||||
'down_votes': down_votes,
|
||||
|
|
|
@ -699,8 +699,8 @@
|
|||
<t t-call="website_forum.post_list"/>
|
||||
</div>
|
||||
</div><div class="tab-pane" id="answers">
|
||||
<div t-foreach="answers" t-as="question">
|
||||
<t t-call="website_forum.post_list"/>
|
||||
<div t-foreach="answers" t-as="answer">
|
||||
<t t-call="website_forum.post_list_answer"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="karma">
|
||||
|
@ -769,5 +769,22 @@
|
|||
<b>No vote given by you yet!</b>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="post_list_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.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>)
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue