mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-09-25 01:53:03 +02:00
feat(admin): cleanup page — remove 'Fichiers temporaires' level, promote sections to h2 TOC entries
This commit is contained in:
@@ -22,8 +22,9 @@ if (!($d['configured'] ?? false)): ?>
|
||||
<?php return; endif; ?>
|
||||
|
||||
<?php if (($d['orphan_count'] ?? 0) > 0): ?>
|
||||
<h3 id="peertube-orphans-heading">Vidéos orphelines <span class="n-meta"><?= (int)$d['orphan_count'] ?> vidéos orphelines</span></h3>
|
||||
<table class="n-table" aria-labelledby="peertube-orphans-heading">
|
||||
<p class="cleanup-section-desc">Vidéos toujours présentes sur l'instance PeerTube mais plus rattachées à aucun TFE du site. Supprimer une vidéo est définitif et sans retour.</p>
|
||||
<p class="cleanup-stat-card"><?= (int)$d['orphan_count'] ?> vidéo<?= ($d['orphan_count'] > 1 ? 's' : '') ?> orpheline<?= ($d['orphan_count'] > 1 ? 's' : '') ?></p>
|
||||
<table class="n-table" aria-labelledby="cleanup-peertube-title">
|
||||
<thead><tr><th>Nom</th><th>Date</th><th width="1%"></th></tr></thead>
|
||||
<tbody>
|
||||
<?php foreach ($d['orphans'] as $v): ?>
|
||||
@@ -35,6 +36,7 @@ if (!($d['configured'] ?? false)): ?>
|
||||
<td style="white-space:nowrap"><?= htmlspecialchars(substr($v['createdAt'] ?? '', 0, 10)) ?></td>
|
||||
<td style="white-space:nowrap">
|
||||
<button type="button" class="btn btn--sm btn--danger" style="font-size:0.85em;padding:2px var(--space-xs)"
|
||||
title="Supprimer définitivement cette vidéo de PeerTube (irréversible)"
|
||||
hx-post="/admin/actions/peertube-delete.php"
|
||||
hx-confirm="Supprimer définitivement cette vidéo de PeerTube ?"
|
||||
hx-vals='{"csrf_token":"<?= htmlspecialchars($_SESSION['csrf_token']) ?>","uuid":"<?= htmlspecialchars($v['uuid']) ?>"}'
|
||||
|
||||
Reference in New Issue
Block a user