diff --git a/submissions/templates/submissions/select_referee.html b/submissions/templates/submissions/select_referee.html index d2403e4fe3cecdace6663e1941c41226d328e559..f9f5adc18aba3c24a5b5d94876d5d3b668934d9a 100644 --- a/submissions/templates/submissions/select_referee.html +++ b/submissions/templates/submissions/select_referee.html @@ -72,6 +72,9 @@ <div class="row"> <div class="col-12"> + {% if workdays_left_to_report < 15 %} + <h4 class="highlight p-1"><strong class="text-danger">Warning: there are {{ workdays_left_to_report }} days left before the refereeing deadline.</strong><br/><br/>Consider resetting the deadline at the <a href="{% url 'submissions:editorial_page' identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr %}">Editorial Page</a> before inviting a referee.</h4> + {% endif %} {% if profiles_found %} <h3>Matching people in our database:</h3> <table class="table"> diff --git a/submissions/views.py b/submissions/views.py index 0d9cfec0f8144212b5707a151ace60266416b958..e6d0ede8ebae7e6b628b590188dd2d9638ff13af 100644 --- a/submissions/views.py +++ b/submissions/views.py @@ -45,6 +45,7 @@ from .utils import SubmissionUtils from colleges.permissions import fellowship_required, fellowship_or_admin_required from comments.forms import CommentForm from common.helpers import get_new_secrets_key +from common.utils import workdays_between from invitations.constants import STATUS_SENT from invitations.models import RegistrationInvitation from journals.models import Journal @@ -898,6 +899,7 @@ def select_referee(request, identifier_w_vn_nr): context['profile_form'] = SimpleProfileForm() context.update({ 'submission': submission, + 'workdays_left_to_report': workdays_between(timezone.now(), submission.reporting_deadline), 'referee_search_form': referee_search_form, 'queryresults': queryresults, })