2020-12-20 12:00:09 +01:00
|
|
|
{% extends "base.html" %}
|
2020-12-19 23:48:18 +01:00
|
|
|
{% load i18n %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
2021-03-27 01:21:44 +01:00
|
|
|
<div class="level">
|
|
|
|
<div class="level-left">
|
|
|
|
<div class="level-item">
|
|
|
|
<h1 class="title">{% trans "Liste des élections" %}</h1>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if perms.elections.is_admin %}
|
|
|
|
<div class="level-right">
|
|
|
|
<div class="level-item">
|
|
|
|
<a class="button is-light is-outlined is-primary" href={% url 'election.create' %}>
|
|
|
|
<span class="icon">
|
|
|
|
<i class="fas fa-plus"></i>
|
|
|
|
</span>
|
|
|
|
<span>{% trans "Créer une élection" %}</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-12-19 23:48:18 +01:00
|
|
|
<hr>
|
|
|
|
|
|
|
|
{% for e in election_list %}
|
|
|
|
<div class="message is-primary">
|
|
|
|
<div class="message-header is-size-6 is-radiusless">
|
|
|
|
<div>
|
2021-03-20 12:25:01 +01:00
|
|
|
<a href="{% url 'election.view' e.pk %}">{{ e.name }}</a>
|
|
|
|
<span class="tag is-primary is-light ml-3">{{ e.start_date|date:"d/m/Y H:i" }}</span>
|
2020-12-19 23:48:18 +01:00
|
|
|
<span class="icon has-text-primary-light">
|
|
|
|
<i class="fas fa-long-arrow-alt-right"></i>
|
|
|
|
</span>
|
|
|
|
<span class="tag is-primary is-light">{{ e.end_date|date:"d/m/Y H:i" }}</span>
|
2021-03-20 12:25:01 +01:00
|
|
|
</div>
|
2020-12-19 23:48:18 +01:00
|
|
|
|
2021-03-20 12:25:01 +01:00
|
|
|
<div>
|
2020-12-19 23:48:18 +01:00
|
|
|
{% if e.tallied %}
|
2020-12-20 10:35:18 +01:00
|
|
|
<span class="tag is-success is-light ml-3">{% trans "Élection dépouillée" %}</span>
|
2020-12-19 23:48:18 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if e.results_public %}
|
2020-12-20 10:35:18 +01:00
|
|
|
<span class="tag is-info is-light ml-3">{% trans "Élection publiée" %}</span>
|
2020-12-19 23:48:18 +01:00
|
|
|
{% endif %}
|
2021-03-27 11:19:57 +01:00
|
|
|
|
|
|
|
{% if e.archived %}
|
|
|
|
<span class="tag is-danger is-light ml-3">{% trans "Élection archivée" %}</span>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if e.created_by == user %}
|
2021-03-27 11:37:49 +01:00
|
|
|
<a class="has-text-primary-light ml-3 has-tooltip-light" href="{% url 'election.admin' e.pk %}" data-tooltip="{% trans "Administrer" %}">
|
2021-03-27 11:19:57 +01:00
|
|
|
<span class="icon">
|
|
|
|
<i class="fas fa-cog"></i>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2020-12-19 23:48:18 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p class="message-body">
|
|
|
|
{{ e.description|linebreaksbr }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% endblock %}
|