diff --git a/submissions/models.py b/submissions/models.py index 65896271ea5b02c93bb43f65b0508f129c934139..c7b1dee29d3527018e241d5fb7c9830fe068fa3d 100644 --- a/submissions/models.py +++ b/submissions/models.py @@ -502,9 +502,9 @@ class EICRecommendation(SubmissionRelatedObjectMixin, models.Model): # Editorial Fellows who have assessed this recommendation: eligible_to_vote = models.ManyToManyField('scipost.Contributor', blank=True, related_name='eligible_to_vote') - voted_for = models.ManyToManyField(Contributor, blank=True, related_name='voted_for') - voted_against = models.ManyToManyField(Contributor, blank=True, related_name='voted_against') - voted_abstain = models.ManyToManyField(Contributor, blank=True, related_name='voted_abstain') + voted_for = models.ManyToManyField('scipost.Contributor', blank=True, related_name='voted_for') + voted_against = models.ManyToManyField('scipost.Contributor', blank=True, related_name='voted_against') + voted_abstain = models.ManyToManyField('scipost.Contributor', blank=True, related_name='voted_abstain') voting_deadline = models.DateTimeField('date submitted', default=timezone.now) objects = EICRecommendationManager() diff --git a/submissions/templates/partials/submissions/admin/recommendation_tooltip.html b/submissions/templates/partials/submissions/admin/recommendation_tooltip.html new file mode 100644 index 0000000000000000000000000000000000000000..79e47405ebb8b2c351e301b36784232fccf40907 --- /dev/null +++ b/submissions/templates/partials/submissions/admin/recommendation_tooltip.html @@ -0,0 +1,9 @@ +<i class="fa fa-info-circle {{ classes }}" data-toggle="tooltip" data-html="true" title=" + Eligible to vote ({{ recommendation.eligible_to_vote.count }}) + <hr> + Agreed ({{ recommendation.voted_for.count }}) + <br> + Disagreed ({{ recommendation.voted_against.count }}) + <br> + Abstained ({{ recommendation.voted_abstain.count }}) +"></i> diff --git a/submissions/templates/submissions/admin/editorial_admin.html b/submissions/templates/submissions/admin/editorial_admin.html index 9aad2991fad76eab8ada8e6828a53830b0c0a0f5..b1145975f1ad1886871cdb7528980d63de965567 100644 --- a/submissions/templates/submissions/admin/editorial_admin.html +++ b/submissions/templates/submissions/admin/editorial_admin.html @@ -35,9 +35,10 @@ {% if recommendations_undergoing_voting %} <h3>Recommendations undergoing voting <i class="fa fa-exclamation-circle text-warning"></i></h3> - <ul> + <ul class="fa-ul"> {% for recommendation in recommendations_undergoing_voting %} - <li>On Editorial Recommendation: {{ recommendation }}<br> + <li>{% include 'partials/submissions/admin/recommendation_tooltip.html' with classes='fa-li' recommendation=recommendation %} + On Editorial Recommendation: {{ recommendation }}<br> <a href="{% url 'submissions:admin_recommendation' recommendation.submission.arxiv_identifier_w_vn_nr %}">See Editorial Recommendation</a> </li> {% endfor %} diff --git a/submissions/templates/submissions/admin/recommendation.html b/submissions/templates/submissions/admin/recommendation.html index fb6bb8b0e3c792abe425d611cd1b7c8ccd7e7629..a4eed96cbcd805ad7f90cddf7655bfa75873fdae 100644 --- a/submissions/templates/submissions/admin/recommendation.html +++ b/submissions/templates/submissions/admin/recommendation.html @@ -47,8 +47,8 @@ {% endfor %} </li> <li> - Disagreed: ({{ rec.voted_against.all.count }}) - {% for disagreed in rec.voted_against.all|sort_by:'user__last_name' %} + Disagreed: ({{ object.voted_against.all.count }}) + {% for disagreed in object.voted_against.all|sort_by:'user__last_name' %} {{ disagreed.user.last_name }}, {% endfor %} </li>