{# The tree view: the real TOML structure (tables, arrays of tables) with line numbers, plus the structural operations that have to re-serialize the file. Every structural control says so before it runs. #} {% from 'admin/config_editor_rows.html' import key_row %} {% macro table_node(node, depth) %}
{{ node.label }} L{{ node.line }} {{ _('%(count)s key(s)', count=node.rows|length) }}
{% for row in node.rows %}{{ key_row(row) }}{% endfor %}
{% if node.kind == 'array_table' %}
{% elif node.path %}
{% endif %} {% for child in node.children %}{{ table_node(child, depth + 1) }}{% endfor %}
{% endmacro %}
{{ _('Tree view') }} {{ _('Structural changes re-serialize the file: comments may be reformatted.') }}
{% if arrays %}
{{ _('Arrays') }} {% for item in arrays %}
{{ item.path }} {{ _('%(count)s item(s)', count=item.count) }}
{% if not item.tables %} {% else %} {% endif %}
{% endfor %}
{% endif %} {% if not rows %}

{{ _('No key matches the current filters.') }}

{% endif %} {% for node in tree %}{{ table_node(node, 0) }}{% endfor %}