diff --git a/submissions/admin.py b/submissions/admin.py index c052e671885f36d0d838fd0db8be55a85ac9b34e..41ecfd38bdc3d4c0a9432d067cd531a997618f80 100644 --- a/submissions/admin.py +++ b/submissions/admin.py @@ -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' diff --git a/submissions/constants.py b/submissions/constants.py index 17c831be66310b27573f442daf071a54fd48af26..5d9c0a2b25974dfe02f6f05c7e5e0cca899004f4 100644 --- a/submissions/constants.py +++ b/submissions/constants.py @@ -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 = [ diff --git a/submissions/forms.py b/submissions/forms.py index e56597024743b012d8654081a7f7d0ffbf01c670..3b35663eb485e7b94ee30d7d0be5da41ef2be64a 100644 --- a/submissions/forms.py +++ b/submissions/forms.py @@ -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): """ diff --git a/submissions/migrations/0007_auto_20180124_1501.py b/submissions/migrations/0007_auto_20180124_1501.py new file mode 100644 index 0000000000000000000000000000000000000000..fd947ed4e358269561cfcebd81a6d8b856d7d474 --- /dev/null +++ b/submissions/migrations/0007_auto_20180124_1501.py @@ -0,0 +1,20 @@ +# -*- 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), + ), + ] diff --git a/submissions/models.py b/submissions/models.py index 804a1a32d13b8e4f3a356422eb44607dab1e9e07..d322603d05fbd16a1dd2b9e39a1f2fb2282590aa 100644 --- a/submissions/models.py +++ b/submissions/models.py @@ -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, diff --git a/submissions/templates/submissions/_single_public_report_without_comments.html b/submissions/templates/submissions/_single_public_report_without_comments.html index 1d268af9da4dcb7d805062a8c926035fcb73b890..af833812c9e19c8bba2d595264b754c305a2b92e 100644 --- a/submissions/templates/submissions/_single_public_report_without_comments.html +++ b/submissions/templates/submissions/_single_public_report_without_comments.html @@ -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 %} diff --git a/submissions/templates/submissions/submit_report.html b/submissions/templates/submissions/submit_report.html index dbfc759f8109e32c0af560aaa818a555ad83512c..274ff302e0da162931869bd42e77e541529736f6 100644 --- a/submissions/templates/submissions/submit_report.html +++ b/submissions/templates/submissions/submit_report.html @@ -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 %}