SciPost Code Repository

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

Merge branch 'improvements' into development

parents c5010880 bf55024d
No related branches found
No related tags found
No related merge requests found
......@@ -183,7 +183,7 @@ class ReportAdminForm(forms.ModelForm):
class ReportAdmin(admin.ModelAdmin):
search_fields = ['author__user__last_name', 'submission']
search_fields = ['author__user__last_name', 'submission__title']
list_display = ('author', 'status', 'doi_label', submission_short_title, 'date_submitted', )
list_display_links = ('author',)
date_hierarchy = 'date_submitted'
......
......@@ -209,10 +209,10 @@ REPORT_STATUSES = (
)
REPORT_NORMAL = 'report_normal'
REPORT_POST_PUBLICATION = 'report_post_pub'
REPORT_POST_EDREC = 'report_post_edrec'
REPORT_TYPES = (
(REPORT_NORMAL, 'Normal Report'),
(REPORT_POST_PUBLICATION, 'Post-publication Report'),
(REPORT_POST_EDREC, 'Post-Editorial Recommendation Report'),
)
POST_PUBLICATION_STATUSES = [
......
......@@ -11,7 +11,7 @@ from .constants import ASSIGNMENT_BOOL, ASSIGNMENT_REFUSAL_REASONS, STATUS_RESUB
STATUS_REJECTED, STATUS_REJECTED_VISIBLE, STATUS_RESUBMISSION_INCOMING,\
STATUS_DRAFT, STATUS_UNVETTED, REPORT_ACTION_ACCEPT, REPORT_ACTION_REFUSE,\
STATUS_VETTED, EXPLICIT_REGEX_MANUSCRIPT_CONSTRAINTS, SUBMISSION_STATUS,\
POST_PUBLICATION_STATUSES, REPORT_POST_PUBLICATION, REPORT_NORMAL
POST_PUBLICATION_STATUSES, REPORT_POST_EDREC, REPORT_NORMAL
from . import exceptions, helpers
from .models import Submission, RefereeInvitation, Report, EICRecommendation, EditorialAssignment,\
iThenticateReport, EditorialCommunication
......@@ -584,7 +584,7 @@ class ReportForm(forms.ModelForm):
self.fields[field].label += ' *'
if self.submission.status in POST_PUBLICATION_STATUSES:
self.report_type = REPORT_POST_PUBLICATION
self.report_type = REPORT_POST_EDREC
def save(self):
"""
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-01-24 14:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('submissions', '0006_eicrecommendation_active'),
]
operations = [
migrations.AlterField(
model_name='report',
name='report_type',
field=models.CharField(choices=[('report_normal', 'Normal Report'), ('report_post_edrec', 'Post-Editorial Recommendation Report')], default='report_normal', max_length=32),
),
]
......@@ -393,7 +393,7 @@ class Report(SubmissionRelatedObjectMixin, models.Model):
to explicitly implement the perticular differences in for example the form used.
"""
status = models.CharField(max_length=16, choices=REPORT_STATUSES, default=STATUS_UNVETTED)
report_type = models.CharField(max_length=16, choices=REPORT_TYPES, default=REPORT_NORMAL)
report_type = models.CharField(max_length=32, choices=REPORT_TYPES, default=REPORT_NORMAL)
submission = models.ForeignKey('submissions.Submission', related_name='reports',
on_delete=models.CASCADE)
report_nr = models.PositiveSmallIntegerField(default=0,
......
......@@ -10,8 +10,8 @@
<h3>
{% if report.anonymous %}(chose public anonymity) {% endif %}<a href="{{report.author.get_absolute_url}}">{{ report.author.user.first_name }} {{ report.author.user.last_name }}</a>
on {{ report.date_submitted|date:'Y-n-j' }}
{% if report.report_type == 'report_post_pub' %}
<small><label class="label label-outline-primary ml-2">Post-publication Report</label></small>
{% if report.report_type == 'report_post_edrec' %}
<small><label class="label label-outline-primary ml-2">Post-Editorial Recommendation Report</label> <i class="fa fa-question-circle-o text-primary" data-toggle="tooltip" data-placement="auto" data-html="true" title="Post-Editorial Reports are submitted after the Editorial Recommendation has been formulated.<br>Hence, they have not been part of the College's decision to Publish the Submission." aria-hidden="true"></i></small>
{% endif %}
</h3>
{% if report.doi_string or report.pdf_report %}
......@@ -67,8 +67,8 @@
<h3>
{% if report.anonymous %}Anonymous Report {{report.report_nr}}{% else %}<a href="{{report.author.get_absolute_url}}">{{ report.author.user.first_name }} {{ report.author.user.last_name }}</a>{% endif %}
on {{ report.date_submitted|date:'Y-n-j' }}
{% if report.report_type == 'report_post_pub' %}
<small><label class="label label-outline-primary ml-2">Post-publication Report</label></small>
{% if report.report_type == 'report_post_edrec' %}
<small><label class="label label-outline-primary ml-2">Post-Editorial Recommendation Report</label> <i class="fa fa-question-circle-o text-primary" data-toggle="tooltip" data-placement="auto" data-html="true" title="Post-Editorial Reports are submitted after the Editorial Recommendation has been formulated.<br>Hence, they have not been part of the College's decision to Publish the Submission." aria-hidden="true"></i></small>
{% endif %}
</h3>
{% if report.doi_string or report.pdf_report %}
......
......@@ -91,9 +91,9 @@
{% endif %}
</div>
</div>
{% if form.report_type == 'report_post_pub' %}
{% if form.report_type == 'report_post_edrec' %}
<div class="card border-warning my-4">
<div class="card-body">The Editorial Recommendation for this Submission has already been formulated. Therefore, your report will be flagged as <label class="label label-warning">Post-publication Report</label>.
<div class="card-body">The Editorial Recommendation for this Submission has already been formulated. Therefore, your report will be labelled as <label class="label label-warning">Post-Editorial Recommendation Report</label>.
</div>
</div>
{% endif %}
......@@ -103,9 +103,9 @@
<p>Any fields with an asterisk (*) are required.</p>
<input class="btn btn-primary" type="submit" name="save_submit" value="Submit your report"/>
<input class="btn btn-secondary ml-2" type="submit" name="save_draft" value="Save your report as draft"/>
{% if form.report_type == 'report_post_pub' %}
{% if form.report_type == 'report_post_edrec' %}
<div class="card border-warning mt-4">
<div class="card-body">The Editorial Recommendation for this Submission has already been formulated. Therefore, your report will be flagged as <label class="label label-warning">Post-publication Report</label>.
<div class="card-body">The Editorial Recommendation for this Submission has already been formulated. Therefore, your report will be labelled as <label class="label label-warning">Post-Editorial Recommendation Report</label>.
</div>
</div>
{% endif %}
......
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