{% extends "files/_layout.html" %} {% from "_macros.html" import icon %} {% from "files/_macros.html" import in_place, size, file_icon %} {% set explorer = true %} {# The explorer, `GET /files?path=`: the whole window, like a file manager -- the path bar with what can be done here, the folder tree, and the list. Everything is what *you* can see (services/file_ui.py); a chat sees its own part of it. The list is one grid with a track per column and every row a subgrid of it, so a long name never pushes the type, size or date out of line; the name track is the one that gives (`minmax(0, 1fr)`), and on a phone the type and date tracks go. A whole row opens what it names. Moving: drag a row onto a folder in the list, the tree or the path above (js/files.js), or use Move in the row's menu, which asks for the folder. #} {% block title %}{{ t("Files") }} - {{ brand.name }}{% endblock %} {% block tools %} {% if not problem and writable %} {#- A plain form, so it works without JavaScript; files.js sends it as soon as files are chosen, and a drop of files on the list sends the same. -#}
{% endif %} {% endblock %} {% block files_content %} {% if problem %}
{{ icon("folder", "empty__mark") }}

{{ t("Not here") }}

{{ problem }}

{{ t("Back to your files") }}

{% else %}
{% if not rows %}
{{ icon("folder-open", "empty__mark") }}

{{ t("Nothing here yet. Not even a hobbit hole.") }}

{% if writable %}

{{ t("Make a file or a folder above, or drop files here to upload them.") }}

{% endif %}
{% else %}
{{ t("Name") }} {{ t("Type") }} {{ t("Size") }} {{ t("Changed") }} {{ t("Actions") }}
{% for row in rows %} {% set href = ('/files?path=' if row.is_dir else '/files/view?path=') ~ row.path|urlencode %}
{{ file_icon(row) }} {{ row.name }} {% if not row.writable %}{{ t("read-only") }}{% endif %} {% if row.kind == "mount" %}{{ t("mount") }}{% endif %} {{ t("folder") if row.is_dir else row.type_label }} {{ size(row.size) if not row.is_dir }} {{ stamp(row.updated_at, "%d %B %Y") if row.updated_at }} {% if python and row.runnable %} {{ icon("play", "icon--sm") }} {% endif %} {% set label = t("More for %(name)s", name=row.name) %}
{% endfor %}
{% endif %}
{% endif %} {% endblock %}