<div class="unfold-preview">
    <div class="ckanext-jstree-search">
        <div class="jstree-search--input">
            <label class="d-none" for="field-sitewide-search">{{ _('Search') }}</label>
            <input id="jstree-search" class="form-control" type="text" name="jstree-search"
                placeholder="{{ _('Search') }}" aria-label="{{ _('Search') }}" />
        </div>

        <button class="btn btn-sm" type="submit" aria-label="{{ _('Search icon') }}"><i
                class="fa fa-search"></i>
        </button>

        <button class="btn btn-sm" id="jstree-search-clear" title="{{ _('Clear search') }}" aria-label="{{ _('Clear search') }}">
            <i class="fa fa-close"></i>
        </button>

        <button class="btn btn-sm" id="jstree-expand-all" title="{{ _('Expand all folders') }}" aria-label="{{ _('Expand all folders') }}">
            <i class="fa fa-folder-open"></i>
        </button>
        <button class="btn btn-sm" id="jstree-collapse-all" title="{{ _('Collapse all folders') }}" aria-label="{{ _('Collapse all folders') }}">
            <i class="fa fa-folder"></i>
        </button>

        <div class="unfold-load-state btn btn-sm">
            <img src="{{ h.url_for_static('/spinner.gif') }}" width="20">
        </div>
    </div>

    <div class="pseudo-table-header">
        <div class="unf-cell unf-cell-name">
            {{ _("Name") }}
        </div>
        <div class="unf-cell unf-cell-size">
            {{ _("Size") }}
        </div>
        <div class="unf-cell unf-cell-modified-at">
            {{ _("Date Modified") }}
        </div>
    </div>

    <div id="archive-tree" data-module="unfold-init-jstree"
        data-module-resource-id="{{ resource.id }}"
        data-module-resource-view-id="{{ resource_view.id }}"
        data-module-show-context-menu="{{ (show_context_menu_default if resource_view.show_context_menu is undefined else resource_view.show_context_menu) | tojson }}">
        <div id="archive-tree--loader" class="ms-4">
            {{ _("Loading ...") }}
        </div>
    </div>

    <div id="archive-tree-error" style="display: none">
        <img src="{{ h.url_for_static('/error.gif') }}" width="30">
        <span></span>
    </div>
</div>

{% asset 'unfold/unfold-js' %}
{% asset 'unfold/unfold-css' %}
