27 lines
954 B
Text
27 lines
954 B
Text
|
<div class="individual_truth">
|
||
|
<h3>Vérité {{ truth.number }}</h3>
|
||
|
<p>{{ truth.rendered_text | safe }}</p>
|
||
|
{% if user.logged_in %}
|
||
|
<hr/>
|
||
|
<label>
|
||
|
{%- if truth.author_id == user.id -%}
|
||
|
Tu l'as fait :)
|
||
|
{%- else -%}
|
||
|
Qui l'a fait ?
|
||
|
<select form="truths" name="truth_votes[{{ truth.id }}]">
|
||
|
<option value="0">---</option>
|
||
|
{% for player in other_players %}
|
||
|
{# Check if we should pre-select an existing vote #}
|
||
|
{% if has_vote == true and player.id == user.votes[truth_index].voted_id %}
|
||
|
{% set is_selected = "selected" %}
|
||
|
{% else %}
|
||
|
{% set is_selected = "" %}
|
||
|
{% endif %}
|
||
|
<option value="{{ player.id }}" {{- is_selected -}}>{{ player.name }}</option>
|
||
|
{% endfor %}
|
||
|
</select>
|
||
|
{%- endif -%}
|
||
|
</label>
|
||
|
{% endif %}
|
||
|
</div>
|