SciPost Code Repository

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

Seemingly OK

parent a018f330
No related branches found
No related tags found
No related merge requests found
...@@ -12,11 +12,11 @@ STATUS_UNCLEAR = -1 ...@@ -12,11 +12,11 @@ STATUS_UNCLEAR = -1
STATUS_INCORRECT = -2 STATUS_INCORRECT = -2
STATUS_NOT_USEFUL = -3 STATUS_NOT_USEFUL = -3
COMMENT_STATUS = ( COMMENT_STATUS = (
(STATUS_VETTED, 'vetted'), (STATUS_VETTED, 'Vetted'),
(STATUS_PENDING, 'not yet vetted (pending)'), (STATUS_PENDING, 'Not yet vetted (pending)'),
(STATUS_UNCLEAR, 'rejected (unclear)'), (STATUS_UNCLEAR, 'Rejected (unclear)'),
(STATUS_INCORRECT, 'rejected (incorrect)'), (STATUS_INCORRECT, 'Rejected (incorrect)'),
(STATUS_NOT_USEFUL, 'rejected (not useful)'), (STATUS_NOT_USEFUL, 'Rejected (not useful)'),
) )
COMMENT_CATEGORIES = ( COMMENT_CATEGORIES = (
......
...@@ -17,7 +17,9 @@ from scipost.models import Contributor ...@@ -17,7 +17,9 @@ from scipost.models import Contributor
from commentaries.constants import COMMENTARY_PUBLISHED from commentaries.constants import COMMENTARY_PUBLISHED
from .behaviors import validate_file_extension, validate_max_file_size from .behaviors import validate_file_extension, validate_max_file_size
from .constants import COMMENT_STATUS, STATUS_PENDING from .constants import (
COMMENT_STATUS, STATUS_PENDING, STATUS_UNCLEAR, STATUS_INCORRECT, STATUS_NOT_USEFUL,
STATUS_VETTED)
from .managers import CommentQuerySet from .managers import CommentQuerySet
...@@ -126,6 +128,21 @@ class Comment(TimeStampedModel): ...@@ -126,6 +128,21 @@ class Comment(TimeStampedModel):
else: else:
raise Exception raise Exception
@property
def is_vetted(self):
"""Check if Comment is vetted."""
return self.status == STATUS_VETTED
@property
def is_unvetted(self):
"""Check if Comment is awaiting vetting."""
return self.status == STATUS_PENDING
@property
def is_rejected(self):
"""Check if Comment is rejected."""
return self.status in [STATUS_UNCLEAR, STATUS_INCORRECT, STATUS_NOT_USEFUL]
def create_doi_label(self): def create_doi_label(self):
self.doi_label = 'SciPost.Comment.' + str(self.id) self.doi_label = 'SciPost.Comment.' + str(self.id)
self.save() self.save()
......
...@@ -20,7 +20,8 @@ from .constants import ( ...@@ -20,7 +20,8 @@ from .constants import (
SUBMISSION_STATUS, REPORT_STATUSES, STATUS_UNVETTED, STATUS_INCOMING, SUBMISSION_STATUS, REPORT_STATUSES, STATUS_UNVETTED, STATUS_INCOMING,
SUBMISSION_CYCLES, CYCLE_DEFAULT, CYCLE_SHORT, STATUS_RESUBMITTED, DECISION_FIXED, SUBMISSION_CYCLES, CYCLE_DEFAULT, CYCLE_SHORT, STATUS_RESUBMITTED, DECISION_FIXED,
CYCLE_DIRECT_REC, EVENT_GENERAL, EVENT_TYPES, EVENT_FOR_AUTHOR, EVENT_FOR_EIC, REPORT_TYPES, CYCLE_DIRECT_REC, EVENT_GENERAL, EVENT_TYPES, EVENT_FOR_AUTHOR, EVENT_FOR_EIC, REPORT_TYPES,
REPORT_NORMAL, STATUS_DRAFT, STATUS_VETTED, EIC_REC_STATUSES, VOTING_IN_PREP) REPORT_NORMAL, STATUS_DRAFT, STATUS_VETTED, EIC_REC_STATUSES, VOTING_IN_PREP,
STATUS_INCORRECT, STATUS_UNCLEAR, STATUS_NOT_USEFUL, STATUS_NOT_ACADEMIC)
from .managers import ( from .managers import (
SubmissionQuerySet, EditorialAssignmentQuerySet, EICRecommendationQuerySet, ReportQuerySet, SubmissionQuerySet, EditorialAssignmentQuerySet, EICRecommendationQuerySet, ReportQuerySet,
SubmissionEventQuerySet, RefereeInvitationQuerySet, EditorialCommunicationQueryset) SubmissionEventQuerySet, RefereeInvitationQuerySet, EditorialCommunicationQueryset)
...@@ -566,6 +567,17 @@ class Report(SubmissionRelatedObjectMixin, models.Model): ...@@ -566,6 +567,17 @@ class Report(SubmissionRelatedObjectMixin, models.Model):
"""Return if Report is publicly available.""" """Return if Report is publicly available."""
return self.status == STATUS_VETTED return self.status == STATUS_VETTED
@property
def is_unvetted(self):
"""Return if Report is awaiting vetting."""
return self.status == STATUS_UNVETTED
@property
def is_rejected(self):
"""Return if Report is rejected."""
return self.status in [
STATUS_INCORRECT, STATUS_UNCLEAR, STATUS_NOT_USEFUL, STATUS_NOT_ACADEMIC]
@property @property
def notification_name(self): def notification_name(self):
"""Return string representation of this Report as shown in Notifications.""" """Return string representation of this Report as shown in Notifications."""
......
<table class="table bg-light table-hover v-center">
<thead>
<tr>
<th>Referee</th>
<th>Status</th>
<th>Recommendation</th>
<th>Type</th>
<th>Date</th>
</tr>
</thead>
<tbody>
{% for comment in submission.comments.all %}
<tr>
<td>
{{ comment.author }}
{% if comment.anonymous %}
<br>
<b><span class="text-danger">Author chose public anonymity</span></b>
{% endif %}
</td>
<td>
{% if comment.is_vetted %}
<i class="fa fa-check-circle text-success"></i>
{% elif comment.is_rejected %}
<i class="fa fa-times-circle text-danger"></i>
{% endif %}
{{ comment.get_status_display }}
{% if comment.is_unvetted %}
<br>
<a href="{% url 'comments:vet_submitted_comment' comment.id %}">Vet this Comment here</a>
{% elif comment.is_vetted %}
<br>
<a href="{{ comment.get_absolute_url }}">View full Comment here</a>
{% endif %}
</td>
<td><em>{{ comment.comment_text|truncatewords:6 }}</em></td>
<td>{% if comment.is_author_reply %}Author Reply{% else %}Comment{% endif %}</td>
<td>{{ comment.date_submitted }}</td>
</tr>
{% empty %}
<tr>
<td class="text-center py-3" colspan="5">There are no Comments yet.</td>
</tr>
{% endfor %}
</tbody>
</table>
<table class="table bg-light table-hover v-center">
<thead>
<tr>
<th>Referee</th>
<th>Status</th>
<th>Recommendation</th>
<th>Type</th>
<th>Date</th>
</tr>
</thead>
<tbody>
{% for report in submission.reports.all %}
<tr>
<td>
{{ report.author }}
{% if report.anonymous %}
<br>
<b><span class="text-danger">Author chose public anonymity</span></b>
{% endif %}
</td>
<td>
{% if report.is_vetted %}
<i class="fa fa-check-circle text-success"></i>
{% elif report.is_rejected %}
<i class="fa fa-times-circle text-danger"></i>
{% endif %}
{{ report.get_status_display }}
{% if report.is_unvetted %}
<br>
<a href="{% url 'submissions:vet_submitted_report' report.id %}">Vet this Report here</a>
{% elif report.is_vetted %}
<br>
<a href="{{ report.get_absolute_url }}">View full Report here</a>
{% endif %}
</td>
<td>{{ report.get_recommendation_display }}</td>
<td>{% if report.invited %}Invited Report{% else %}Contributed Report{% endif %}</td>
<td>{{ report.date_submitted }}</td>
</tr>
{% empty %}
<tr>
<td class="text-center py-3" colspan="5">There are no Reports yet.</td>
</tr>
{% endfor %}
</tbody>
</table>
...@@ -3,13 +3,15 @@ ...@@ -3,13 +3,15 @@
<h3 class="highlight">Editorial information</h3> <h3 class="highlight">Editorial information</h3>
<a href="javascript:;" class="btn btn-default mb-2" data-toggle="toggle" data-target="#editorialinformation">Show/hide editorial information</a> <a href="javascript:;" class="btn btn-default mb-2" data-toggle="toggle" data-target="#editorialinformation">Show/hide editorial information</a>
<div id="editorialinformation" class="mt-2"> <div id="editorialinformation" class="mt-2" style="display:none;">
<div class="mb-4"> <div class="mb-4">
<h3>Status summary:</h3> {% if submission.editor_in_charge == request.user.contributor %}
{% if submission.editor_in_charge and request.user.contributor == submission.editor_in_charge %}
<p><strong>You are the Editor-in-charge, go to the <a href="{% url 'submissions:editorial_page' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">Editorial Page</a> to take editorial actions.</strong></p> <p><strong>You are the Editor-in-charge, go to the <a href="{% url 'submissions:editorial_page' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">Editorial Page</a> to take editorial actions.</strong></p>
{% elif perms.scipost.can_oversee_refereeing and not is_author and not is_author_unchecked %}
<p><strong>You are Editorial Administrator. See <a href="{% url 'submissions:editorial_page' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">Editorial Page</a> for detailed information.</strong></p>
{% endif %} {% endif %}
<h3>Status summary:</h3>
<table class="table table-borderless"> <table class="table table-borderless">
<tr> <tr>
<td>Submission status:</td> <td>Submission status:</td>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<h3>by {{submission.author_list}}</h3> <h3>by {{submission.author_list}}</h3>
<div class="ml-2 mt-2"> <div class="ml-2 mt-2">
<h3>- Go to the <a href="{% url 'submissions:submission' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">Submissions Page</a> to view Reports and Comments</h3> <h3>- Go to the <a href="{% url 'submissions:submission' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">Submission Page</a> to view Reports and Comments</h3>
</div> </div>
<h3 class="mt-4">Submission summary</h3> <h3 class="mt-4">Submission summary</h3>
...@@ -67,14 +67,10 @@ ...@@ -67,14 +67,10 @@
</div> </div>
</div> </div>
<div class="py-2 mb-2">
<div class="card card-grey my-4"> <h2 class="highlight">Editorial Workflow</h2>
<div class="card-body"> <a href="{% url 'submissions:editorial_workflow' %}">How-to guide: summary of the editorial workflow</a>
<h2 class="card-title">Editorial Workflow</h2>
<a href="{% url 'submissions:editorial_workflow' %}">How-to guide: summary of the editorial workflow</a>
</div>
</div> </div>
<div class="row"><!-- Status --> <div class="row"><!-- Status -->
<div class="col"> <div class="col">
<h3>Editorial status:</h3> <h3>Editorial status:</h3>
...@@ -83,12 +79,19 @@ ...@@ -83,12 +79,19 @@
<td>Submission status:</td> <td>Submission status:</td>
<td><span class="label label-secondary">{{ submission.get_status_display }}</span></td> <td><span class="label label-secondary">{{ submission.get_status_display }}</span></td>
</tr> </tr>
{% if submission.eicrecommendations.active.first %} <tr>
<tr> <td>Recommendation status:</td>
<td>Recommendation status:</td> <td>
<td><span class="label label-secondary">{{ submission.eicrecommendations.active.first.get_status_display }}</span></td> {% if submission.eicrecommendations.active.first %}
</tr> <span class="label label-secondary">{{ submission.eicrecommendations.active.first.get_status_display }}</span>
{% endif %} {% else %}
<span class="label label-secondary mb-1">No Editorial Recommendation is formulated yet.</span>
{% if submission.eic_recommendation_required %}
<br><a href="{% url 'submissions:eic_recommendation' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">Formulate an Editorial Recommendation here.</a>
{% endif %}
{% endif %}
</td>
</tr>
<tr> <tr>
<td>Refereeing cycle:</td> <td>Refereeing cycle:</td>
<td>{{ submission.get_refereeing_cycle_display }}</td> <td>{{ submission.get_refereeing_cycle_display }}</td>
...@@ -183,7 +186,9 @@ ...@@ -183,7 +186,9 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<h3>Refereeing status summary:</h3> <h3>Refereeing status summary:</h3>
{% include 'partials/submissions/pool/referee_invitations_status.html' with submission=submission %} {% include 'partials/submissions/pool/referee_invitations_status.html' with submission=submission %}
<a href="#reports-summary">View Reports and Comments on this Submission</a>
</div> </div>
</div> </div>
...@@ -284,7 +289,7 @@ ...@@ -284,7 +289,7 @@
{% if submission.eicrecommendations.last %} {% if submission.eicrecommendations.last %}
<a href="{% url 'submissions:reformulate_eic_recommendation' submission.arxiv_identifier_w_vn_nr %}">Reformulate Editorial Recommendation</a> <a href="{% url 'submissions:reformulate_eic_recommendation' submission.arxiv_identifier_w_vn_nr %}">Reformulate Editorial Recommendation</a>
{% else %} {% else %}
<a href="{% url 'submissions:eic_recommendation' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">Formulate an Editorial Recommendation</a> <a href="{% url 'submissions:eic_recommendation' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">Formulate an Editorial Recommendation.</a>
{% endif %} {% endif %}
<p> <p>
If you recommend revisions, this will be communicated directly to the Authors, who will be asked to resubmit. If you recommend revisions, this will be communicated directly to the Authors, who will be asked to resubmit.
...@@ -304,7 +309,13 @@ ...@@ -304,7 +309,13 @@
{% endif %} {% endif %}
{% if full_access %} {% if full_access %}
<h2 class="mt-3">Communications</h2> <h3 class="mt-3 mb-2" id="reports-summary">Reports</h3>
{% include 'partials/submissions/pool/submission_reports_summary_table.html' with submission=submission %}
<h3 class="mt-3 mb-2">Comments</h3>
{% include 'partials/submissions/pool/submission_comments_summary_table.html' with submission=submission %}
<h3 class="mt-3">Communications</h3>
<ul> <ul>
{% if submission.editor_in_charge == request.user.contributor %} {% if submission.editor_in_charge == request.user.contributor %}
<li><a href="{% url 'submissions:communication' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr comtype='EtoA' %}">Draft and send a communication with the submitting Author</a></li> <li><a href="{% url 'submissions:communication' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr comtype='EtoA' %}">Draft and send a communication with the submitting Author</a></li>
...@@ -329,8 +340,9 @@ ...@@ -329,8 +340,9 @@
</div> </div>
</div> </div>
<h2 class="mt-3">Events</h2> <h3 class="mt-3">Events</h3>
{% include 'partials/submissions/submission_events.html' with events=submission.events.for_eic %} {% include 'partials/submissions/submission_events.html' with events=submission.events.for_eic %}
{% endif %} {% endif %}
<div class="mb-5"></div> <div class="mb-5"></div>
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<div class="col-12"> <div class="col-12">
<h3 class="highlight">Actions</h3> <h3 class="highlight">Actions</h3>
<ul> <ul>
{% if submission.is_open_for_reporting and perms.scipost.can_referee %} {% if submission.is_open_for_reporting or 1 and perms.scipost.can_referee %}
{% if not is_author and not is_author_unchecked %} {% if not is_author and not is_author_unchecked %}
<li> <li>
<h3><a href="{% url 'submissions:submit_report' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">{% if unfinished_report_for_user %}Finish your report{% else %}Contribute a Report{% endif %}</a></h3> <h3><a href="{% url 'submissions:submit_report' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">{% if unfinished_report_for_user %}Finish your report{% else %}Contribute a Report{% endif %}</a></h3>
...@@ -117,6 +117,10 @@ ...@@ -117,6 +117,10 @@
The system flagged you as a potential author of this Submission. Please <a href="{% url 'scipost:claim_authorships' %}">clarify this here</a>. You are not allowed to contributor a Report until your authorship has been verified. The system flagged you as a potential author of this Submission. Please <a href="{% url 'scipost:claim_authorships' %}">clarify this here</a>. You are not allowed to contributor a Report until your authorship has been verified.
</div> </div>
</li> </li>
{% elif is_author %}
<li>
<a href="javascript:;" disabled>Contribute a Report</a> <br><span class="text-danger">You are a verified author. Therefore, you can not submit a Report.</span>.
</li>
{% endif %} {% endif %}
{% elif unfinished_report_for_user %} {% elif unfinished_report_for_user %}
<li><i class="fa fa-exclamation"></i> You have an unfinished report for this submission. You can <a href="{% url 'submissions:submit_report' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">finish your report here</a>.</li> <li><i class="fa fa-exclamation"></i> You have an unfinished report for this submission. You can <a href="{% url 'submissions:submit_report' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">finish your report here</a>.</li>
...@@ -130,7 +134,9 @@ ...@@ -130,7 +134,9 @@
{% else %} {% else %}
<li>Commenting on this Submission is closed.</li> <li>Commenting on this Submission is closed.</li>
{% endif %} {% endif %}
{% if submission.editor_in_charge == request.user.contributor %}
<li><a href="{% url 'submissions:editorial_page' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}">Go to the Editorial Page</a></li>
{% endif %}
{% if perms.scipost.can_manage_reports %} {% if perms.scipost.can_manage_reports %}
<li> <li>
<a href="{% url 'submissions:treated_submission_pdf_compile' submission.arxiv_identifier_w_vn_nr %}">Update the Refereeing Package pdf</a> <a href="{% url 'submissions:treated_submission_pdf_compile' submission.arxiv_identifier_w_vn_nr %}">Update the Refereeing Package pdf</a>
......
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