On déplace le bouton de vote

This commit is contained in:
Tom Hubrecht 2021-03-19 10:28:25 +01:00
parent 44ee65bf2e
commit a5fdc84161

View file

@ -38,7 +38,22 @@
<hr> <hr>
{# Indications de connexion #} {# Indications de connexion #}
{% if election.start_date < current_time and election.end_date > current_time and not can_vote %} {% if election.start_date < current_time and election.end_date > current_time %}
{% if can_vote %}
<div class="columns is-centered tile is-ancestor">
<div class="column is-one-third tile is-parent">
<a class="tile is-child notification is-primary" href="{% url 'election.vote' election.questions.first.pk %}">
<div class="subtitle has-text-centered">
<span class="icon has-text-white">
<i class="fas fa-vote-yea"></i>
</span>
<span class="ml-3">{% trans "Voter" %}</span>
</div>
</a>
</div>
</div>
{% else %}
<div class="message is-warning"> <div class="message is-warning">
<div class="message-body"> <div class="message-body">
{% if election.restricted %} {% if election.restricted %}
@ -77,6 +92,7 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% endif %}
{# Description de l'élection #} {# Description de l'élection #}
<div class="message is-primary"> <div class="message is-primary">
@ -87,6 +103,7 @@
{% for q in election.questions.all %} {% for q in election.questions.all %}
<div class="panel" id="q_{{ q.pk }}"> <div class="panel" id="q_{{ q.pk }}">
<div class="panel-heading is-size-6"> <div class="panel-heading is-size-6">
{% comment %}
{% if can_vote and election.start_date < current_time and election.end_date > current_time %} {% if can_vote and election.start_date < current_time and election.end_date > current_time %}
<a class="tag is-outlined is-light is-danger" href="{% url 'election.vote' q.pk %}"> <a class="tag is-outlined is-light is-danger" href="{% url 'election.vote' q.pk %}">
<span class="icon"> <span class="icon">
@ -95,6 +112,7 @@
<span>{% trans "Voter" %}</span> <span>{% trans "Voter" %}</span>
</a> </a>
{% endif %} {% endif %}
{% endcomment %}
<span class="ml-2">{{ q.text }}</span> <span class="ml-2">{{ q.text }}</span>
{% if q in cast_questions %} {% if q in cast_questions %}