{%- if not view_object.is_empty_tree() -%}
  <div class="project_tree" js-collapsible_tree>
    {% for root_tree_ in view_object.document_tree_iterator.document_tree.file_tree %}

      {% if root_tree_.root_folder_or_file.is_folder() %}
        {% if view_object.should_display_folder(root_tree_.root_folder_or_file) %}
          {% with folder = root_tree_.root_folder_or_file %}
            {% include "screens/project_index/project_tree_folder.jinja" %}
          {% endwith %}
        {% endif %}
      {% else %}
        {% if view_object.should_display_file(root_tree_.root_folder_or_file) %}
          {% with file = root_tree_.root_folder_or_file %}
            {% include "screens/project_index/project_tree_file.jinja" %}
          {% endwith %}
        {% endif %}
      {% endif %}

    {% endfor %}
  </div>
{%- else -%}
  <span data-testid="document-tree-empty-text">The document tree has no documents yet.</span>
{%- endif -%}
