51055b7321
- RSS : content:encoded (HTML complet) + fix description via plain (#42) - RSS : flux filtré par ?category=nom (#43) - Commentaires : cookie nom/email pour pré-remplir le formulaire (#51) - flux/ : bandeau admin des feeds en erreur (#45) - admin/emails : bouton « Voir ↗ » vers /admin/email-preview/{id} en nouvel onglet (#37) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
64 lines
2.4 KiB
PHP
64 lines
2.4 KiB
PHP
<?php ob_start(); ?>
|
|
|
|
<div class="d-flex align-items-center gap-3 mb-5">
|
|
<h1 class="h4 mb-0">Flux agrégés</h1>
|
|
</div>
|
|
|
|
<?php if (!empty($fluxErrors) && function_exists('isAdmin') && isAdmin()): ?>
|
|
<div class="alert alert-warning py-2 mb-4">
|
|
<strong><?= count($fluxErrors) ?> flux en erreur</strong>
|
|
<ul class="mb-0 mt-1 small">
|
|
<?php foreach ($fluxErrors as $_err): ?>
|
|
<li>
|
|
<?= htmlspecialchars($_err['label'] !== '' ? $_err['label'] : $_err['feed_url']) ?>
|
|
— <code><?= htmlspecialchars($_err['feed_url']) ?></code>
|
|
<span class="text-muted">(<?= htmlspecialchars($_err['user_email']) ?>)</span>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if (empty($fluxItems)): ?>
|
|
<p class="text-muted">Aucun article disponible pour l'instant.</p>
|
|
<?php else: ?>
|
|
<div class="flux-list">
|
|
<?php foreach ($fluxItems as $_item):
|
|
$_date = $_item['date'] > 0 ? date('d/m/Y', $_item['date']) : '';
|
|
$_authorName = $_item['author_name'] ?? '';
|
|
$_authorSlug = $_item['author_slug'] ?? '';
|
|
?>
|
|
<article class="flux-item">
|
|
<div class="flux-item-meta">
|
|
<?php if ($_authorSlug !== ''): ?>
|
|
<a href="/profil/<?= rawurlencode($_authorSlug) ?>" class="flux-author"><?= htmlspecialchars($_authorName) ?></a>
|
|
<?php elseif ($_authorName !== ''): ?>
|
|
<span class="flux-author"><?= htmlspecialchars($_authorName) ?></span>
|
|
<?php endif; ?>
|
|
<?php if ($_item['feed_title'] !== ''): ?>
|
|
<span class="flux-feed-name"><?= htmlspecialchars($_item['feed_title']) ?></span>
|
|
<?php endif; ?>
|
|
<?php if ($_date !== ''): ?>
|
|
<span class="flux-date"><?= $_date ?></span>
|
|
<?php endif; ?>
|
|
</div>
|
|
<h2 class="flux-item-title">
|
|
<a href="<?= htmlspecialchars($_item['url']) ?>" target="_blank" rel="noopener">
|
|
<?= htmlspecialchars($_item['title']) ?> ↗
|
|
</a>
|
|
</h2>
|
|
<?php if ($_item['summary'] !== ''): ?>
|
|
<p class="flux-item-summary"><?= htmlspecialchars($_item['summary']) ?></p>
|
|
<?php endif; ?>
|
|
</article>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php
|
|
$content = ob_get_clean();
|
|
$title = 'Flux — ' . siteTitle();
|
|
$canonical = rtrim(APP_URL, '/') . '/flux';
|
|
$mainClass = 'container-fluid';
|
|
include __DIR__ . '/layout.php';
|