SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 74b42210 authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Fix Report-comment vetting mail

parent f95b367b
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,13 @@ def vet_submitted_comment(request, comment_id):
if not comment.is_author_reply:
SubmissionUtils.load({'submission': content_object})
SubmissionUtils.send_author_comment_received_email()
elif isinstance(content_object, Report):
# Add events to related Submission and send mail to author of the Submission
content_object.submission.add_event_for_eic('A Comment has been accepted.')
content_object.submission.add_event_for_author('A new Comment has been added.')
if not comment.is_author_reply:
SubmissionUtils.load({'submission': content_object.submission})
SubmissionUtils.send_author_comment_received_email()
elif form.cleaned_data['action_option'] == '2':
# The comment request is simply rejected
......@@ -104,6 +111,8 @@ def vet_submitted_comment(request, comment_id):
if isinstance(comment.content_object, Submission):
# Add event if commented to Submission
comment.content_object.add_event_for_eic('A Comment has been rejected.')
elif isinstance(comment.content_object, Report):
comment.content_object.submission.add_event_for_eic('A Comment has been rejected.')
messages.success(request, 'Submitted Comment vetted.')
if isinstance(comment.content_object, Submission):
......@@ -112,6 +121,12 @@ def vet_submitted_comment(request, comment_id):
# Redirect a EIC back to the Editorial Page!
return redirect(reverse('submissions:editorial_page',
args=(submission.arxiv_identifier_w_vn_nr,)))
elif isinstance(comment.content_object, Report):
submission = comment.content_object.submission
if submission.editor_in_charge == request.user.contributor:
# Redirect a EIC back to the Editorial Page!
return redirect(reverse('submissions:editorial_page',
args=(submission.arxiv_identifier_w_vn_nr,)))
elif request.user.has_perm('scipost.can_vet_comments'):
# Redirect vetters back to check for other unvetted comments!
return redirect(reverse('comments:vet_submitted_comments_list'))
......
......@@ -5,7 +5,8 @@
<strong>Submission deadline: {{ proceedings.submissions_deadline }}</strong>.
</div>
{% if proceedings.open_for_submission %}
<a href="{% url 'submissions:submit_manuscript' %}">Submit your manuscript here</a>
<a href="{% url 'submissions:submit_manuscript' %}">Submit your manuscript here</a>.
Prepare your manuscript according to <a href="{% url 'submissions:author_guidelines' %}">our guidelines</a>, using <a href>our LaTeX template</a>.
{% endif %}
</div>
<p>{{ proceedings.event_description|linebreaksbr }}</p>
......
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