FabulaVotes/templates/weeks/editable_truth.tera

33 lines
1.5 KiB
Text
Raw Normal View History

<div class="individual_truth">
<a href="/{{ truth.week }}#{{ truth.number }}"><h3 id="{{ truth.number }}">Vérité {{ truth.number }}</h3></a>
<p>{{ truth.rendered_text | safe }}</p>
<div class="truth_tags">
{% for tag in truth.tags %}
<form action="/{{ week_data.number }}/untag/{{ truth.id }}" method="post">
<button name="name" value="{{ tag.name }}">❌</button>
</form>
<a class="tag" href="/tags/filter?tags={{ tag.name }}" style="background-color: {{ tag.color }}">
{{ tag.name }}
</a>
{% endfor %}
</div>
<hr/>
<form class="truth_edit_form" action="/{{ week_data.number }}/edit/{{ truth.number }}" method="POST">
{% include "weeks/truth_editor" %}
</form>
{% if tags | length > 0 and tags | length > truth.tags | length %}
<form class="truth_edit_form" action="/{{ week_data.number }}/tag/{{ truth.id }}" method="post">
<label>Thème supplémentaire:
<select name="name">
{% for tag in tags %}
{% if not truth.tags is containing(tag) %}
<option value="{{ tag.name }}" style="background-color: {{ tag.color }}">{{ tag.name }}</option>
{% endif %}
{% endfor %}
</select>
</label>
<button>Ajouter un thème</button>
</form>
{% endif %}
</div>