{# This is an apparent redundant logic block; however, it makes sure the "login to ..." links wouldn't be shown twice! #}
{% if form=comment_form %}
{% if comment_form %}
{% if not user.is_authenticated and submission.comments.vetted.exists %}
{% include 'comments/new_comment.html' with form=comment_form object_id=submission.id type_of_object='submission' open_for_commenting=submission.open_for_commenting user_is_referee=submission|user_is_referee:request.user %}