vienalatina/apps/board/templates/threads.html
Claude ff115c1d6b
A post can say that a machine wrote it
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
2026-10-06 20:19:06 +00:00

44 lines
1.5 KiB
HTML

{% extends "base.html" %}
{% from "_person.html" import person %}
{% from "_reaction.html" import reaction %}
{% block title %}Muro{% endblock %}
{% block main %}
<div class="feed-head">
<h1>Muro</h1>
<a class="btn" href="{{ url_for('board.new_thread') }}">Escribir</a>
</div>
{% if not threads %}
<article class="card">
<p class="muted">Todavía no hay nada en el muro. Escribe el primero.</p>
</article>
{% endif %}
{% for t in threads %}
<article class="card">
<div class="card__meta">
{% if t.pinned %}<span class="tag">Fijado</span>{% endif %}
{% if t.locked %}<span class="tag tag--quiet">Cerrado</span>{% endif %}
{% if t.ai_generated %}<span class="tag tag--ai" title="Quien lo publicó marcó este texto como generado con inteligencia artificial.">Generado con IA</span>{% endif %}
<span>{{ person(t.author, t.author_login) }}</span> · <time>{{ t.created_at }}</time>
</div>
<h2 class="card__title">
<a href="{{ url_for('board.thread', thread_id=t.id) }}">{{ t.title }}</a>
</h2>
<p class="card__excerpt">{{ excerpt(t.body_md) }}</p>
<div class="card__foot">
{{ reaction('thread', t.id, reactions.get(t.id), url_for('board.threads', page=page)) }}
<span>{{ t.replies }} respuesta{{ '' if t.replies == 1 else 's' }}</span>
</div>
</article>
{% endfor %}
{% if page > 1 or has_next %}
<nav class="pager">
{% if page > 1 %}<a href="{{ url_for('board.threads', page=page - 1) }}">← Anteriores</a>{% endif %}
{% if has_next %}<a href="{{ url_for('board.threads', page=page + 1) }}">Siguientes →</a>{% endif %}
</nav>
{% endif %}
{% endblock %}