diff --git a/production/templates/production/production.html b/production/templates/production/production.html index ed1c3eed0c0112427977905fa278f17169b924d1..4c5d7dd330be40f88d76207c2f15f6917c8d04f2 100644 --- a/production/templates/production/production.html +++ b/production/templates/production/production.html @@ -8,6 +8,7 @@ {% load bootstrap %} {% load scipost_extras %} +{% load submissions_extras %} {% block content %} @@ -55,6 +56,7 @@ <thead> <tr> <th style="width: 30%;">Submission</th> + <th>Target Journal<br/>(Tier)</th> <th>Status</th> <th class="py-1"> Latest activity @@ -77,6 +79,7 @@ <br> by {{ stream.submission.author_list }} </td> + <td>{{ stream.submission.get_submitted_to_journal_display }}{% for rec in stream.submission.eicrecommendations.all %}<br/>({{ rec|Tier }}){% endfor %}</td> <td> <div class="label label-{% if stream.status == 'initiated' %}outline-danger{% else %}secondary{% endif %} label-sm">{{ stream.get_status_display }}</div> </td> diff --git a/submissions/templatetags/submissions_extras.py b/submissions/templatetags/submissions_extras.py index 15cd2988f9e5fb68dcf8a7a2cf0f3e34fcfcfe15..b8a8e4f51014572b335673b8af2d13fe2428e135 100644 --- a/submissions/templatetags/submissions_extras.py +++ b/submissions/templatetags/submissions_extras.py @@ -4,7 +4,7 @@ __license__ = "AGPL v3" from django import template -from ..constants import DECISION_FIXED +from ..constants import DECISION_FIXED, REPORT_PUBLISH_1, REPORT_PUBLISH_2, REPORT_PUBLISH_3 from ..models import Submission, EICRecommendation register = template.Library() @@ -58,3 +58,15 @@ def is_voting_fellow(submission, user): @register.filter def citation(citable): return citable.citation + + +@register.filter +def Tier(recommendation): + if recommendation.recommendation == REPORT_PUBLISH_1: + return 'Tier I' + elif recommendation.recommendation == REPORT_PUBLISH_2: + return 'Tier II' + elif recommendation.recommendation == REPORT_PUBLISH_3: + return 'Tier III' + else: + return 'unknown Tier'