SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 92a3dc61 authored by George Katsikas's avatar George Katsikas :goat:
Browse files

split eic rec and status to new line

fixes #216
parent b8c83802
No related branches found
No related tags found
No related merge requests found
......@@ -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."""
......
......@@ -60,7 +60,10 @@
<br>
<small class="text-muted">EIC Recommendation &amp; 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 %}
......
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