{% if object.has_user_already_commented(user) %}
  <div class="leave-comment-not-allowed">
    <p>{% trans %}You already posted a comment on this UE. If you want to comment again, please modify or delete your previous comment.{% endtrans %}</p>
  </div>
  <br>
{% endif %}

{% if not object.has_user_already_commented(user) and user.has_perm("pedagogy.add_uecomment") %}
  {{ add_comment_form }}
{% endif %}
