diff --git a/scipost_django/edadmin/templates/edadmin/monitor/_hx_college_fellow_activity_table.html b/scipost_django/edadmin/templates/edadmin/monitor/_hx_college_fellow_activity_table.html index a0c9ac4f387ef43866b20b29a293546c3e899ca4..6f0f007453672db85e15981c3b96c0cc1f557650 100644 --- a/scipost_django/edadmin/templates/edadmin/monitor/_hx_college_fellow_activity_table.html +++ b/scipost_django/edadmin/templates/edadmin/monitor/_hx_college_fellow_activity_table.html @@ -69,7 +69,7 @@ {{ fellowship.contributor.EIC_in_stage_in_refereeing|length }} </td> {% if fellowship.contributor.current_unavailability_periods %} - <td colspan="2"><em class="text-muted">unavailable</em></td> + <td colspan="2" class="text-center"><em class="text-muted">unavailable up to {{ fellowship.contributor.available_again_after_date }}</em></td> {% else %} <td class="text-center">{{ fellowship.nr_visible }}</td> <td class="text-center"> diff --git a/scipost_django/scipost/models.py b/scipost_django/scipost/models.py index f6d259ce51358780aca79ff8ee1c42722b2f37d5..89ee085ac2788ef352152b404f401284b33bfb7c 100644 --- a/scipost_django/scipost/models.py +++ b/scipost_django/scipost/models.py @@ -161,6 +161,12 @@ class Contributor(models.Model): """Check if Contributor is currently not marked as unavailable.""" return not self.unavailability_periods.today().exists() + @property + def available_again_after_date(self): + unav = self.unavailability_periods.today().first() + if unav: + return unav.end + @property def is_scipost_admin(self): """Check if Contributor is a SciPost Administrator."""