Bouton de retour depuis la liste des votant·e·s

This commit is contained in:
Tom Hubrecht 2021-08-25 15:59:55 +02:00
parent 04c14b37ec
commit 3c91771e84
3 changed files with 5 additions and 7 deletions

View file

@ -108,12 +108,9 @@
<div class="dropdown is-right">
<div class="dropdown-trigger">
<button class="button" aria-haspopup="true" aria-controls="dropdown-menu">
<span class="icon-text">
<span class="icon">
<i class="fas fa-cog" aria-hidden="true"></i>
</span>
<span>{% trans "Actions" %}</span>
</span>
</button>
</div>
@ -170,7 +167,7 @@
{% if not election.tallied %}
{# Liste des votants #}
<a class="dropdown-item" href="{% url 'election.voters' election.pk %}">
<a class="dropdown-item" href="{% url 'election.voters' election.pk %}?prev=admin">
<span class="icon">
<i class="fas fa-list"></i>
</span>

View file

@ -61,7 +61,7 @@
<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 %}">
<a class="button is-primary" href="{% if from_admin %}{% url 'election.admin' election.pk %}{% else %}{% url 'election.view' election.pk %}{% endif %}">
<span class="icon">
<i class="fas fa-undo-alt"></i>
</span>

View file

@ -437,6 +437,7 @@ class ElectionVotersView(NotArchivedMixin, DetailView):
context["d_form"] = DeleteVoteForm()
context["can_delete"] = can_delete
context["from_admin"] = self.request.GET.get("prev") == "admin"
context["voters"] = voters
return context