{% extends sitecopy_base %} {% set sitecopy_screen = 'group' %} {% block title %}{{ group.title }} · Textos{% if sitecopy_brand %} · {{ sitecopy_brand }}{% endif %}{% endblock %} {% block head %}{% endblock %} {% from "sitecopy/_field.html" import field_control %} {% 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 %} {{ field_control(f, states[f.key], loop.index0 ~ '-' ~ sec.key, f.key in invalid_keys, field_errors, size_steps, baseline_prefix) }} {% endfor %} {# A collection: the same field controls, repeated once per item, plus the membership the editor can change. Order posts as one hidden input; add and delete are submits, so the whole thing works with JavaScript off. #} {% for col in sec.collections %} {% set cst = collections[col.key] %}

{{ col.title }}

{{ cst["items"] | length }} de {{ col.max_items }}
{% if col.note %}

{{ col.note }}

{% endif %} {% for item in cst["items"] %}
{{ col.item_label }} {{ item.position }} {# Reordering posts like everything else on this screen, so it works with JavaScript off. `formnovalidate` because moving a row is not the moment to enforce a half-typed field. #} {% if cst["can_delete"] %} {% endif %}
{% for name, st in item["values"].items() %} {{ field_control(st.field, st, col.key ~ '-' ~ item.id ~ '-' ~ name, st.field.key in invalid_keys, field_errors, size_steps, baseline_prefix, restorable=st.is_declared) }} {% endfor %}
{% endfor %} {% if cst["can_add"] %} {% else %}

Llegaste al máximo de {{ col.max_items }}.

{% endif %}
{% endfor %}
{% endfor %}
{% if pending %} {% endif %}
{% endblock %} {% block scripts %} {% endblock %}