SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 49bddbb8 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Make comment instructions clearer: identity revealed

parent 264d0c4f
No related branches found
No related tags found
No related merge requests found
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<input type="submit" name="submit" value="Submit your Comment for vetting" class="btn btn-primary" id="submit-id-submit"> <input type="submit" name="submit" value="Submit your Comment for vetting" class="btn btn-primary" id="submit-id-submit">
<p class="mt-2" id="goodCommenter"><i>By clicking on Submit, you agree with the <a target="_blank" href="{% url 'scipost:terms_and_conditions' %}">Terms and Conditions</a>.</i></p> <p class="mt-2" id="goodCommenter"><i>By clicking on Submit, you agree with the <a target="_blank" href="{% url 'scipost:terms_and_conditions' %}">Terms and Conditions</a>, in particular that <span class="text-danger">your identity will be attached to the Comment</span>.</i></p>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<hr> <hr>
<h2 class="highlight" id="contribute_comment">Contribute a Comment:</h2> <h2 class="highlight" id="contribute_comment">Contribute a Comment: {% if user_is_referee and submission %}&nbsp;<small class="text-danger">you are an invited referee, please <a href="{% url 'submissions:submit_report' submission.arxiv_identifier_w_vn_nr %}">submit a Report</a> instead</small>{% endif %}</h2>
{% url 'comments:new_comment' object_id=object_id type_of_object=type_of_object as url %} {% url 'comments:new_comment' object_id=object_id type_of_object=type_of_object as url %}
{% include 'comments/_add_comment_form.html' with form=form url=url %} {% include 'comments/_add_comment_form.html' with form=form url=url %}
......
...@@ -239,9 +239,9 @@ ...@@ -239,9 +239,9 @@
{# This is an apparent redundant logic block; however, it makes sure the "login to ..." links wouldn't be shown twice! #} {# This is an apparent redundant logic block; however, it makes sure the "login to ..." links wouldn't be shown twice! #}
{% if not user.is_authenticated and submission.comments.vetted.exists %} {% if not user.is_authenticated and submission.comments.vetted.exists %}
{% include 'comments/new_comment.html' with object_id=submission.id type_of_object='submission' open_for_commenting=submission.open_for_commenting %} {% include 'comments/new_comment.html' with object_id=submission.id type_of_object='submission' open_for_commenting=submission.open_for_commenting user_is_referee=submission|user_is_referee:request.user %}
{% elif user.is_authenticated %} {% elif user.is_authenticated %}
{% include 'comments/new_comment.html' with object_id=submission.id type_of_object='submission' open_for_commenting=submission.open_for_commenting %} {% include 'comments/new_comment.html' with object_id=submission.id type_of_object='submission' open_for_commenting=submission.open_for_commenting user_is_referee=submission|user_is_referee:request.user %}
{% endif %} {% endif %}
{% endblock content %} {% endblock content %}
...@@ -23,3 +23,7 @@ def is_viewable_by_authors(recommendation): ...@@ -23,3 +23,7 @@ def is_viewable_by_authors(recommendation):
return recommendation.submission.status in ['revision_requested', 'resubmitted', return recommendation.submission.status in ['revision_requested', 'resubmitted',
'accepted', 'rejected', 'accepted', 'rejected',
'published', 'withdrawn'] 'published', 'withdrawn']
@register.filter
def user_is_referee(submission, user):
return submission.referee_invitations.filter(referee__user=user).exists()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment