feat : widget notation étoiles + admin onglet flux RSS (v1.6.22)
- post_view.php : widget ★ 1-5 étoiles pour les connectés, moyenne + nb votes pour tous (#13) - admin : onglet /admin/flux liste tous les flux rss_feeds avec suppression (#87) - case 'admin_delete_feed' : suppression admin d'un flux sans contrainte email (#87) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,10 @@ function adminStatusBadge(array $a, int $now): string
|
||||
<a class="nav-link <?= $tab === 'books' ? 'active' : '' ?>"
|
||||
href="/admin/books">Livres</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?= $tab === 'flux' ? 'active' : '' ?>"
|
||||
href="/admin/flux">Flux</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?= $tab === 'stats' ? 'active' : '' ?>"
|
||||
href="/admin/stats">Statistiques</a>
|
||||
@@ -1267,6 +1271,57 @@ foreach (COLOR_PALETTE_16 as $_i => $_rgb):
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ─────────────────────────── FLUX RSS ─────────────────────────── -->
|
||||
<?php if ($tab === 'flux' && isAdmin()): ?>
|
||||
|
||||
<?php if (($_GET['deleted'] ?? '') === '1'): ?>
|
||||
<div class="alert alert-success py-2 small">Flux supprimé.</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h5>Flux RSS agrégés</h5>
|
||||
<p class="text-muted small">Tous les flux enregistrés par les utilisateurs. Seul un administrateur peut les supprimer.</p>
|
||||
|
||||
<?php if (empty($adminData['flux_feeds'] ?? [])): ?>
|
||||
<p class="text-muted">Aucun flux enregistré.</p>
|
||||
<?php else: ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-hover align-middle">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Utilisateur</th>
|
||||
<th>Libellé</th>
|
||||
<th>URL</th>
|
||||
<th>Ajouté le</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($adminData['flux_feeds'] as $_feed): ?>
|
||||
<tr>
|
||||
<td class="small"><?= htmlspecialchars($_feed['user_email'] ?? '') ?></td>
|
||||
<td class="small"><?= htmlspecialchars($_feed['label'] ?? '') ?></td>
|
||||
<td class="small text-truncate" style="max-width:260px">
|
||||
<a href="<?= htmlspecialchars($_feed['feed_url'] ?? '') ?>" target="_blank" rel="noopener" class="text-muted">
|
||||
<?= htmlspecialchars($_feed['feed_url'] ?? '') ?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="small text-nowrap"><?= htmlspecialchars(substr($_feed['created_at'] ?? '', 0, 10)) ?></td>
|
||||
<td>
|
||||
<form method="POST" action="/?action=admin_delete_feed"
|
||||
data-confirm="Supprimer ce flux ?">
|
||||
<input type="hidden" name="id" value="<?= (int)$_feed['id'] ?>">
|
||||
<button type="submit" class="btn btn-outline-danger btn-sm py-0">Supprimer</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ─────────────────────────── LIVRES ─────────────────────────── -->
|
||||
<?php if ($tab === 'books' && isAdmin()): ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user