alpinux-static/app/templates/_file_table.html
Alpinux a6d7bc2c8a feat: v2.0.0 — 14 tickets implémentés
#53 résumé req/IPs par statut dans Erreurs 404
#54 titre onglet avec compteur non résolus
#2  Tout/Aucun dans resize (tailles + formats)
#7  backup filename affiché dans résultats resize
#8  flash message résumé après upload
#6  renommage inline sur preview_text + preview_other
#23 filtre + tri par nom/taille/date dans corbeille
#20 sélection multiple + batch restore/delete corbeille
#45 /sitemap.xml (assets publics)
#52 ignoreip fail2ban sync sur Ignorer/Retirer une IP
#1  cairosvg>=2.7 dans requirements.txt
#51 ignored_ips.json exclu du rsync --delete
#48 as_cache/ exclu du rsync --delete

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 21:04:03 +02:00

126 lines
4.9 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{#
Partial : tableau de fichiers.
Paramètres de contexte :
entries liste de dicts (champs _entry ou _trash_list)
mode "browse" | "trash"
has_hits booléen (browse uniquement)
humansize filtre taille
subpath chemin courant (browse uniquement, pour la ligne "..")
breadcrumb liste de crumbs (browse uniquement)
#}
<table class="file-table" id="file-table">
<thead>
<tr>
{% if mode == 'trash' %}<th class="col-check"><input type="checkbox" id="select-all-cb" title="Tout sélectionner"></th>{% endif %}
<th class="col-icon"></th>
<th>Nom</th>
{% if mode == 'trash' %}
<th class="col-origin">Emplacement d'origine</th>
<th class="col-date">Supprimé le</th>
<th class="col-size">Taille</th>
{% else %}
<th class="col-size">Taille</th>
<th class="col-date">Modifié le</th>
{% if has_hits %}<th class="col-hits">Vues</th>{% endif %}
{% endif %}
<th class="col-actions"></th>
</tr>
</thead>
<tbody>
{% if mode == 'browse' and subpath %}
<tr>
<td class="col-icon"></td>
<td>
{% if breadcrumb | length > 1 %}
<a href="{{ url_for('browse', subpath=breadcrumb[-2].path) }}">.. (dossier parent)</a>
{% else %}
<a href="{{ url_for('browse') }}">.. (racine)</a>
{% endif %}
</td>
<td></td><td></td>
{% if has_hits %}<td></td>{% endif %}
<td></td>
</tr>
{% endif %}
{% for e in entries %}
<tr data-name="{{ e.name|lower }}" data-size="{{ e.size or 0 }}" data-date="{{ e.deleted_at.isoformat() if mode == 'trash' and e.deleted_at else '' }}">
{% if mode == 'trash' %}<td class="col-check"><input type="checkbox" class="row-cb" data-path="{{ e.path }}" data-name="{{ e.name }}"></td>{% endif %}
<td class="col-icon">
{%- if e.is_dir -%}📁
{%- elif e.is_image -%}🖼
{%- elif e.is_pdf -%}📕
{%- elif e.is_text -%}📄
{%- else -%}📎
{%- endif -%}
</td>
<td>
<div class="col-name">
{% if e.is_image %}
<img class="thumb-sm"
src="{{ url_for('trash_raw' if mode == 'trash' else 'raw_file', subpath=e.path) }}"
alt="{{ e.name }}" loading="lazy">
{% endif %}
{% if mode == 'trash' %}
<a href="{{ url_for('trash_preview', subpath=e.path) }}" class="trash-filename">{{ e.name }}</a>
{% else %}
<a href="{{ url_for('browse', subpath=e.path) }}">
{{ e.name }}{% if e.is_dir %}/{% endif %}
</a>
{% endif %}
{% if e.ext and not e.is_dir %}
<span class="type-badge">{{ e.ext }}</span>
{% endif %}
</div>
</td>
{% if mode == 'trash' %}
<td class="col-origin" title="{{ e.original_path }}">{{ e.original_path }}</td>
<td class="col-date">{{ e.deleted_at.strftime('%d/%m/%Y %H:%M') }}</td>
<td class="col-size">{{ humansize(e.size) }}</td>
{% else %}
<td class="col-size">{{ humansize(e.size) if e.size is not none else '—' }}</td>
<td class="col-date">{{ e.mtime.strftime('%d/%m/%Y %H:%M') }}</td>
{% if has_hits %}
<td class="col-hits">
{% if not e.is_dir %}
{% if e.hits %}
<span class="hits-badge hits-active" title="{{ e.hits }} requête(s) dans les stats">{{ e.hits }}</span>
{% else %}
<span class="hits-badge hits-zero" title="Aucune vue">0</span>
{% endif %}
{% endif %}
</td>
{% endif %}
{% endif %}
<td class="col-actions">
{% if mode == 'browse' and not e.is_dir %}
<div class="row-actions">
<button type="button" class="btn-rename"
data-path="{{ e.path }}" data-name="{{ e.name }}"
title="Renommer">✏️</button>
<form method="post" action="{{ url_for('delete_file') }}" style="display:contents">
<input type="hidden" name="path" value="{{ e.path }}">
<button type="submit" class="btn-del" title="Mettre à la corbeille">🗑</button>
</form>
</div>
{% elif mode == 'trash' %}
<div class="row-actions">
<button type="button" class="btn-restore"
data-path="{{ e.path }}" title="Restaurer">♻️</button>
<form method="post" action="{{ url_for('trash_delete') }}" style="display:contents">
<input type="hidden" name="path" value="{{ e.path }}">
<button type="submit" class="btn-del btn-del--perm"
title="Supprimer définitivement"
onclick="return confirm('Supprimer définitivement {{ e.name|replace("'","\\'")|replace('"','&quot;') }} ?')">🗑</button>
</form>
</div>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>