{% set current_endpoint = url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-') %}
{% if current_endpoint == "configs" %} SERVICE MANAGER {% else %} FILE MANAGER {% endif %}
{% for folder in folders %} {% for child in folder['children'] recursive %} {{ loop(child['children']) }}
{% if child['content'] %} {% endif %}
{% if child['type'] == "folder" and current_endpoint == "configs" and loop.depth == 1 %} {% endif %} {% if child['type'] == "folder" and loop.depth != 1 %} {% endif %} {% if child['type'] == "file" and current_endpoint == "configs" and loop.depth != 1 %} {% endif %} {% if child['type'] == "folder" and current_endpoint == "cache" and loop.depth == 1 %} {% endif %} {% if child['type'] == "file" and current_endpoint == "cache" %} {% endif %} {{ child['name'] }}
{% endfor %}
{% endfor %}
{% if current_endpoint == "configs" %} {% endif %}