diff --git a/scipost_django/submissions/models/recommendation.py b/scipost_django/submissions/models/recommendation.py index e3bec94a0f2b2744ece6772a33db26b1f78e9226..e94b4e71a1e8c4ce7a4b312254f7e248fa96177d 100644 --- a/scipost_django/submissions/models/recommendation.py +++ b/scipost_django/submissions/models/recommendation.py @@ -155,11 +155,19 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model): def get_full_status_short_display(self): """Return `recommendation` and `status` field display in short form.""" - eicrec_short = dict(EIC_REC_CHOICES_SHORT).get(self.recommendation) + eicrec_short = self.get_recommendation_short_display() journal_name = self.for_journal.name_abbrev or "" - status_short = dict(EIC_REC_STATUSES_SHORT).get(self.status) + status_short = self.get_status_short_display() return f"{eicrec_short} - {journal_name} ({status_short})" + def get_status_short_display(self): + """Return `status` field display in short form.""" + return dict(EIC_REC_STATUSES_SHORT).get(self.status) + + def get_recommendation_short_display(self): + """Return `recommendation` field display in short form.""" + return dict(EIC_REC_CHOICES_SHORT).get(self.recommendation) + class AlternativeRecommendation(models.Model): """Alternative recommendation from voting Fellow who disagrees with EICRec.""" diff --git a/scipost_django/submissions/templates/submissions/pool/_submission_details_summary_contents.html b/scipost_django/submissions/templates/submissions/pool/_submission_details_summary_contents.html index 8d9acb81b4a4dea6ddb9eefea5d69ff7baf59642..fd169b783228ad3020d4af29c68f9807b524dbac 100644 --- a/scipost_django/submissions/templates/submissions/pool/_submission_details_summary_contents.html +++ b/scipost_django/submissions/templates/submissions/pool/_submission_details_summary_contents.html @@ -60,7 +60,10 @@ <br> <small class="text-muted">EIC Recommendation & Status</small> <br> - {{ recommendation.get_full_status_short_display }} + {{ recommendation.get_recommendation_short_display }} + - {{ recommendation.for_journal.name_abbrev }} + <br> + {{ recommendation.get_status_short_display }} <br> <small class="text-muted">{{ recommendation.eligible_to_vote.count }} voting: {{ recommendation.voted_for.count }} agreed, {{ recommendation.voted_against.count }} disagreed, {{ recommendation.voted_abstain.count }} abstained</small> {% endif %}