{# Displays a list of files. files - A list of files to display. owner_type - type of the files owner owner_id - ID of the files owner Example: {% snippet 'files/snippets/file_table.html', files=files %} #} {% set columns = [ {"name": "name", "label": "Name"}, {"name": "ctime", "label": "Created"}, {"name": "storage_data.content_type", "label": "Type"}, {"name": "storage_data.size", "label": "Size"}, ] %} {% set params = request.args %} {% block file_table %}
{% if params.sort == column.name and params.reverse == 'false' %} {{ _(column.label) }} {% else %} {{ _(column.label) }} {% endif %} | {% endfor %}{{ _("Actions") }} | |||
---|---|---|---|---|
{{ file.name }} |
{% with ctime = h.files_parse_tz_date(file.ctime) %}
{{ h.render_datetime(ctime, with_hours=True) }}
{% endwith %}
|
{% set content_type = file.content_type %}
{% set icon_path = h.files_content_type_icon(content_type, "amy-dark", "svg") %}
{% if icon_path %}
|
{{ h.localised_filesize(file.size) }} | {% block file_actions %} {% block action_public_link %} {% set public_link = h.files_link_details(file.id, "public") %} {% if public_link %} {% endif %} {% endblock action_public_link %} {% block action_download %} {% if h.check_access("files_file_download", {"id": file.id}) %} {% endif %} {% endblock action_download %} {% block action_remove %} {% if h.check_access("files_file_download", {"id": file.id}) %} {% endif %} {% endblock action_remove %} {% endblock %} |