On gère mieux les longs titres pour les votes et questions

This commit is contained in:
Tom Hubrecht 2021-04-12 23:48:04 +02:00
parent fea39e402b
commit 3f3ace85f3
2 changed files with 45 additions and 30 deletions

View file

@ -5,14 +5,12 @@
{% block content %}
<div class="level">
{# Titre de l'élection #}
<div class="level-left is-flex-shrink-1">
{# Titre de l'élection #}
<div class="level-item">
<h1 class="title">{{ election.name }}</h1>
</div>
<h1 class="title">{{ election.name }}</h1>
</div>
<div class="level-right is-flex-shrink-1 is-flex-grow-1">
<div class="level-right">
{# Liste des votant·e·s #}
<div class="level-item">
<a class="button is-primary is-light is-outlined" href="{% url 'election.voters' election.pk %}">
@ -148,11 +146,17 @@
{% for q in election.questions.all %}
<div class="panel" id="q_{{ q.pk }}">
<div class="panel-heading is-size-6">
<span class="ml-2">{{ q.text }}</span>
<div class="level">
<div class="level-left is-flex-shrink-1">
<span>{{ q.text }}</span>
</div>
{% if q in cast_questions %}
<span class="tag is-outlined is-light is-success is-pulled-right">{% trans "A voté" %}</span>
{% endif %}
{% if q in cast_questions %}
<div class="level-right">
<span class="tag is-outlined is-light is-success">{% trans "A voté" %}</span>
</div>
{% endif %}
</div>
</div>
{# Liste des options possibles #}

View file

@ -5,11 +5,9 @@
{% block content %}
<div class="level is-block-tablet is-block-desktop is-flex-fullhd">
<div class="level-left">
{# Titre de l'élection #}
<div class="level-item">
<h1 class="title">{{ election.name }}</h1>
</div>
{# Titre de l'élection #}
<div class="level-left is-flex-shrink-1">
<h1 class="title">{{ election.name }}</h1>
</div>
{% if election.start_date > current_time or election.end_date < current_time %}
@ -123,22 +121,35 @@
{% for q in election.questions.all %}
<div class="panel" id="q_{{ q.pk }}">
<div class="panel-heading is-size-6">
<span>{{ q.text }}</span>
{% if election.start_date > current_time %}
<a class="tag is-outlined is-light is-danger" href="{% url 'election.del-question' q.pk %}">
<span class="icon">
<i class="fas fa-times"></i>
</span>
<span>{% trans "Supprimer" %}</span>
</a>
<a class="tag is-outlined is-light is-info" href="{% url 'election.mod-question' q.pk %}">
<span class="icon">
<i class="fas fa-edit"></i>
</span>
<span>{% trans "Modifier" %}</span>
</a>
{% endif %}
<span class="tag is-outlined is-primary is-light is-pulled-right">{{ q.get_type_display }}</span>
<div class="level">
<div class="level-left is-flex-shrink-1">
<div class="level-item is-flex-shrink-1">
<span>{{ q.text }}</span>
</div>
<div class="level-item">
{% if election.start_date > current_time %}
<a class="tag is-outlined is-light is-danger" href="{% url 'election.del-question' q.pk %}">
<span class="icon">
<i class="fas fa-times"></i>
</span>
<span>{% trans "Supprimer" %}</span>
</a>
<a class="tag is-outlined is-light is-info" href="{% url 'election.mod-question' q.pk %}">
<span class="icon">
<i class="fas fa-edit"></i>
</span>
<span>{% trans "Modifier" %}</span>
</a>
{% endif %}
</div>
</div>
<div class="level-right">
<span class="tag is-outlined is-primary is-light">{{ q.get_type_display }}</span>
</div>
</div>
</div>
{# Liste des options possibles #}