vienalatina/apps/board/templates/gestion.html
Pablo Volenski 91aa0c9a9e
Private messages live on the person, not in a tab
*Privados* was a section holding a list of conversations, and *Miembros* was a
page reached from the footer. That is backwards: the list of conversations is a
by-product and the people are the thing. So the navigation swaps them —
**Inicio · Muro · Miembros · Publicaciones · Calendario · Gestión** — the grid
becomes faces and names, and writing to somebody and reading what the two of
you have written each other both happen on their page.

`/comunidad/miembro/<usuario>` is new, keyed on the login so the address
matches the public one. It carries their photo, bio and links, a link out to
their public page when they have published one, the whole conversation with
them, the write box, block/unblock, and — for an admin — the controls that used
to be folded into every card in the directory. `conversation.html` and
`inbox.html` are gone; `member.html` replaces both.

The split between the two modules did not move. `messages.py` still owns every
rule about private messages — who may read a conversation, what counts as
having read it, when the conversation comes into being, who may write to whom —
and hands the page its contents through the new `history()`. What is left of
its routes are the ones that change something: a message sent, a block set or
lifted. `members.show` renders.

Not losing the unread badge is the part with a real design question in it, and
it takes four things: the badge moves to *Miembros*, each card carries its own
count, the cards with something unread sort to the top of the grid, and Inicio
keeps the panel it already had. Without the sort, the person waiting for an
answer is wherever the alphabet put them, which is the one thing the inbox did
that a grid of faces does not.

Names now link inside. `_person.html` used to link to somebody's *public* page
and only when they had published one, so most names on the wall were plain
text and there was no way to get from a post to writing to its author. Every
caller is behind the login, so it points at the members-area page instead —
with the tombstone as the one name with nothing behind it.

Old addresses redirect: `/comunidad/privados` to the directory,
`/comunidad/privados/con/<id>` to that person's page. The POST that sends a
message keeps its address, which is what the form on the new page uses.

512 tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
2026-10-03 20:12:16 +00:00

66 lines
2.2 KiB
HTML

{% extends "base.html" %}
{% block title %}Gestión{% endblock %}
{% block main %}
<div class="feed-head">
<h1>Gestión</h1>
</div>
<p class="muted">
Lo que sólo hace la administración. Todo lo demás — el muro, los privados,
las publicaciones — está en las otras secciones y funciona igual para ti que
para cualquier miembro.
</p>
<section class="panel">
<div class="panel__head">
<h2>Miembros</h2>
<a class="linkish" href="{{ url_for('members.new') }}">Dar de alta</a>
</div>
<p class="panel__row">
{{ counts.members }} en total · {{ counts.moderators }} pueden moderar
{% if counts.suspended %} · {{ counts.suspended }} suspendido{{ '' if counts.suspended == 1 else 's' }}{% endif %}
</p>
<p class="muted small">
El directorio está en <a href="{{ url_for('members.index') }}">Miembros</a>,
que ahora es una sección como las demás. Invitar de nuevo, cambiar el rol,
suspender y eliminar están en la ficha de cada persona.
</p>
</section>
<section class="panel">
<div class="panel__head">
<h2>Artículos publicados</h2>
<a class="linkish" href="{{ url_for('content.index', collection='post') }}">Abrir</a>
</div>
<p class="muted small">
Lo que ya está en vienalatina.com: editar, corregir o retirar. Para
publicar algo nuevo, o para revisar lo que proponen los miembros, está
<a href="{{ url_for('submissions.index') }}">Publicaciones</a>.
</p>
</section>
<section class="panel">
<div class="panel__head">
<h2>Páginas del sitio</h2>
<a class="linkish" href="{{ url_for('content.index', collection='page') }}">Abrir</a>
</div>
<p class="muted small">
Acerca de, contacto y las demás páginas fijas de vienalatina.com. Las
publicaciones no están aquí: eso es
<a href="{{ url_for('submissions.index') }}">Publicaciones</a>, que los
moderadores comparten contigo.
</p>
</section>
{% if counts.pending %}
<section class="panel panel--attention">
<div class="panel__head">
<h2>Pendiente de revisar</h2>
<a class="linkish" href="{{ url_for('submissions.index') }}">Ver</a>
</div>
<p class="panel__row">{{ counts.pending }} propuesta{{ '' if counts.pending == 1 else 's' }} esperando a un moderador.</p>
</section>
{% endif %}
{% endblock %}