feat: adaptive display of links

Do not display the 'Learn more' and 'Share feedback' links for
banner that is enabled by the context_course.discussions_settings
flag if the URLs for these links are not set in the settings.
This commit is contained in:
Dima Alipov
2024-03-27 17:02:51 +02:00
committed by Dmytro
parent 5b809673b6
commit e4c69565f4

View File

@@ -76,14 +76,18 @@ from django.urls import reverse
${_("This course run is using an upgraded version of edx discussion forum. In order to display the discussions sidebar, discussions xBlocks will no longer be visible to learners.")}
</div>
<div style="margin-left:auto; width:fit-content;">
%if settings.DISCUSSIONS_INCONTEXT_LEARNMORE_URL:
<span>
<a href="${settings.DISCUSSIONS_INCONTEXT_LEARNMORE_URL}" target="_blank" rel="noreferrer noopener">${_(" Learn more")}</a>
<i class="fa fa-share-square-o" aria-hidden="true"></i>
</span>
%endif
%if settings.DISCUSSIONS_INCONTEXT_FEEDBACK_URL:
<span style="margin-left: 1rem">
<a href="${settings.DISCUSSIONS_INCONTEXT_FEEDBACK_URL}" target="_blank" rel="noreferrer noopener">${_("Share feedback")}</a>
<i class="fa fa-share-square-o" aria-hidden="true"></i>
</span>
%endif
</div>
</div>
</div>