feat : recherche titre, toggle à la une, date modif, retour sources (v1.6.15)
- admin/articles : champ filter_search (titre, insensible casse) cumulable avec auteur/catégorie/statut (#85) - admin/articles : colonne ★ avec toggle rapide featured + filtre filter_featured (#84) - post/ : date de modification sous la date de publication si modifié après mise en ligne (#81) - sources/ : bouton ← Retour à l'article vers post/<slug> au lieu de /edit/<uuid> (#83) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -96,6 +96,14 @@ $authorName = ($authorEmail !== '' && function_exists('authorDisplayName')
|
||||
$authorProfileUrl = ($authorEmail !== '' && function_exists('authorProfileUrl')) ? authorProfileUrl($authorEmail) : '';
|
||||
$authorSlugVal = ($authorEmail !== '' && function_exists('authorSlug')) ? authorSlug($authorEmail) : '';
|
||||
$pubDate = htmlspecialchars(date('d/m/Y', strtotime((string)($article['published_at'] ?? $article['created_at'] ?? ''))));
|
||||
$modDate = '';
|
||||
$_updatedTs = strtotime((string)($article['updated_at'] ?? ''));
|
||||
$_publishedTs = strtotime((string)($article['published_at'] ?? $article['created_at'] ?? ''));
|
||||
if ($_updatedTs > 0 && $_publishedTs > 0 && $_updatedTs > $_publishedTs) {
|
||||
$_frMonths = ['janvier','février','mars','avril','mai','juin','juillet','août','septembre','octobre','novembre','décembre'];
|
||||
$modDate = 'Modifié le ' . (int)date('j', $_updatedTs) . ' ' . $_frMonths[(int)date('n', $_updatedTs) - 1]
|
||||
. ' ' . date('Y', $_updatedTs) . ' à ' . date('H', $_updatedTs) . 'h' . date('i', $_updatedTs);
|
||||
}
|
||||
$hasCover = $coverFile !== '';
|
||||
$heroExtraClass = $hasCover ? '' : ' article-cover--gradient';
|
||||
$heroStyle = $hasCover ? '' : ' style="background:' . htmlspecialchars($gradient) . '"';
|
||||
@@ -137,6 +145,9 @@ $hasSources = (!empty($externalLinks) || !empty($files))
|
||||
<span class="mx-1 opacity-50">·</span>
|
||||
<?php endif; ?>
|
||||
<?= $pubDate ?>
|
||||
<?php if ($modDate !== ''): ?>
|
||||
<br><small class="opacity-75"><?= htmlspecialchars($modDate) ?></small>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="article-hero-right">
|
||||
|
||||
Reference in New Issue
Block a user