diff --git a/scipost/templates/scipost/EdCol_by-laws.html b/scipost/templates/scipost/EdCol_by-laws.html index 585e876d46a0ef6068f864fa30372c2725df844d..e629cc9057b4235ab9304761e69e85aad4a826ad 100644 --- a/scipost/templates/scipost/EdCol_by-laws.html +++ b/scipost/templates/scipost/EdCol_by-laws.html @@ -431,8 +431,8 @@ are asked to optionally rank the paper among the following Tiers: <ul> <li>I: surpasses expectations and criteria for this Journal</li> - <li>II: meets expectations and criteria for this Journal</li> - <li>III: narrowly meets expectations and criteria for this Journal.</li> + <li>II: easily meets expectations and criteria for this Journal</li> + <li>III: meets expectations and criteria for this Journal.</li> </ul> </p> <p> diff --git a/submissions/admin.py b/submissions/admin.py index 9d05262d051f8e0b8d8bb5bd2682ac9912dc01c9..ff21886e600cd446847175e6f2b4f3b6d50d93b9 100644 --- a/submissions/admin.py +++ b/submissions/admin.py @@ -243,7 +243,8 @@ class EICRecommendationAdminForm(forms.ModelForm): class EICRecommendationAdmin(admin.ModelAdmin): search_fields = ['submission__title'] list_filter = ('status',) - list_display = (submission_short_title, 'recommendation', 'status', 'active', 'version') + list_display = (submission_short_title, 'for_journal', 'recommendation', + 'status', 'active', 'version') form = EICRecommendationAdminForm diff --git a/submissions/constants.py b/submissions/constants.py index 21c3d7245490c5e017dccdb8ec85f0a637c912d9..de2edbe3e40764c8d2cd417c5891794b03d0128d 100644 --- a/submissions/constants.py +++ b/submissions/constants.py @@ -127,9 +127,9 @@ REPORT_MINOR_REV, REPORT_MAJOR_REV = -1, -2 REPORT_REJECT = -3 REPORT_REC = ( (None, '-'), - (REPORT_PUBLISH_1, 'Publish as Tier I (top 10% of papers in this journal, qualifies as Select)'), - (REPORT_PUBLISH_2, 'Publish as Tier II (top 50% of papers in this journal)'), - (REPORT_PUBLISH_3, 'Publish as Tier III (meets the criteria of this journal)'), + (REPORT_PUBLISH_1, 'Publish (surpasses expectations and criteria for this Journal; among top 10%)'), + (REPORT_PUBLISH_2, 'Publish (easily meets expectations and criteria for this Journal; among top 50%)'), + (REPORT_PUBLISH_3, 'Publish (meets expectations and criteria for this Journal)'), (REPORT_MINOR_REV, 'Ask for minor revision'), (REPORT_MAJOR_REV, 'Ask for major revision'), (REPORT_REJECT, 'Reject') diff --git a/submissions/forms.py b/submissions/forms.py index 78f638d72dbd6c00923ab27c7528e39262e9b052..349145ee2af95f463c925197484ccc3bb8b9dca6 100644 --- a/submissions/forms.py +++ b/submissions/forms.py @@ -1206,6 +1206,7 @@ class EICRecommendationForm(forms.ModelForm): class Meta: model = EICRecommendation fields = [ + 'for_journal', 'recommendation', 'remarks_for_authors', 'requested_changes', @@ -1240,6 +1241,7 @@ class EICRecommendationForm(forms.ModelForm): latest_recommendation = self.earlier_recommendations.first() if latest_recommendation: kwargs['initial'] = { + 'for_journal': latest_recommendation.for_journal, 'recommendation': latest_recommendation.recommendation, 'remarks_for_authors': latest_recommendation.remarks_for_authors, 'requested_changes': latest_recommendation.requested_changes, @@ -1248,6 +1250,8 @@ class EICRecommendationForm(forms.ModelForm): } super().__init__(*args, **kwargs) + self.fields['for_journal'].queryset = Journal.objects.filter( + Q(discipline=self.submission.discipline) | Q(name='SciPost Selections')) self.load_assignment() def save(self): diff --git a/submissions/migrations/0067_auto_20191014_2104.py b/submissions/migrations/0067_auto_20191014_2104.py new file mode 100644 index 0000000000000000000000000000000000000000..d4c25e92c593720f07cf0e3ad1a878ea49900f20 --- /dev/null +++ b/submissions/migrations/0067_auto_20191014_2104.py @@ -0,0 +1,30 @@ +# Generated by Django 2.1.8 on 2019-10-14 19:04 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('journals', '0084_journal_minimal_nr_of_reports'), + ('submissions', '0066_auto_20191005_1142'), + ] + + operations = [ + migrations.AddField( + model_name='eicrecommendation', + name='for_journal', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='journals.Journal'), + ), + migrations.AlterField( + model_name='eicrecommendation', + name='recommendation', + field=models.SmallIntegerField(choices=[(None, '-'), (1, 'Surpasses expectations and criteria for this Journal (among top 10%)'), (2, 'Easily meets expectations and criteria for this Journal (among top 50%)'), (3, 'Meets expectations and criteria for this Journal'), (-1, 'Ask for minor revision'), (-2, 'Ask for major revision'), (-3, 'Reject')]), + ), + migrations.AlterField( + model_name='report', + name='recommendation', + field=models.SmallIntegerField(blank=True, choices=[(None, '-'), (1, 'Surpasses expectations and criteria for this Journal (among top 10%)'), (2, 'Easily meets expectations and criteria for this Journal (among top 50%)'), (3, 'Meets expectations and criteria for this Journal'), (-1, 'Ask for minor revision'), (-2, 'Ask for major revision'), (-3, 'Reject')], null=True), + ), + ] diff --git a/submissions/migrations/0068_populate_EICRec_for_journal.py b/submissions/migrations/0068_populate_EICRec_for_journal.py new file mode 100644 index 0000000000000000000000000000000000000000..3f370c007439d443239a6fc4d5c39e778bf657af --- /dev/null +++ b/submissions/migrations/0068_populate_EICRec_for_journal.py @@ -0,0 +1,23 @@ +# Generated by Django 2.1.8 on 2019-10-14 19:05 + +from django.db import migrations + + +def populate_for_journal(apps, schema_editor): + EICRecommendation = apps.get_model('submissions', 'EICRecommendation') + + for eicrec in EICRecommendation.objects.all(): + eicrec.for_journal = eicrec.submission.submitted_to + eicrec.save() + + +class Migration(migrations.Migration): + + dependencies = [ + ('submissions', '0067_auto_20191014_2104'), + ] + + operations = [ + migrations.RunPython(populate_for_journal, + reverse_code=migrations.RunPython.noop), + ] diff --git a/submissions/migrations/0069_auto_20191014_2201.py b/submissions/migrations/0069_auto_20191014_2201.py new file mode 100644 index 0000000000000000000000000000000000000000..82974683321e02b12a88d1392874db2d76d901c0 --- /dev/null +++ b/submissions/migrations/0069_auto_20191014_2201.py @@ -0,0 +1,23 @@ +# Generated by Django 2.1.8 on 2019-10-14 20:01 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('submissions', '0068_populate_EICRec_for_journal'), + ] + + operations = [ + migrations.AlterField( + model_name='eicrecommendation', + name='recommendation', + field=models.SmallIntegerField(choices=[(None, '-'), (1, 'Publish (surpasses expectations and criteria for this Journal; among top 10%)'), (2, 'Publish (easily meets expectations and criteria for this Journal; among top 50%)'), (3, 'Publish (meets expectations and criteria for this Journal)'), (-1, 'Ask for minor revision'), (-2, 'Ask for major revision'), (-3, 'Reject')]), + ), + migrations.AlterField( + model_name='report', + name='recommendation', + field=models.SmallIntegerField(blank=True, choices=[(None, '-'), (1, 'Publish (surpasses expectations and criteria for this Journal; among top 10%)'), (2, 'Publish (easily meets expectations and criteria for this Journal; among top 50%)'), (3, 'Publish (meets expectations and criteria for this Journal)'), (-1, 'Ask for minor revision'), (-2, 'Ask for major revision'), (-3, 'Reject')], null=True), + ), + ] diff --git a/submissions/models.py b/submissions/models.py index db9548133a54d78facbb9d1fcc69870f7886a503..a91173438f865edf704bbe4205e0b0834ebc0f9b 100644 --- a/submissions/models.py +++ b/submissions/models.py @@ -940,6 +940,8 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model): remarks_for_editorial_college = models.TextField(blank=True, verbose_name='optional remarks for the' ' Editorial College') + for_journal = models.ForeignKey('journals.Journal', blank=True, null=True, + on_delete=models.SET_NULL) recommendation = models.SmallIntegerField(choices=REPORT_REC) status = models.CharField(max_length=32, choices=EIC_REC_STATUSES, default=VOTING_IN_PREP) version = models.SmallIntegerField(default=1) diff --git a/submissions/templates/partials/submissions/recommendation_author_content.html b/submissions/templates/partials/submissions/recommendation_author_content.html index 5d92b0b41df4d47a4bbefec1394d1209fb315dd5..62d00929d8b1231ec9537751b750cfbc82351ee0 100644 --- a/submissions/templates/partials/submissions/recommendation_author_content.html +++ b/submissions/templates/partials/submissions/recommendation_author_content.html @@ -3,7 +3,7 @@ {% if recommendation.is_deprecated %}<h4 class="mb-0"><i class="fa fa-exclamation-circle text-danger"></i> Deprecated</h4>{% endif %} <h2 class="my-2">Editorial Recommendation</h2> {% block recommendation_header %} - <h4 class="text-muted mb-2">Date {{recommendation.date_submitted}}</h4> + <h4 class="text-muted mb-2">Date {{ recommendation.date_submitted }}</h4> {% endblock %} <br> @@ -12,6 +12,10 @@ <td class="pr-2">Version:</td> <td>{{ recommendation.version }}</td> </tr> + <tr> + <td class="pr-2">For Journal:</td> + <td>{{ recommendation.for_journal }}</td> + </tr> <tr> <td class="pr-2">Recommendation:</td> <td>{{ recommendation.get_recommendation_display }}</td> @@ -23,7 +27,7 @@ </table> <h3 class="pb-0">Remarks for authors</h3> - <p class="pl-md-3">{{recommendation.remarks_for_authors|default:'-'}}</p> + <p class="pl-md-3">{{ recommendation.remarks_for_authors|default:'-' }}</p> <h3 class="pb-0">Requested changes</h3> <p class="pl-md-3">{{recommendation.requested_changes|default:'-'}}</p> @@ -31,7 +35,7 @@ {% block recommendation_before_recommendation %}{% endblock %} <h3 class="pb-0">Recommendation</h3> - <p class="pl-md-3 mb-0">{{recommendation.get_recommendation_display}}</p> + <p class="pl-md-3 mb-0"><em>For Journal {{ recommendation.for_journal }}:</em> <strong>{{ recommendation.get_recommendation_display }}</strong></p> </div> {% if not recommendation.active %} diff --git a/submissions/templates/partials/submissions/recommendation_fellow_content.html b/submissions/templates/partials/submissions/recommendation_fellow_content.html index 404a67508eed5ceb7dc306edf960b06aa17d587f..da6e22a2f052d9fec7ccaa41e398fe120c0f2f60 100644 --- a/submissions/templates/partials/submissions/recommendation_fellow_content.html +++ b/submissions/templates/partials/submissions/recommendation_fellow_content.html @@ -1,12 +1,12 @@ {% extends 'partials/submissions/recommendation_author_content.html' %} {% block recommendation_header %} - <h4 class="text-muted mb-2">By {{recommendation.submission.editor_in_charge.get_title_display}} {{recommendation.submission.editor_in_charge.user.first_name}} {{recommendation.submission.editor_in_charge.user.last_name}}, formulated on {{recommendation.date_submitted}}</h4> + <h4 class="text-muted mb-2">By {{ recommendation.submission.editor_in_charge.get_title_display }} {{ recommendation.submission.editor_in_charge.user.first_name }} {{ recommendation.submission.editor_in_charge.user.last_name }}, formulated on {{ recommendation.date_submitted }}</h4> {% endblock %} {% block recommendation_before_recommendation %} <h3 class="pb-0">Remarks for Editorial College</h3> - <p class="pl-md-3">{{recommendation.remarks_for_editorial_college|default:'-'}}</p> + <p class="pl-md-3">{{ recommendation.remarks_for_editorial_college|default:'-' }}</p> {% endblock %} {% block recommendation_footer %}