[IMP] website_forum : if user have not enough 'Karma' then 'Reply' button should be disable, Hide the answer textarea and generate the popup message.
This commit is contained in:
@@ -880,7 +880,9 @@
|
||||
</ul>
|
||||
<ul class="list-inline mb0">
|
||||
<li t-if="(question.post_type != 'question' or question.post_type == 'question' and not question.uid_has_answered) and question.state != 'close' and question.active != False">
|
||||
<a t-attf-class="fa fa-reply" href="#post_reply"> Reply</a>
|
||||
<a t-attf-class="fa fa-reply #{not question.can_answer and 'karma_required text-muted' or ''}"
|
||||
t-att-data-karma="question.forum_id.karma_answer"
|
||||
href="#post_reply"> Reply</a>
|
||||
</li>
|
||||
<li t-if="question.post_type == 'question'">
|
||||
<a style="cursor: pointer" t-att-data-toggle="question.can_comment and 'collapse' or None"
|
||||
@@ -911,7 +913,7 @@
|
||||
</t>
|
||||
</div>
|
||||
<div id="post_reply"
|
||||
t-if="(question.post_type != 'question' or question.post_type == 'question' and not question.uid_has_answered) and question.state != 'close' and question.active != False">
|
||||
t-if="(question.post_type != 'question' or question.post_type == 'question' and not question.uid_has_answered) and question.state != 'close' and question.active != False and question.can_answer">
|
||||
<t t-call="website_forum.post_answer"/>
|
||||
</div>
|
||||
<div t-if="question.post_type == 'question' and question.uid_has_answered" class="mb16">
|
||||
@@ -994,7 +996,7 @@
|
||||
</ul>
|
||||
<ul class="list-inline mb0">
|
||||
<li t-if="question.post_type != 'question'">
|
||||
<a t-attf-class="fa fa-reply" style="cursor: pointer" data-toggle="collapse"
|
||||
<a t-attf-class="fa fa-reply #{not question.can_answer and 'karma_required text-muted' or None}" t-att-data-karma="question.forum_id.karma_answer" style="cursor: pointer" data-toggle="collapse"
|
||||
t-attf-data-target="#reply#{ answer._name.replace('.','') + '-' + str(answer.id) }"> Reply
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user