diff --git a/comments/forms.py b/comments/forms.py index 7b17cd841fa307ab782ca98c71d70e0e5a3a317f..98a1ddf85a7f11b9eeb92ca0afd7077fa895de9e 100644 --- a/comments/forms.py +++ b/comments/forms.py @@ -18,6 +18,7 @@ COMMENT_REFUSAL_CHOICES = ( (-2, 'incorrect'), (-3, 'not useful'), ) +comment_refusal_dict = dict(COMMENT_REFUSAL_CHOICES) AUTHOR_REPLY_ACTION_CHOICES = ( # (0, 'modify'), diff --git a/comments/views.py b/comments/views.py index 1dd6e5b89e7d1c0de8fafa924ccdb54822697693..9da2105f8b09339b967ea9ba60f1b04829ab0556 100644 --- a/comments/views.py +++ b/comments/views.py @@ -60,7 +60,7 @@ def vet_submitted_comment_ack(request, comment_id): email_text += comment.commentary.pub_title + ' by ' + comment.commentary.author_list elif comment.submission is not None: email_text += comment.submission.title + ' by ' + comment.submission.author_list - email_text += ', has been rejected for the following reason:' + form.cleaned_data['refusal_reason'] + '.\n\nThank you for your contribution, \nThe SciPost Team.' + email_text += ', has been rejected for the following reason:' + comment_refusal_dict[form.cleaned_data['refusal_reason']] + '.\n\nThank you for your contribution, \nThe SciPost Team.' if form.cleaned_data['email_response_field']: email_text += '\n\nFurther explanations: ' + form.cleaned_data['email_response_field'] emailmessage = EmailMessage('SciPost Comment rejected', email_text, 'comments@scipost.org', [comment.author.user.email, 'comments@scipost.org'], reply_to=['comments@scipost.org']) diff --git a/scipost/templates/scipost/vet_registration_requests.html b/scipost/templates/scipost/vet_registration_requests.html index f9d44dbd4fd703658eb0191656e588bd15ecea51..0e93596b5e0e35db3dad0e237f5c49931db7dde1 100644 --- a/scipost/templates/scipost/vet_registration_requests.html +++ b/scipost/templates/scipost/vet_registration_requests.html @@ -58,18 +58,11 @@ $( document ).ready(function() { {% for contributor_to_vet in contributors_to_vet %} <br> <hr> - <div class="row"> - <div class="col-8"> - <table> - <tr><td>Title:</td><td>{{ contributor_to_vet.title }}</td></tr> - <tr><td>First name:</td><td>{{ contributor_to_vet.user.first_name }}</td></tr> - <tr><td>Last name:</td><td>{{ contributor_to_vet.user.last_name }}</td></tr> - <tr><td>email:</td><td>{{ contributor_to_vet.user.email }}</td></tr> - <tr><td>user name:</td><td>{{ contributor_to_vet.user.username }}</td></tr> - <tr><td>orcid_id:</td><td>{{ contributor_to_vet.orcid_id }}</td></tr> - </table> + <div class="flex-container"> + <div class="flex-whitebox"> + {{ contributor_to_vet.as_table|safe }} </div> - <div class="col-4"> + <div class="flex-whitebox"> <form action="{% url 'scipost:vet_registration_request_ack' contributor_id=contributor_to_vet.id %}" method="post"> {% csrf_token %} {{ form.as_p }} diff --git a/submissions/models.py b/submissions/models.py index cd5ea839805ad64f6d2ae680352f0b18dd5c099a..fb1ca67465bee431766bc47c916fef5a58118f00 100644 --- a/submissions/models.py +++ b/submissions/models.py @@ -14,12 +14,13 @@ from journals.models import * ############### SUBMISSION_STATUS = ( - (0, 'unassigned'), - (1, 'editor in charge assigned'), - (2, 'under review'), - (3, 'reviewed, peer checking period'), - (4, 'reviewed, peer checked, editorial decision pending'), - (5, 'editorial decision'), + ('unassigned', 'unassigned'), + ('forwarded', 'forwarded to a specialty editor'), + ('SEICassigned', 'specialty editor-in-charge assigned'), + ('under_review', 'under review'), + ('review_completed', 'review period closed, editorial recommendation pending'), + ('SEIC_has_recommended', 'specialty editor-in-charge has provided recommendation'), + ('decided', 'journal editor-in-chief has fixed decision'), ) submission_status_dict = dict(SUBMISSION_STATUS) @@ -31,7 +32,7 @@ class Submission(models.Model): discipline = models.CharField(max_length=20, choices=SCIPOST_DISCIPLINES, default='physics') domain = models.CharField(max_length=3, choices=SCIPOST_JOURNALS_DOMAINS) specialization = models.CharField(max_length=1, choices=SCIPOST_JOURNALS_SPECIALIZATIONS) - status = models.SmallIntegerField(choices=SUBMISSION_STATUS) # set by Editors + status = models.CharField(max_length=30, choices=SUBMISSION_STATUS) # set by Editors open_for_reporting = models.BooleanField(default=True) open_for_commenting = models.BooleanField(default=True) title = models.CharField(max_length=300)