cleanup: sélection multiple + page dédiée (/admin/cleanup.php)

- cleanup-tmp.php: accepte les arrays filepond_dirs[] et trash_files[] pour suppression en lot
- cleanup-stats-fragment.php: ajout checkboxes + barre d'actions groupées + formulaire bulk HTMX
- admin-cleanup-bulk.js: module JS pour toggleAll, updateBulk, bulkDelete
- Nouvelle page /admin/cleanup.php remplace la modale (tmp-cleanup.php supprimé)
- Bouton Nettoyer dans index.php devient un lien vers la page dédiée
This commit is contained in:
Pontoporeia
2026-07-03 17:06:23 +02:00
parent a5f658ce0c
commit a1f32acaa1
9 changed files with 183 additions and 55 deletions
+2 -5
View File
@@ -29,10 +29,9 @@
</a>
<?php endif; ?>
<?php if ($tmpTotalCount > 0): ?>
<button type="button" class="btn btn--sm btn--secondary" id="tmp-cleanup-btn"
onclick="document.getElementById('tmp-cleanup-dialog').showModal(); htmx.trigger('#tmp-cleanup-stats-wrapper','loadStats'); htmx.trigger('#peertube-orphans-fragment','loadPeertube')">
<a href="/admin/cleanup.php" class="btn btn--sm btn--secondary">
<?= icon('trash') ?> Nettoyer (<?= $tmpTotalCount ?>)
</button>
</a>
<?php endif; ?>
<button type="button" class="btn btn--primary btn--sm" id="import-dialog-btn"
onclick="document.getElementById('import-dialog').showModal(); window.XamxamInitFilePonds()">
@@ -93,8 +92,6 @@
<?php include APP_ROOT . '/templates/admin/partials/dialogs/import.php'; ?>
<?php include APP_ROOT . '/templates/admin/partials/dialogs/tmp-cleanup.php'; ?>
<?php if ($importMessage || !empty($importErrors)): ?>
<script>document.getElementById('import-dialog').showModal();</script>
<?php endif; ?>