From 2630418555ef6a220f64f9c98d1b11c6a1306706 Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Thu, 10 Jan 2019 08:37:17 +0100
Subject: [PATCH] Improve select_referee with more info

---
 submissions/templates/submissions/select_referee.html | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/submissions/templates/submissions/select_referee.html b/submissions/templates/submissions/select_referee.html
index bd87004f1..8cfa1427e 100644
--- a/submissions/templates/submissions/select_referee.html
+++ b/submissions/templates/submissions/select_referee.html
@@ -82,14 +82,18 @@
 	<th>Name</th>
 	<th>Registered<br/>Contributor?</th>
 	<th>Email<br/>known?</th>
+	<th>Accepts<br/>refereeing<br/>requests?</th>
 	<th>Action<br/><span class="text-muted"><small>(Unregistered people will also automatically receive a registration invitation)</small></span></th>
       </tr>
       {% for profile in profiles_found %}
       <tr>
 	<td>{{ profile }}</td>
 	<td>{% if profile.contributor %}<i class="fa fa-check-circle text-success"></i>{% else %}<i class="fa fa-times-circle text-danger"></i>{% endif %}</td>
-	<td>{% if profile.email %}<i class="fa fa-check-circle text-success"></i>{% else %}<i class="fa fa-times-circle text-danger"></i>{% endif %}</td>
-	<td>{% if profile.email %}Send refereeing invitation <a href="{% url 'submissions:invite_referee' identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr profile_id=profile.id auto_reminders_allowed=1 %}">with</a> or <a href="{% url 'submissions:invite_referee' identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr profile_id=profile.id auto_reminders_allowed=0 %}">without</a> auto-reminders {% include 'partials/submissions/refinv_auto_reminders_tooltip.html' %}{% else %}<span class="text-danger">Cannot send an invitation without an email</span> <i class="fa fa-arrow-right"></i> Add one:
+	<td>{% if profile.email %}<i class="fa fa-check-circle text-success"></i> <span class="small text-muted">{{ profile.email }}</span>{% else %}<i class="fa fa-times-circle text-danger"></i>{% endif %}</td>
+	<td>{% if profile.accepts_refereeing_requests %}<i class="fa fa-check-circle text-success"></i>{% else %}<i class="fa fa-times-circle text-danger"></i>{% endif %}</td>
+	<td>{% if profile.accepts_refereeing_requests %}
+	  {% if profile.email %}Send refereeing invitation <a href="{% url 'submissions:invite_referee' identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr profile_id=profile.id auto_reminders_allowed=1 %}">with</a> or <a href="{% url 'submissions:invite_referee' identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr profile_id=profile.id auto_reminders_allowed=0 %}">without</a> auto-reminders {% include 'partials/submissions/refinv_auto_reminders_tooltip.html' %}
+	  {% else %}<span class="text-danger">Cannot send an invitation without an email</span> <i class="fa fa-arrow-right"></i> Add one:
 	  <form class="form-inline" action="{% url 'profiles:add_profile_email' profile_id=profile.id %}" method="post">
             {% csrf_token %}
             {{ profile_email_form|bootstrap }}
@@ -97,6 +101,9 @@
             <input class="btn btn-outline-secondary" type="submit" value="Add">
           </form>
 	  {% endif %}
+	  {% else %}
+	  <span class="text-danger">This person does not accept refereeing requests</span>
+	  {% endif %}
 	</td>
       </tr>
       {% empty %}
-- 
GitLab