{# One person's page inside the members area. Three things in one place, in the order somebody actually wants them: who this is, what you have said to each other, and — for an admin — what can be done about them. It replaces two screens, `conversation.html` and the `
` block that used to be on every card in the directory. The private half is the reason this page exists and the reason it is behind the login. Their *public* page is a separate thing they publish themselves, linked below when they have. #} {% extends "base.html" %} {% from "_person.html" import person %} {% from "_attachments.html" import attachments %} {% block title %}{{ member.display_name }}{% endblock %} {% set me = g.member %} {# The template mirrors the predicates in members.py rather than restating them: `can_assign` is the same list the handler will accept, so the picker cannot offer a role that comes back 403. #} {% set is_super = me.role == 'superadmin' %} {% set is_chair = me.role in ('superadmin', 'owner') %} {% set is_admin = is_at_least(me.role, 'admin') %} {% set can_assign = assignable_roles(me.role) %} {% block main %}

{{ member.display_name }}{% if is_me %} (tú){% endif %}

Todos los miembros
{% if member.photo_name %} {% else %} {% endif %}

{{ member.gitea_login }} · {{ labels[member.role] }} {% if not member.active %} · Suspendido{% endif %}

{% if member.bio %}
{{ bio_html }}
{% endif %} {% if links %} {% endif %}

{% if member.profile_published %} Su página pública {% elif is_me %} Editar mi perfil {% else %} No ha publicado una página pública. {% endif %}

{% if is_me %} {# No conversation with yourself, and nothing to mark read. Your own private messages are each on the page of the person you had them with, which is the whole arrangement. #}

Esta es tu ficha, tal como la ven los demás. Para escribir a alguien, abre su ficha desde Miembros.

{% else %}

Conversación privada

Sólo vosotros dos podéis leer esto.

{% for m in messages %}
{{ person(m.author, m.author_login) }} ·
{{ to_html(m.body_md) }}
{{ attachments(images.get(m.id, [])) }}
{% else %}

Todavía no os habéis escrito. Empieza abajo.

{% endfor %} {% if blocked %}

Hay un bloqueo entre vosotros, así que ninguno de los dos puede escribir.

Si el bloqueo lo puso la otra persona, esto no lo quita.

{% elif not member.active %} {# The handler refuses a message to a suspended member, so the box is not drawn for one. Said plainly rather than left as a missing form. #}

{{ member.display_name }} tiene el acceso suspendido y no puede recibir mensajes.

{% else %}
Bloquear a {{ member.display_name }}

Un bloqueo va en los dos sentidos: ninguno de los dos podrá escribir al otro. Lo puedes quitar cuando quieras, pero sólo el tuyo.

{% endif %} {% endif %} {% if is_admin and member.role not in ('superadmin', 'owner') and not is_me %} {# Moved here from the directory cards. A
, not a script: the CSP has no 'unsafe-inline'. Every button is still checked in its handler — this block being hidden from a moderator is a courtesy, not the rule. #}
Gestionar
{# Any admin can re-send, not just the owner: the usual reason somebody needs this is that the admin who added them made the account by hand, and waiting for the owner defeats the point. Hidden without an address, because the handler would refuse. #} {% if member.email and member.active %}
{% endif %} {% if member.role in can_assign or member.role not in ('admin',) %}
{% endif %} {% if is_chair and member.active %} {# Naming the responsable: the association's chair. The superadministrator can fill it when it is empty — a fresh install has nobody in it — and the responsable can hand it on. #}
{% endif %} {% if is_super and member.role == 'admin' and member.active %} {# Handing the platform on. Its own button, and its own sentence, because it is irreversible from this side: the moment it commits you are an administrator and cannot take it back. #}
{% endif %} {% if is_chair %}
{% endif %} {% if member.email %}

{{ member.email }}

{% endif %} {% if member.creator %}

Dado de alta por {{ member.creator }}.

{% endif %}
{% endif %} {% endblock %}