{% extends "admin/layout.html" %} {% block title %}File Management – Admin{% endblock %} {% block body %} {# ─── URL / sort macros ─────────────────────────────────────────────────────── #} {% macro up_page_url(p) %}?tab=uploads&search={{ search|urlencode }}&sort_by={{ sort_by }}&sort_dir={{ sort_dir }}&per_page={{ per_page }}&deleted={{ '1' if include_deleted else '0' }}&page={{ p }}{% endmacro %} {% macro up_sort_url(col) %}{% set nd = 'asc' if (sort_by == col and sort_dir == 'desc') else 'desc' %}?tab=uploads&search={{ search|urlencode }}&sort_by={{ col }}&sort_dir={{ nd }}&per_page={{ per_page }}&deleted={{ '1' if include_deleted else '0' }}&page=1{% endmacro %} {% macro up_sort_icon(col) %}{% if sort_by == col %}{% else %}{% endif %}{% endmacro %} {% macro conv_page_url(p) %}?tab=conversions&conv_search={{ conv_search|urlencode }}&conv_sort_by={{ conv_sort_by }}&conv_sort_dir={{ conv_sort_dir }}&conv_per_page={{ conv_per_page }}&conv_deleted={{ '1' if include_deleted_convs else '0' }}&conv_page={{ p }}{% endmacro %} {% macro conv_sort_url(col) %}{% set nd = 'asc' if (conv_sort_by == col and conv_sort_dir == 'desc') else 'desc' %}?tab=conversions&conv_search={{ conv_search|urlencode }}&conv_sort_by={{ col }}&conv_sort_dir={{ nd }}&conv_per_page={{ conv_per_page }}&conv_deleted={{ '1' if include_deleted_convs else '0' }}&conv_page=1{% endmacro %} {% macro conv_sort_icon(col) %}{% if conv_sort_by == col %}{% else %}{% endif %}{% endmacro %}
{% trans %}Uploads:{% endtrans %} {{ total }} {% trans %} · Conversions:{% endtrans %} {{ conv_total }}
{% trans %}This cannot be undone{% endtrans %}
{% trans %}This will permanently delete all conversion records, all upload records, and all physical files from the uploads directory. User accounts and settings are not affected.{% endtrans %}
{% trans %}Type{% endtrans %} EMPTY {% trans %}to confirm{% endtrans %}:
| {% trans %}File{% endtrans %}{{ up_sort_icon('file_name') }} | {% trans %}User{% endtrans %}{{ up_sort_icon('username') }} | {% trans %}Size{% endtrans %}{{ up_sort_icon('file_size') }} | {% trans %}Status{% endtrans %} | {% trans %}Date{% endtrans %}{{ up_sort_icon('uploaded_at') }} | {% trans %}Actions{% endtrans %} | |
|---|---|---|---|---|---|---|
|
{{ f.file_name or '—' }}
{% if f.get('input_format') or f.get('output_format') %}
{{ f.get('input_format','?') }}
→ {{ f.get('output_format','?') }}
{% endif %}
|
{% if f.user_id %} {{ f.get('username','#' + (f.user_id|string)) }} {% else %} {% trans %}Guest{% endtrans %} {% endif %} | {{ fmt_bytes(f.file_size) if f.get('file_size') else '—' }} | {% if f.deleted_at %}{% trans %}deleted{% endtrans %}{% else %}{{ f.get('status','—') }}{% endif %} | {{ (f.uploaded_at or f.get('created_at','—'))[:16] }} |
| {% trans %}ID{% endtrans %}{{ conv_sort_icon('id') }} | {% trans %}File{% endtrans %} | {% trans %}Input{% endtrans %}{{ conv_sort_icon('input_format') }} | {% trans %}Output{% endtrans %}{{ conv_sort_icon('output_format') }} | {% trans %}User{% endtrans %}{{ conv_sort_icon('username') }} | {% trans %}Status{% endtrans %}{{ conv_sort_icon('status') }} | {% trans %}Date{% endtrans %}{{ conv_sort_icon('created_at') }} | {% trans %}Actions{% endtrans %} |
|---|---|---|---|---|---|---|---|
| #{{ c.id }} |
{{ c.get('file_name') or c.get('input_file','—') }}
{% if c.get('file_size') %}{{ fmt_bytes(c.file_size) }} {% endif %}
|
{{ c.get('input_format','?') }} | {{ c.get('output_format','?') }} | {% if c.get('user_id') %} {{ c.get('username','#' + (c.user_id|string)) }} {% else %} {% trans %}Guest{% endtrans %} {% endif %} | {{ c.get('status','—') }} {% if c.get('status') != 'deleted' and not c.get('upload_id') %}{% trans %}Upload del{% endtrans %}{% endif %} {% if c.get('status') not in ['deleted','expired','cancelled'] and c.get('upload_id') and not c.get('output_path') %}{% trans %}Output del{% endtrans %}{% endif %} | {{ (c.get('created_at','—'))[:16] }} |