SciPost Code Repository

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

Add potfel voting to fellows tasklist email

parent fb258455
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ from django.core.management import BaseCommand
from ...models import EICRecommendation
from colleges.models import PotentialFellowship
from mails.utils import DirectMailUtil
from scipost.models import Contributor
......@@ -20,6 +21,7 @@ class Command(BaseCommand):
count = 0
for fellow in fellows:
nr_potfels_to_vote_on = PotentialFellowship.objects.to_vote_on(fellow).count()
recs_to_vote_on = EICRecommendation.objects.user_must_vote_on(fellow.user)
assignments_ongoing = fellow.editorial_assignments.ongoing()
assignments_to_consider = fellow.editorial_assignments.invited()
......@@ -28,6 +30,7 @@ class Command(BaseCommand):
mail_sender = DirectMailUtil(
mail_code='fellows/email_fellow_tasklist',
fellow=fellow,
nr_potfels_to_vote_on=nr_potfels_to_vote_on,
recs_to_vote_on=recs_to_vote_on,
assignments_ongoing=assignments_ongoing,
assignments_to_consider=assignments_to_consider,
......
......@@ -2,6 +2,12 @@
<p>Please find below a summary of your current assignments, with (if applicable) pending and upcoming required actions. Many thanks in advance for your timely intervention on any point in need of attention. Your good work as an Editorial Fellow is greatly appreciated!</p>
{% if nr_potfels_to_vote_on > 0 %}
<br/>
<h3>Nominations to the Editorial College</h3>
<p>You have {{ nr_potfels_to_vote_on }} nomination{{ nr_potfels_to_vote_on|pluralize }} to vote on, please visit the <a href="{% url 'colleges:potential_fellowships' %}">Potential Fellowships</a> page to cast your vote{{ nr_potfels_to_vote_on|pluralize }}.</p>
{% endif %}
{% if recs_to_vote_on %}
<br/>
<h3>Recommendations for you to vote on</h3>
......
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