Rajoute un lien vers la liste des votant·e·s depuis la page d'admin si l'élection n'est pas dépouillée
This commit is contained in:
parent
a7a029d1a2
commit
6f98654766
3 changed files with 13 additions and 2 deletions
|
@ -57,8 +57,16 @@
|
||||||
|
|
||||||
{% elif election.end_date < current_time %}
|
{% elif election.end_date < current_time %}
|
||||||
|
|
||||||
{# Dépouillement #}
|
|
||||||
{% if not election.tallied %}
|
{% if not election.tallied %}
|
||||||
|
{# Liste des votants #}
|
||||||
|
<a class="dropdown-item" href="{% url 'election.voters' election.pk %}">
|
||||||
|
<span class="icon">
|
||||||
|
<i class="fas fa-list"></i>
|
||||||
|
</span>
|
||||||
|
<span>{% trans "Liste des votant·e·s" %}</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{# Dépouillement #}
|
||||||
<a class="dropdown-item" href="{% url 'election.tally' election.pk %}">
|
<a class="dropdown-item" href="{% url 'election.tally' election.pk %}">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fas fa-poll-h"></i>
|
<i class="fas fa-poll-h"></i>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<div class="level-right">
|
<div class="level-right">
|
||||||
<div class="level-item">
|
<div class="level-item">
|
||||||
<a class="button is-primary" href="{% url 'election.view' election.pk %}">
|
<a class="button is-primary" href="{% url return_pattern election.pk %}">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<i class="fas fa-undo-alt"></i>
|
<i class="fas fa-undo-alt"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -435,6 +435,9 @@ class ElectionVotersView(NotArchivedMixin, DetailView):
|
||||||
and election.end_date < timezone.now()
|
and election.end_date < timezone.now()
|
||||||
and not election.tallied
|
and not election.tallied
|
||||||
)
|
)
|
||||||
|
context["return_pattern"] = (
|
||||||
|
"election." + "admin" if context["can_delete"] else "view"
|
||||||
|
)
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue