SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 95ec0d63 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Add direct link to prepare rec for voting

parent 0bfb7b85
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,10 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model):
return self.submission.eicrecommendations.last() == self
return self.status != DECISION_FIXED
@property
def voting_in_preparation(self):
return self.status == VOTING_IN_PREP
def get_other_versions(self):
"""Return other versions of EICRecommendations for this Submission."""
return self.submission.eicrecommendations.exclude(id=self.id)
......
......@@ -103,7 +103,12 @@
<li>See Editorial Recommendations:</li>
<ul class="ps-3">
{% for rec in submission.eicrecommendations.all %}
<li><a href="{% url 'submissions:eic_recommendation_detail' identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr %}">{{ rec.get_recommendation_display }}</a></li>
<li>
<a href="{% url 'submissions:eic_recommendation_detail' identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr %}">{{ rec.get_recommendation_display }}</a>
{% if rec.voting_in_preparation %}
<a class="btn btn-sm btn-primary ms-4 px-1 py-0" role="button" href="{% url 'submissions:prepare_for_voting' rec_id=rec.id %}">Prepare for voting</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% 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