*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
74 lines
2.6 KiB
HTML
74 lines
2.6 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Miembros{% endblock %}
|
|
|
|
{% set me = g.member %}
|
|
{% set is_admin = me.role in ('owner', 'admin') %}
|
|
|
|
{% block main %}
|
|
<div class="feed-head">
|
|
<h1>Miembros</h1>
|
|
{% if is_admin %}
|
|
<a class="btn" href="{{ url_for('members.new') }}">Dar de alta</a>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<p class="muted">
|
|
Abre la ficha de alguien para escribirle en privado y leer lo que os habéis
|
|
escrito. Los mensajes privados viven en la ficha de cada persona; no hay
|
|
bandeja aparte.
|
|
</p>
|
|
|
|
{# Faces and names, and the whole card is the link. This was a page of cards
|
|
each carrying a bio, a couple of links and a fold-out admin panel — four
|
|
things to read per person, on a page whose job is to let you find one. All of
|
|
that is on the person's own page now. #}
|
|
<ul class="people">
|
|
{% for m in members %}
|
|
<li class="person-card {{ '' if m.active else 'person-card--off' }}">
|
|
<a class="person-card__link" href="{{ url_for('members.show', login=m.gitea_login) }}">
|
|
{% if m.photo_name %}
|
|
<img class="person-card__photo"
|
|
src="{{ url_for('profiles.member_photo', stored_name=m.photo_name) }}"
|
|
alt="" loading="lazy">
|
|
{% else %}
|
|
{# Their initial rather than a silhouette: a placeholder that is at
|
|
least theirs. #}
|
|
<span class="person-card__photo person-card__photo--none" aria-hidden="true">
|
|
{{ m.display_name[:1]|upper }}
|
|
</span>
|
|
{% endif %}
|
|
|
|
<span class="person-card__who">
|
|
<span class="person-card__name">
|
|
{{ m.display_name }}
|
|
{% if m.id == me.id %}<span class="muted small">(tú)</span>{% endif %}
|
|
{% if m.unread %}
|
|
{# Who wrote, not just that somebody did — and the cards are
|
|
sorted so this one is at the top of the page. #}
|
|
<span class="tag" aria-label="{{ m.unread }} sin leer">{{ m.unread }}</span>
|
|
{% endif %}
|
|
</span>
|
|
{# The username is shown to everyone: it is not a secret, it is
|
|
their address — vienalatina.com/<usuario> — and somebody
|
|
looking for a person's page needs to know how it is spelled.
|
|
The email stays on their page, inside the admin block. #}
|
|
<span class="muted small">
|
|
<span class="mono">{{ m.gitea_login }}</span> · {{ labels[m.role] }}
|
|
{% if not m.active %} · Suspendido{% endif %}
|
|
</span>
|
|
</span>
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
{% if is_admin %}
|
|
<p class="muted small">
|
|
Hay un solo responsable. El responsable da de alta administradores; los
|
|
administradores dan de alta miembros y moderadores. Suspender, cambiar el rol,
|
|
reenviar la invitación y eliminar están en la ficha de cada persona, bajo
|
|
«Gestionar».
|
|
</p>
|
|
{% endif %}
|
|
{% endblock %}
|