From 2e510bbd9e1072f3645020cb36f754254c964264 Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Fri, 10 Nov 2017 10:48:49 +0100 Subject: [PATCH] Template update --- .../registration_invitation_renewal.html | 6 +- .../scipost/_draft_registration_tables.html | 690 +++++++++--------- .../scipost/registration_invitations.html | 6 +- 3 files changed, 359 insertions(+), 343 deletions(-) diff --git a/mails/templates/mail_templates/registration_invitation_renewal.html b/mails/templates/mail_templates/registration_invitation_renewal.html index 223cf91db..2ab987e68 100644 --- a/mails/templates/mail_templates/registration_invitation_renewal.html +++ b/mails/templates/mail_templates/registration_invitation_renewal.html @@ -10,10 +10,10 @@ <p> Dear {% if invitation.message_style == 'F' %} - {{ invitation.get_title_display }} {{ invitation.last_name }} + {{ invitation.get_title_display }} {{ invitation.last_name }}, {% else %} - {{ invitation.first_name }} - {% endif %}, + {{ invitation.first_name }}, + {% endif %} </p> {% if invitation.invitation_type == 'R' %} diff --git a/scipost/templates/scipost/_draft_registration_tables.html b/scipost/templates/scipost/_draft_registration_tables.html index 1ee9fdbcb..803c89594 100644 --- a/scipost/templates/scipost/_draft_registration_tables.html +++ b/scipost/templates/scipost/_draft_registration_tables.html @@ -1,380 +1,396 @@ <h2 class="highlight">Invitations sent (response pending)</h2> -<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#invitations_sent">view/hide +</a> -<div id="invitations_sent"> - <h3>Editorial Fellows ({{sent_reg_inv_fellows|length}})</h3> +<h3>Editorial Fellows ({{sent_reg_inv_fellows|length}})</h3> +<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_sent_reg_inv_fellows">view/hide +</a> - <table class="table" id="table_sent_reg_inv_fellows"> - <thead> +<table class="table" id="table_sent_reg_inv_fellows" style="display: none;"> + <thead> + <tr> + <th>Last name</th> + <th>First name</th> + <th>Email</th> + <th>Date sent</th> + <th>Type</th> + <th>Invited by</th> + <th></th> + </tr> + </thead> + <tbody> + {% for fellow in sent_reg_inv_fellows %} + <tr> + <td>{{ fellow.last_name }}</td> + <td>{{ fellow.first_name }}</td> + <td>{{ fellow.email }}</td> + <td>{{ fellow.date_sent }} </td> + <td>{{ fellow.get_invitation_type_display }}</td> + <td>{{ fellow.invited_by.user.first_name }} {{ fellow.invited_by.user.last_name }}</td> + <td> + {% if perms.scipost.can_invite_Fellows %} + <a href="{% url 'scipost:renew_registration_invitation' invitation_id=fellow.id %}">Renew</a> ({{ fellow.nr_reminders }}) {% if fellow.date_last_reminded %}(last: {{ fellow.date_last_reminded|date:"Y-m-d" }}){% endif %} + · + <a href="{% url 'scipost:mark_reg_inv_as_declined' invitation_id=fellow.id %}">Declined</a> + {% endif %} + </td> + + </tr> + {% empty %} <tr> - <th>Last name</th> - <th>First name</th> - <th>Email</th> - <th>Date sent</th> - <th>Type</th> - <th>Invited by</th> - <th></th> + <td colspan="7">No invitations found.</td> </tr> - </thead> - <tbody> - {% for fellow in sent_reg_inv_fellows %} - <tr> - <td>{{ fellow.last_name }}</td> - <td>{{ fellow.first_name }}</td> - <td>{{ fellow.email }}</td> - <td>{{ fellow.date_sent }} </td> - <td>{{ fellow.get_invitation_type_display }}</td> - <td>{{ fellow.invited_by.user.first_name }} {{ fellow.invited_by.user.last_name }}</td> - <td> - {% if perms.scipost.can_invite_Fellows %} - <a href="{% url 'scipost:renew_registration_invitation' invitation_id=fellow.id %}">Renew</a> ({{ fellow.nr_reminders }}) {% if fellow.date_last_reminded %}(last: {{ fellow.date_last_reminded|date:"Y-m-d" }}){% endif %} - · - <a href="{% url 'scipost:mark_reg_inv_as_declined' invitation_id=fellow.id %}">Declined</a> - {% endif %} - </td> + {% endfor %} + </tbody> +</table> - </tr> - {% empty %} - <tr> - <td colspan="7">No invitations found.</td> - </tr> - {% endfor %} - </tbody> - </table> +<h3>Normal Contributors ({{sent_reg_inv_contrib|length}})</h3> +<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_sent_reg_inv_contrib">view/hide +</a> - <h3>Normal Contributors ({{sent_reg_inv_contrib|length}})</h3> - <table class="table" id="table_sent_reg_inv_contrib"> - <thead> +<table class="table" id="table_sent_reg_inv_contrib" style="display: none;"> + <thead> + <tr> + <th>Last name</th> + <th>First name</th> + <th>Email</th> + <th>Date sent</th> + <th>Type</th> + <th>Invited by</th> + <th></th> + </tr> + </thead> + <tbody> + {% for invitation in sent_reg_inv_contrib %} + <tr> + <td>{{ invitation.last_name }}</td> + <td>{{ invitation.first_name }}</td> + <td>{{ invitation.email }}</td> + <td>{{ invitation.date_sent }} </td> + <td>{{ invitation.get_invitation_type_display }}</td> + <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> + <td> + {% if perms.scipost.can_invite_Fellows %} + <a href="{% url 'scipost:renew_registration_invitation' invitation_id=invitation.id %}">Renew</a> ({{ invitation.nr_reminders }}) {% if invitation.date_last_reminded %}(last: {{ invitation.date_last_reminded|date:"Y-m-d" }}){% endif %} + · + <a href="{% url 'scipost:mark_reg_inv_as_declined' invitation_id=invitation.id %}">Declined</a> + {% endif %} + </td> + </tr> + {% empty %} <tr> - <th>Last name</th> - <th>First name</th> - <th>Email</th> - <th>Date sent</th> - <th>Type</th> - <th>Invited by</th> - <th></th> + <td colspan="7">No invitations found.</td> </tr> - </thead> - <tbody> - {% for invitation in sent_reg_inv_contrib %} - <tr> - <td>{{ invitation.last_name }}</td> - <td>{{ invitation.first_name }}</td> - <td>{{ invitation.email }}</td> - <td>{{ invitation.date_sent }} </td> - <td>{{ invitation.get_invitation_type_display }}</td> - <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> - <td> - {% if perms.scipost.can_invite_Fellows %} - <a href="{% url 'scipost:renew_registration_invitation' invitation_id=invitation.id %}">Renew</a> ({{ invitation.nr_reminders }}) {% if invitation.date_last_reminded %}(last: {{ invitation.date_last_reminded|date:"Y-m-d" }}){% endif %} - · - <a href="{% url 'scipost:mark_reg_inv_as_declined' invitation_id=invitation.id %}">Declined</a> - {% endif %} - </td> - </tr> - {% empty %} - <tr> - <td colspan="7">No invitations found.</td> - </tr> - {% endfor %} - </tbody> - </table> + {% endfor %} + </tbody> +</table> + +<h3>Referees ({{sent_reg_inv_ref|length}})</h3> +<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_sent_reg_inv_ref">view/hide +</a> - <h3>Referees ({{sent_reg_inv_ref|length}})</h3> - <table class="table" id="table_sent_reg_inv_ref"> - <thead> +<table class="table" id="table_sent_reg_inv_ref" style="display: none;"> + <thead> + <tr> + <th>Last name</th> + <th>First name</th> + <th>Email</th> + <th>Date sent</th> + <th>Type</th> + <th>Invited by</th> + <th></th> + </tr> + </thead> + <tbody> + {% for invitation in sent_reg_inv_ref %} + <tr> + <td>{{ invitation.last_name }}</td> + <td>{{ invitation.first_name }}</td> + <td>{{ invitation.email }}</td> + <td>{{ invitation.date_sent }} </td> + <td>{{ invitation.get_invitation_type_display }}</td> + <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> + <td> + {% if perms.scipost.can_invite_Fellows %} + <a href="{% url 'scipost:renew_registration_invitation' invitation_id=invitation.id %}">Renew</a> ({{ invitation.nr_reminders }}) {% if invitation.date_last_reminded %}(last: {{ invitation.date_last_reminded|date:"Y-m-d" }}){% endif %} + {% endif %} + </td> + </tr> + {% empty %} <tr> - <th>Last name</th> - <th>First name</th> - <th>Email</th> - <th>Date sent</th> - <th>Type</th> - <th>Invited by</th> - <th></th> + <td colspan="7">No invitations found.</td> </tr> - </thead> - <tbody> - {% for invitation in sent_reg_inv_ref %} - <tr> - <td>{{ invitation.last_name }}</td> - <td>{{ invitation.first_name }}</td> - <td>{{ invitation.email }}</td> - <td>{{ invitation.date_sent }} </td> - <td>{{ invitation.get_invitation_type_display }}</td> - <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> - <td> - {% if perms.scipost.can_invite_Fellows %} - <a href="{% url 'scipost:renew_registration_invitation' invitation_id=invitation.id %}">Renew</a> ({{ invitation.nr_reminders }}) {% if invitation.date_last_reminded %}(last: {{ invitation.date_last_reminded|date:"Y-m-d" }}){% endif %} - {% endif %} - </td> - </tr> - {% empty %} - <tr> - <td colspan="7">No invitations found.</td> - </tr> - {% endfor %} - </tbody> - </table> + {% endfor %} + </tbody> +</table> - <h3>Cited in sub ({{sent_reg_inv_cited_sub|length}})</h3> - <table class="table" id="table_sent_reg_inv_cited_sub"> - <thead> +<h3>Cited in sub ({{sent_reg_inv_cited_sub|length}})</h3> +<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_sent_reg_inv_cited_sub">view/hide +</a> + +<table class="table" id="table_sent_reg_inv_cited_sub" style="display: none;"> + <thead> + <tr> + <th>Last name</th> + <th>First name</th> + <th>Email</th> + <th>Date sent</th> + <th>Type</th> + <th>Invited by</th> + <th></th> + </tr> + </thead> + <tbody> + {% for invitation in sent_reg_inv_cited_sub %} + <tr> + <td>{{ invitation.last_name }}</td> + <td>{{ invitation.first_name }}</td> + <td>{{ invitation.email }}</td> + <td>{{ invitation.date_sent }} </td> + <td>{{ invitation.get_invitation_type_display }}</td> + <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> + <td> + {% if perms.scipost.can_invite_Fellows %} + <a href="{% url 'scipost:renew_registration_invitation' invitation_id=invitation.id %}">Renew</a> ({{ invitation.nr_reminders }}) {% if invitation.date_last_reminded %}(last: {{ invitation.date_last_reminded|date:"Y-m-d" }}){% endif %} + {% endif %} + </td> + </tr> + {% empty %} <tr> - <th>Last name</th> - <th>First name</th> - <th>Email</th> - <th>Date sent</th> - <th>Type</th> - <th>Invited by</th> - <th></th> + <td colspan="7">No invitations found.</td> </tr> - </thead> - <tbody> - {% for invitation in sent_reg_inv_cited_sub %} - <tr> - <td>{{ invitation.last_name }}</td> - <td>{{ invitation.first_name }}</td> - <td>{{ invitation.email }}</td> - <td>{{ invitation.date_sent }} </td> - <td>{{ invitation.get_invitation_type_display }}</td> - <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> - <td> - {% if perms.scipost.can_invite_Fellows %} - <a href="{% url 'scipost:renew_registration_invitation' invitation_id=invitation.id %}">Renew</a> ({{ invitation.nr_reminders }}) {% if invitation.date_last_reminded %}(last: {{ invitation.date_last_reminded|date:"Y-m-d" }}){% endif %} - {% endif %} - </td> - </tr> - {% empty %} - <tr> - <td colspan="7">No invitations found.</td> - </tr> - {% endfor %} - </tbody> - </table> + {% endfor %} + </tbody> +</table> + +<h3>Cited in pub ({{sent_reg_inv_cited_pub|length}})</h3> +<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_sent_reg_inv_cited_pub">view/hide +</a> - <h3>Cited in pub ({{sent_reg_inv_cited_pub|length}})</h3> - <table class="table" id="table_sent_reg_inv_cited_pub"> - <thead> +<table class="table" id="table_sent_reg_inv_cited_pub" style="display: none;"> + <thead> + <tr> + <th>Last name</th> + <th>First name</th> + <th>Email</th> + <th>Date sent</th> + <th>Type</th> + <th>Invited by</th> + <th></th> + </tr> + </thead> + <tbody> + {% for invitation in sent_reg_inv_cited_pub %} + <tr> + <td>{{ invitation.last_name }}</td> + <td>{{ invitation.first_name }}</td> + <td>{{ invitation.email }}</td> + <td>{{ invitation.date_sent }} </td> + <td>{{ invitation.get_invitation_type_display }}</td> + <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> + <td> + {% if perms.scipost.can_invite_Fellows %} + <a href="{% url 'scipost:renew_registration_invitation' invitation_id=invitation.id %}">Renew</a> ({{ invitation.nr_reminders }}) {% if invitation.date_last_reminded %}(last: {{ invitation.date_last_reminded|date:"Y-m-d" }}){% endif %} + {% endif %} + </td> + </tr> + {% empty %} <tr> - <th>Last name</th> - <th>First name</th> - <th>Email</th> - <th>Date sent</th> - <th>Type</th> - <th>Invited by</th> - <th></th> + <td colspan="7">No invitations found.</td> </tr> - </thead> - <tbody> - {% for invitation in sent_reg_inv_cited_pub %} - <tr> - <td>{{ invitation.last_name }}</td> - <td>{{ invitation.first_name }}</td> - <td>{{ invitation.email }}</td> - <td>{{ invitation.date_sent }} </td> - <td>{{ invitation.get_invitation_type_display }}</td> - <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> - <td> - {% if perms.scipost.can_invite_Fellows %} - <a href="{% url 'scipost:renew_registration_invitation' invitation_id=invitation.id %}">Renew</a> ({{ invitation.nr_reminders }}) {% if invitation.date_last_reminded %}(last: {{ invitation.date_last_reminded|date:"Y-m-d" }}){% endif %} - {% endif %} - </td> - </tr> - {% empty %} - <tr> - <td colspan="7">No invitations found.</td> - </tr> - {% endfor %} - </tbody> - </table> -</div> + {% endfor %} + </tbody> +</table> + <h2 class="highlight">Invitations sent (responded)</h2> -<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#invitations_responded">view/hide +</a> -<div id="invitations_responded"> - <h3>Editorial Fellows ({{resp_reg_inv_fellow|length}})</h3> - <table class="table" id="table_resp_reg_inv_fellow"> - <thead> +<h3>Editorial Fellows ({{resp_reg_inv_fellow|length}})</h3> +<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_resp_reg_inv_fellow">view/hide +</a> + +<table class="table" id="table_resp_reg_inv_fellow" style="display: none;"> + <thead> + <tr> + <th>Last name</th> + <th>First name</th> + <th>Email</th> + <th>Date sent</th> + <th>Type</th> + <th>Invited by</th> + </tr> + </thead> + <tbody> + {% for invitation in resp_reg_inv_fellow %} + <tr> + <td>{{ invitation.last_name }}</td> + <td>{{ invitation.first_name }}</td> + <td>{{ invitation.email }}</td> + <td>{{ invitation.date_sent }} </td> + <td>{{ invitation.get_invitation_type_display }}</td> + <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> + </tr> + {% empty %} <tr> - <th>Last name</th> - <th>First name</th> - <th>Email</th> - <th>Date sent</th> - <th>Type</th> - <th>Invited by</th> + <td colspan="6">No invitations found.</td> </tr> - </thead> - <tbody> - {% for invitation in resp_reg_inv_fellow %} - <tr> - <td>{{ invitation.last_name }}</td> - <td>{{ invitation.first_name }}</td> - <td>{{ invitation.email }}</td> - <td>{{ invitation.date_sent }} </td> - <td>{{ invitation.get_invitation_type_display }}</td> - <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> - </tr> - {% empty %} - <tr> - <td colspan="6">No invitations found.</td> - </tr> - {% endfor %} - </tbody> - </table> + {% endfor %} + </tbody> +</table> - <h3>Normal Contributors ({{resp_reg_inv_contrib|length}})</h3> - <table class="table" id="table_resp_reg_inv_contrib"> - <thead> +<h3>Normal Contributors ({{resp_reg_inv_contrib|length}})</h3> +<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_resp_reg_inv_contrib">view/hide +</a> + +<table class="table" id="table_resp_reg_inv_contrib" style="display: none;"> + <thead> + <tr> + <th>Last name</th> + <th>First name</th> + <th>Email</th> + <th>Date sent</th> + <th>Type</th> + <th>Invited by</th> + </tr> + </thead> + <tbody> + {% for invitation in resp_reg_inv_contrib %} + <tr> + <td>{{ invitation.last_name }}</td> + <td>{{ invitation.first_name }}</td> + <td>{{ invitation.email }}</td> + <td>{{ invitation.date_sent }} </td> + <td>{{ invitation.get_invitation_type_display }}</td> + <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> + </tr> + {% empty %} <tr> - <th>Last name</th> - <th>First name</th> - <th>Email</th> - <th>Date sent</th> - <th>Type</th> - <th>Invited by</th> + <td colspan="6">No invitations found.</td> </tr> - </thead> - <tbody> - {% for invitation in resp_reg_inv_contrib %} - <tr> - <td>{{ invitation.last_name }}</td> - <td>{{ invitation.first_name }}</td> - <td>{{ invitation.email }}</td> - <td>{{ invitation.date_sent }} </td> - <td>{{ invitation.get_invitation_type_display }}</td> - <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> - </tr> - {% empty %} - <tr> - <td colspan="6">No invitations found.</td> - </tr> - {% endfor %} - </tbody> - </table> + {% endfor %} + </tbody> +</table> + +<h3>Referees ({{resp_reg_inv_ref|length}})</h3> +<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_resp_reg_inv_ref">view/hide +</a> - <h3>Referees ({{resp_reg_inv_ref|length}})</h3> - <table class="table" id="table_resp_reg_inv_ref"> - <thead> +<table class="table" id="table_resp_reg_inv_ref" style="display: none;"> + <thead> + <tr> + <th>Last name</th> + <th>First name</th> + <th>Email</th> + <th>Date sent</th> + <th>Type</th> + <th>Invited by</th> + </tr> + </thead> + <tbody> + {% for invitation in resp_reg_inv_ref %} + <tr> + <td>{{ invitation.last_name }}</td> + <td>{{ invitation.first_name }}</td> + <td>{{ invitation.email }}</td> + <td>{{ invitation.date_sent }} </td> + <td>{{ invitation.get_invitation_type_display }}</td> + <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> + </tr> + {% empty %} <tr> - <th>Last name</th> - <th>First name</th> - <th>Email</th> - <th>Date sent</th> - <th>Type</th> - <th>Invited by</th> + <td colspan="6">No invitations found.</td> </tr> - </thead> - <tbody> - {% for invitation in resp_reg_inv_ref %} - <tr> - <td>{{ invitation.last_name }}</td> - <td>{{ invitation.first_name }}</td> - <td>{{ invitation.email }}</td> - <td>{{ invitation.date_sent }} </td> - <td>{{ invitation.get_invitation_type_display }}</td> - <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> - </tr> - {% empty %} - <tr> - <td colspan="6">No invitations found.</td> - </tr> - {% endfor %} - </tbody> - </table> + {% endfor %} + </tbody> +</table> + +<h3>Cited in sub ({{resp_reg_inv_cited_sub|length}})</h3> +<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_resp_reg_inv_cited_sub">view/hide +</a> - <h3>Cited in sub ({{resp_reg_inv_cited_sub|length}})</h3> - <table class="table" id="table_resp_reg_inv_cited_sub"> - <thead> +<table class="table" id="table_resp_reg_inv_cited_sub" style="display: none;"> + <thead> + <tr> + <th>Last name</th> + <th>First name</th> + <th>Email</th> + <th>Date sent</th> + <th>Type</th> + <th>Invited by</th> + </tr> + </thead> + <tbody> + {% for invitation in resp_reg_inv_cited_sub %} + <tr> + <td>{{ invitation.last_name }}</td> + <td>{{ invitation.first_name }}</td> + <td>{{ invitation.email }}</td> + <td>{{ invitation.date_sent }} </td> + <td>{{ invitation.get_invitation_type_display }}</td> + <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> + </tr> + {% empty %} <tr> - <th>Last name</th> - <th>First name</th> - <th>Email</th> - <th>Date sent</th> - <th>Type</th> - <th>Invited by</th> + <td colspan="6">No invitations found.</td> </tr> - </thead> - <tbody> - {% for invitation in resp_reg_inv_cited_sub %} - <tr> - <td>{{ invitation.last_name }}</td> - <td>{{ invitation.first_name }}</td> - <td>{{ invitation.email }}</td> - <td>{{ invitation.date_sent }} </td> - <td>{{ invitation.get_invitation_type_display }}</td> - <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> - </tr> - {% empty %} - <tr> - <td colspan="6">No invitations found.</td> - </tr> - {% endfor %} - </tbody> - </table> + {% endfor %} + </tbody> +</table> - <h3>Cited in pub ({{resp_reg_inv_cited_pub|length}})</h3> - <table class="table" id="table_resp_reg_inv_cited_pub"> - <thead> +<h3>Cited in pub ({{resp_reg_inv_cited_pub|length}})</h3> +<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_resp_reg_inv_cited_pub">view/hide +</a> + +<table class="table" id="table_resp_reg_inv_cited_pub" style="display: none;"> + <thead> + <tr> + <th>Last name</th> + <th>First name</th> + <th>Email</th> + <th>Date sent</th> + <th>Type</th> + <th>Invited by</th> + </tr> + </thead> + <tbody> + {% for invitation in resp_reg_inv_cited_pub %} + <tr> + <td>{{ invitation.last_name }}</td> + <td>{{ invitation.first_name }}</td> + <td>{{ invitation.email }}</td> + <td>{{ invitation.date_sent }} </td> + <td>{{ invitation.get_invitation_type_display }}</td> + <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> + </tr> + {% empty %} <tr> - <th>Last name</th> - <th>First name</th> - <th>Email</th> - <th>Date sent</th> - <th>Type</th> - <th>Invited by</th> + <td colspan="6">No invitations found.</td> </tr> - </thead> - <tbody> - {% for invitation in resp_reg_inv_cited_pub %} - <tr> - <td>{{ invitation.last_name }}</td> - <td>{{ invitation.first_name }}</td> - <td>{{ invitation.email }}</td> - <td>{{ invitation.date_sent }} </td> - <td>{{ invitation.get_invitation_type_display }}</td> - <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> - </tr> - {% empty %} - <tr> - <td colspan="6">No invitations found.</td> - </tr> - {% endfor %} - </tbody> - </table> + {% endfor %} + </tbody> +</table> + +<h3>Declined ({{decl_reg_inv|length}})</h3> +<a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_decl_reg_inv">view/hide +</a> - <h3>Declined ({{decl_reg_inv|length}})</h3> - <table class="table" id="table_decl_reg_inv"> - <thead> +<table class="table" id="table_decl_reg_inv" style="display: none;"> + <thead> + <tr> + <th>Last name</th> + <th>First name</th> + <th>Email</th> + <th>Date sent</th> + <th>Type</th> + <th>Invited by</th> + </tr> + </thead> + <tbody> + {% for invitation in decl_reg_inv %} + <tr> + <td>{{ invitation.last_name }}</td> + <td>{{ invitation.first_name }}</td> + <td>{{ invitation.email }}</td> + <td>{{ invitation.date_sent }} </td> + <td>{{ invitation.get_invitation_type_display }}</td> + <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> + </tr> + {% empty %} <tr> - <th>Last name</th> - <th>First name</th> - <th>Email</th> - <th>Date sent</th> - <th>Type</th> - <th>Invited by</th> + <td colspan="6">No invitations found.</td> </tr> - </thead> - <tbody> - {% for invitation in decl_reg_inv %} - <tr> - <td>{{ invitation.last_name }}</td> - <td>{{ invitation.first_name }}</td> - <td>{{ invitation.email }}</td> - <td>{{ invitation.date_sent }} </td> - <td>{{ invitation.get_invitation_type_display }}</td> - <td>{{ invitation.invited_by.user.first_name }} {{ invitation.invited_by.user.last_name }}</td> - </tr> - {% empty %} - <tr> - <td colspan="6">No invitations found.</td> - </tr> - {% endfor %} - </tbody> - </table> -</div> + {% endfor %} + </tbody> +</table> <h2 class="highlight">List of already-registered contributors ({{names_reg_contributors|length}})</h3> <a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#registered_contributors">view/hide +</a> diff --git a/scipost/templates/scipost/registration_invitations.html b/scipost/templates/scipost/registration_invitations.html index 38eb89dae..cc5a6922d 100644 --- a/scipost/templates/scipost/registration_invitations.html +++ b/scipost/templates/scipost/registration_invitations.html @@ -64,10 +64,10 @@ $(document).ready(function(){ <div class="row"> <div class="col-12"> - <h2 class="highlight">Existing drafts (to be processed by Admin) ({{existing_drafts|length}})</h2> - <a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_existing_drafts">view/hide</a> + <h2 class="highlight">Existing drafts (to be processed by Admin)</h2> + <a href="javascript:void(0)" class="btn mb-2" data-toggle="toggle" data-target="#table_existing_drafts">view/hide ({{existing_drafts|length}}) +</a> - <table class="table" id="table_existing_drafts"> + <table class="table" id="table_existing_drafts" style="display: none;"> <thead> <tr> <th>Last name</th> -- GitLab