98 lines
3 KiB
HTML
98 lines
3 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="level">
|
|
{# Titre de l'élection #}
|
|
<div class="level-left">
|
|
<h1 class="title">{{ election.name }}</h1>
|
|
</div>
|
|
|
|
<div class="level-right">
|
|
<div class="level-item">
|
|
<a class="button is-primary" href="{% if can_delete %}{% url 'election.admin' election.pk %}{% else %}{% url 'election.view' election.pk %}{% endif %}">
|
|
<span class="icon is-small">
|
|
<i class="fas fa-undo-alt"></i>
|
|
</span>
|
|
<span>{% trans "Retour" %}</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="level">
|
|
<div class="level-left">
|
|
<h3 class="subtitle">{% trans "Liste des votant·e·s" %}</h3>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
|
|
<div class="message is-warning">
|
|
<div class="message-body">
|
|
{% if election.restricted %}
|
|
{% trans "Seules les personnes présentes sur cette liste peuvent voter, vous avez dû recevoir un mail avec vos identifiants de connexion." %}
|
|
{% else %}
|
|
{% trans "Toute personne avec un compte CAS peut voter." %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="columns is-centered">
|
|
<div class="column is-two-thirds">
|
|
<table class="table is-striped is-fullwidth">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "Nom" %}</th>
|
|
<th class="has-text-centered">{% trans "Vote enregistré" %}</th>
|
|
{% if can_delete %}
|
|
<th class="has-text-centered">{% trans "Supprimer" %}</th>
|
|
{% endif %}
|
|
<tr>
|
|
</thead>
|
|
<tbody>
|
|
{% if election.restricted %}
|
|
{% for v in election.registered_voters.all %}
|
|
<tr>
|
|
<td>{{ v.full_name }} ({{ v.get_username }})</td>
|
|
<td class="has-text-centered">
|
|
<span class="icon">
|
|
{% if v in voters %}
|
|
<i class="fas fa-check"></i>
|
|
{% else %}
|
|
<i class="fas fa-times"></i>
|
|
{% endif %}
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% else %}
|
|
{% for v in voters %}
|
|
<tr id="v_{{ forloop.counter }}">
|
|
<td>{{ v.full_name }} ({{ v.get_username }})</td>
|
|
<td class="has-text-centered">
|
|
<span class="icon">
|
|
<i class="fas fa-check"></i>
|
|
</span>
|
|
</td>
|
|
{% if can_delete %}
|
|
<td class="has-text-centered">
|
|
{% url 'election.delete-vote' election.pk v.pk forloop.counter as post_url %}
|
|
{% blocktrans with v_name=v.full_name asvar modal_title %}Supprimer le vote de {{ v_name }}{% endblocktrans %}
|
|
<a class="tag is-danger has-tooltip-primary modal-button" data-target="modal-{{ forloop.counter }}" data-tooltip="{{ modal_title }}">
|
|
<span class="icon">
|
|
<i class="fas fa-user-minus"></i>
|
|
</span>
|
|
</a>
|
|
{% include "forms/modal-form.html" with modal_id=forloop.counter form=v.form %}
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{% endblock %}
|