From 6b523d8db65d9e9d81b4ff94612058d3e4bc8ba5 Mon Sep 17 00:00:00 2001 From: George Katsikas <giorgakis.katsikas@gmail.com> Date: Fri, 29 Sep 2023 16:14:46 +0200 Subject: [PATCH] remove manage invitations from nominations add invitation status to nomination details summary --- .../colleges/_hx_nomination_summary.html | 17 +++++++++++++---- .../templates/colleges/nominations.html | 15 --------------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/scipost_django/colleges/templates/colleges/_hx_nomination_summary.html b/scipost_django/colleges/templates/colleges/_hx_nomination_summary.html index 336082ac2..aac1bdbf9 100644 --- a/scipost_django/colleges/templates/colleges/_hx_nomination_summary.html +++ b/scipost_django/colleges/templates/colleges/_hx_nomination_summary.html @@ -44,10 +44,19 @@ </div> <div class="row mb-2 justify-content-between"> - <small class="col text-muted text-nowrap">Publications</small> - <div class="col-auto">{{ nomination.profile.publications.all.count }}</div> - <small class="col text-muted text-nowrap">Total rounds</small> - <div class="col-auto">{{ nomination.voting_rounds.all.count }}</div> + + {% if nomination.invitation %} + <small class="col-auto text-muted text-nowrap">Invitation status</small> + <div class="col"> + <span class="badge bg-{{ nomination.invitation.get_response_color }}">{{ nomination.invitation.get_response_display }}</span> + </div> + {% else %} + <small class="col text-muted text-nowrap">Publications</small> + <div class="col-auto">{{ nomination.profile.publications.all.count }}</div> + <small class="col text-muted text-nowrap">Total rounds</small> + <div class="col-auto">{{ nomination.voting_rounds.all.count }}</div> + {% endif %} + </div> </div> </div> diff --git a/scipost_django/colleges/templates/colleges/nominations.html b/scipost_django/colleges/templates/colleges/nominations.html index 43e015f35..b43663942 100644 --- a/scipost_django/colleges/templates/colleges/nominations.html +++ b/scipost_django/colleges/templates/colleges/nominations.html @@ -76,19 +76,4 @@ <div id="search-nominations-results" class="mt-2"></div> - {% if "edadmin" in user_roles %} - <details id="invitations-details" class="border border-success border-2 mt-4"> - <summary class="bg-success bg-opacity-10 p-2 d-block list-triangle"> - <div class="fs-5">Manage invitations</div> - </summary> - - <div class="p-2 mt-2"> - <div id="invitations_tablist" - hx-get="{% url 'colleges:_hx_nominations_invitations' %}?response=notyetinvited" - hx-trigger="toggle from:#invitations-details" - hx-target="#invitations_tablist"></div> - </div> - </details> - {% endif %} - {% endblock content %} -- GitLab