<!DOCTYPE html>
<!-- Nextcloud <tree> Modal -->
<div class="modal-dialog modal-dialog-scrollable modal-lg">
    <form class="modal-content js-modal-submit" data-reload-location="true"
        action="{{ url_for('data.download_nextcloud', projectname=project.name) }}" method="POST"
        id="nextcloudUploadForm">
        <div class="modal-header">
            <h5 class="modal-title" id="nextcloudModalLabel">Nextcloud Folders</h5>
            <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body">
            {% for item in items %}
            {% if item.type == 'folder' %}
            {% with folder=item, index=loop.index %}
            {% include 'modal/file_explorer_content.html' %}
            {% endwith %}
            {% endif %}
            {% endfor %}
        </div>
        <div class="modal-footer">
            <button type="submit" class="btn btn-success">Download selected</button>
            <button type="button" name="form_type" value="logout"
                data-url="{{ url_for('data.modal_nextcloud', projectname=project.name, logout=True) }}"
                class="load-modal btn btn-danger">Logout</button>
        </div>
    </form>
</div>