{% extends sitecopy_base %} {% set sitecopy_screen = 'group' %} {% block title %}{{ group.title }} · Textos{% if sitecopy_brand %} · {{ sitecopy_brand }}{% endif %}{% endblock %} {% block head %}{% endblock %} {% block content %} ← Todos los textos

{{ group.title }}

{{ group.description }}

Previsualizar
{% if pending %}
{{ pending }} {{ 'cambio' if pending == 1 else 'cambios' }} sin publicar en esta sección.
{% endif %} {# Filter box: with a couple of hundred strings, finding one by scrolling is the slowest part of the job. Progressive enhancement — without JS the list is intact. #}
{% for sec in group.sections %}

{{ sec.title }}

{% if sec.note %}

{{ sec.note }}

{% endif %} {% for f in sec.fields %} {% set st = states[f.key] %} {% set invalid = f.key in invalid_keys %}
{% if st.has_draft %}sin publicar {% elif st.is_overridden %}editado{% endif %}
{# Tie the hint and (when rejected) the error to the control, so a screen reader hears them with the field instead of just seeing a red border. #} {% set desc_ids = [] %} {% if f.hint %}{% set _ = desc_ids.append('hint-' ~ f.key) %}{% endif %} {% if invalid %}{% set _ = desc_ids.append('err-' ~ f.key) %}{% endif %} {% set describedby = desc_ids | join(' ') %} {% if f.hint %}

{{ f.hint }}

{% endif %} {% if invalid %}

{{ field_errors.get(f.key, 'Revisá este texto.') }}

{% endif %} {% if f.is_multiline %} {% else %} {% set is_media = f.type in ('image', 'video') %} {% if is_media %} {# A preview of what the URL points at, so the operator sees the picture/clip and not just a path. JS keeps it in step as they type. A button lets them upload a file instead of pasting a URL (progressive enhancement: shown by JS only, since it posts via fetch). #}
{% if f.type == 'video' %} {% else %} {% endif %}
{% endif %} {% endif %}
{% if st.value != f.default %} {# No-JS safe: this submit posts the whole form and tells the server which field to reset, so nothing typed elsewhere is lost. #} {% endif %}
{% endfor %}
{% endfor %}
{% if pending %} {% endif %}
{% endblock %} {% block scripts %} {% endblock %}