[FIX] website_slides: hide review tab when allow_comment is False

This commit fixes the Review tab on the course page. The tab shows up even
if the channel does not allow comment. This commits fixes that behavior.

Linked to task 1978530
Related to PR #33559
This commit is contained in:
qmo-odoo
2019-05-22 09:16:02 +00:00
committed by Thibault Delavallée
parent 58f0bad306
commit a71fdc058d
@@ -167,7 +167,7 @@
<i class="fa fa-home"/> Course
</a>
</li>
<li class="nav-item">
<li t-if="channel.allow_comment" class="nav-item">
<a class="nav-link" id="review-tab" data-toggle="pill" href="#review" role="tab" aria-controls="review" aria-selected="false">Review</a>
</li>
</ul>
@@ -176,7 +176,7 @@
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
<t t-if="channel.channel_type == 'training'" t-call="website_slides.course_slides_list"/>
</div>
<div class="tab-pane fade" id="review" role="tabpanel" aria-labelledby="review-tab">
<div t-if="channel.allow_comment" class="tab-pane fade" id="review" role="tabpanel" aria-labelledby="review-tab">
<t t-call="portal.message_thread">
<t t-set="object" t-value="channel"/>
<t t-set="hash" t-value="message_post_hash"/>