A switch beside the button that publishes — on the editor, on a member's proposal and on a wall thread — and a pill next to the date wherever the post is read: the article, the cards in the listings, the thread, the wall's list, and the moderator's review screen. Next to the date rather than under the text, because a disclosure somebody meets after reading the thing is not a disclosure. Where it lives follows what the thing is. A public post carries `ai_generated: true` in its own frontmatter, written only when true — the file in the repository is the record, and `ai_generated: false` on every post ever written is noise in git and a question in the mind of whoever reads one. A thread carries a column. A proposal carries a column too, and that is the one place it has to be moved by hand: a proposal is a draft in SQLite until it is approved, so the frontmatter it will end up in does not exist while the decision is being made, and losing it there would lose it exactly when the text stops being private. `content.edit` loads the flag back into the form, for the same reason the byline is carried through: a field read but not written back is a field that one corrected typo silently removes. The pipeline needs nothing. translate.py copies the whole frontmatter and rewrites only TRANSLATED_KEYS, so the flag reaches the German and Portuguese siblings by itself — right rather than lucky, since a translated post was still machine-written. Asserted against the real list, so a key quietly added to it fails the suite. Migration 9: three plain ADD COLUMNs, tested against a database with a thread, a proposal and a cached post already in it. The three words are in partials/t.html with the theme's other labels. This is also the shape the EU AI Act's Article 50 asks for, which is worth knowing for whoever installs this for a second organisation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
78 lines
3.3 KiB
HTML
78 lines
3.3 KiB
HTML
{% extends "base.html" %}
|
|
{% from "_person.html" import person %}
|
|
{% block title %}{{ item.title }}{% endblock %}
|
|
|
|
{% block main %}
|
|
<div class="feed-head">
|
|
<h1>{{ item.title }}</h1>
|
|
<a class="linkish" href="{{ url_for('submissions.index') }}">Volver</a>
|
|
</div>
|
|
|
|
<article class="card">
|
|
<div class="card__meta">
|
|
<span class="tag tag--{{ item.state }}">{{ labels[item.state] }}</span>
|
|
<span>{{ person(item.author, item.author_login) }}</span> · <time>{{ item.created_at }}</time>
|
|
{% if item.event_date %} · <span>Evento el {{ item.event_date }}</span>{% endif %}
|
|
{#- Shown to the moderator before they decide: a disclosure the reviewer
|
|
cannot see is one they cannot weigh. -#}
|
|
{% if item.ai_generated %}<span class="tag tag--ai" title="Quien lo publicó marcó este texto como generado con inteligencia artificial.">Generado con IA</span>{% endif %}
|
|
</div>
|
|
{% if item.description %}<p class="muted">{{ item.description }}</p>{% endif %}
|
|
{% if item.photo_name %}
|
|
<img class="attachment"
|
|
src="{{ url_for('submissions.photo', stored_name=item.photo_name) }}"
|
|
alt="Imagen de «{{ item.title }}»">
|
|
{% endif %}
|
|
<div class="prose">{{ body_html }}</div>
|
|
</article>
|
|
|
|
{% if item.state == 'rejected' and item.note %}
|
|
<article class="card">
|
|
<h2>Motivo de la devolución</h2>
|
|
<p>{{ item.note }}</p>
|
|
{% if item.reviewer %}<p class="muted small">— {{ item.reviewer }}, {{ item.reviewed_at }}</p>{% endif %}
|
|
</article>
|
|
{% endif %}
|
|
|
|
{% if item.state == 'approved' %}
|
|
<p class="muted">
|
|
Publicado{% if item.reviewer %} por {{ item.reviewer }}{% endif %}{% if item.published_path %} en <span class="mono">{{ item.published_path }}</span>{% endif %}.
|
|
La traducción al alemán y al portugués tarda un par de minutos.
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% if can_moderate and item.state != 'approved' %}
|
|
{# Approve and reject are two forms rather than one with a choice: they are not
|
|
variations of the same action, and the reason is required for only one. #}
|
|
<form class="card" method="post"
|
|
action="{{ url_for('submissions.approve', submission_id=item.id) }}"
|
|
data-confirm="Se publicará en vienalatina.com con el nombre de {{ item.author }}. ¿Seguro?">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<p class="muted small">
|
|
Al aprobar se publica tal cual está, firmado por {{ item.author }} — en el
|
|
sitio y en el historial del repositorio.
|
|
</p>
|
|
<button class="btn" type="submit">Aprobar y publicar</button>
|
|
</form>
|
|
|
|
<form class="card" method="post" action="{{ url_for('submissions.reject', submission_id=item.id) }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<label for="note">Devolver con un motivo</label>
|
|
<textarea id="note" name="note" rows="3"
|
|
placeholder="Qué hay que cambiar para que se pueda publicar."></textarea>
|
|
<button class="linkish" type="submit">Devolver al autor</button>
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% if mine and item.state != 'approved' %}
|
|
<div class="actions">
|
|
<a class="btn" href="{{ url_for('submissions.edit', submission_id=item.id) }}">Editar</a>
|
|
<form method="post" action="{{ url_for('submissions.withdraw', submission_id=item.id) }}"
|
|
data-confirm="Se borrará la propuesta. ¿Seguro?">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button class="linkish linkish--danger" type="submit">Retirar</button>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|