trotFunky
67ce54e992
- Create a new migration adding a Weeks table, allowing for new weekly introductions and paving the way for multiple week handling. - Add route to update the weekly introduction - Move the week rendering to a specific week file - Update the templates to use the week number from the week data - Update templates to render and edit weekly introductions
26 lines
791 B
Text
26 lines
791 B
Text
<textarea class="editor" name="truth_raw_text">
|
|
{%- if truth.raw_text -%}
|
|
{{- truth.raw_text -}}
|
|
{%- endif -%}
|
|
</textarea>
|
|
<label>Qui l'a écrit ?
|
|
<select name="truth_author">
|
|
<option value="0">---</option>
|
|
{% for player in other_players %}
|
|
{# Check if we should pre-select if the truth already exists #}
|
|
{% if truth.author_id and player.id == truth.author_id %}
|
|
{% set is_selected = "selected" %}
|
|
{% else %}
|
|
{% set is_selected = "" %}
|
|
{% endif %}
|
|
<option value="{{ player.id }}" {{- is_selected -}}>{{ player.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</label>
|
|
<button>
|
|
{%- if not truth.author_id -%}
|
|
Ajouter une vérité
|
|
{%- else -%}
|
|
Modifier la vérité
|
|
{%- endif -%}
|
|
</button>
|