SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit e18b9574 authored by George Katsikas's avatar George Katsikas :goat:
Browse files

add inconclusive outcome to nomination decision

parent 4e94231d
No related branches found
No related tags found
No related merge requests found
# Generated by Django 3.2.18 on 2023-11-14 16:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('colleges', '0043_alter_fellowshipnominationevent_options'),
]
operations = [
migrations.AlterField(
model_name='fellowshipnominationdecision',
name='outcome',
field=models.CharField(choices=[('elected', 'Elected'), ('notelected', 'Not elected'), ('inconclusive', 'Inconclusive')], max_length=16),
),
]
......@@ -341,9 +341,11 @@ class FellowshipNominationDecision(models.Model):
OUTCOME_ELECTED = "elected"
OUTCOME_NOT_ELECTED = "notelected"
OUTCOME_INCONCLUSIVE = "inconclusive"
OUTCOME_CHOICES = [
(OUTCOME_ELECTED, "Elected"),
(OUTCOME_NOT_ELECTED, "Not elected"),
(OUTCOME_INCONCLUSIVE, "Inconclusive"),
]
outcome = models.CharField(max_length=16, choices=OUTCOME_CHOICES)
......
......@@ -7,6 +7,7 @@
type="button"
class="me-2 px-2 nav-link border border-success"
hx-get="{% url 'colleges:_hx_nomination_voting_rounds_create' nomination_id=nomination.id %}"
{% if nomination.decision.outcome == 'notelected' %}hx-confirm="Are you sure you want to create a new voting round for a previously non-elected nominee? This should only be performed as a rare exception and after considerable time has passed since the last round."{% endif %}
hx-target="#nomination-{{ nomination.id }}-round-tab-holder"
hx-swap="outerHTML">
<span class="fs-1 align-items-center text-success">+</span>
......
......@@ -51,7 +51,7 @@
{% comment %} If round is closed show results if they exist {% endcomment %}
{% else %}
<div>{% include "colleges/_voting_results_box.html" with voting_round=voting_round %}</div>
<div>{% include "colleges/_voting_results_box.html" with voting_round=round %}</div>
{% if round.decision %}
......@@ -62,6 +62,8 @@
<div class="badge fs-5 mb-2 bg-success">{{ round.decision.get_outcome_display }}</div>
{% elif round.decision.outcome == 'notelected' %}
<div class="badge fs-5 mb-2 bg-danger">{{ round.decision.get_outcome_display }}</div>
{% elif round.decision.outcome == 'inconclusive' %}
<div class="badge fs-5 mb-2 bg-warning">{{ round.decision.get_outcome_display }}</div>
{% endif %}
{% if round.decision.comments %}
......
......@@ -66,12 +66,14 @@
<div class="col-auto">
{% if round.decision.outcome == "elected" %}
{% if not round.decision %}
<span class="badge bg-warning">Pending</span>
{% elif round.decision.outcome == "elected" %}
<span class="badge bg-success">{{ round.decision.get_outcome_display }}</span>
{% elif round.decision.outcome == "notelected" %}
<span class="badge bg-danger">{{ round.decision.get_outcome_display }}</span>
{% else %}
<span class="badge bg-warning">Pending</span>
{% elif round.decision.outcome == "inconclusive" %}
<span class="badge bg-warning">{{ round.decision.get_outcome_display }}</span>
{% endif %}
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment