feat : historique des révisions dans la sidebar article (v1.6.23)
- post_view.php : section Historique dans la sidebar pour les connectés liste les 10 dernières révisions avec date + commentaire → lien diff (#82) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,13 @@ Format : [Keep a Changelog](https://keepachangelog.com/fr/1.0.0/) — versionnag
|
||||
|
||||
---
|
||||
|
||||
## [1.6.23] - 2026-05-16
|
||||
|
||||
### Ajouté
|
||||
- Section « Historique » dans la sidebar des articles (connectés) : liste des révisions avec lien vers le diff (#82)
|
||||
|
||||
---
|
||||
|
||||
## [1.6.22] - 2026-05-16
|
||||
|
||||
### Ajouté
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1.6.22
|
||||
1.6.23
|
||||
|
||||
@@ -440,6 +440,24 @@ $_shareTitle = $article['title'] ?? '';
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$_revisions = array_reverse($article['revisions'] ?? []);
|
||||
if (!empty($_revisions) && isLoggedIn()):
|
||||
?>
|
||||
<h6 class="related-sidebar-title mt-3">Historique</h6>
|
||||
<ul class="toc-list small">
|
||||
<?php foreach (array_slice($_revisions, 0, 10) as $_rev): ?>
|
||||
<li>
|
||||
<a href="/diff/<?= rawurlencode($article['uuid']) ?>/<?= (int)$_rev['n'] ?>">
|
||||
<?= htmlspecialchars(substr($_rev['date'] ?? '', 0, 10)) ?>
|
||||
<?php if (($_rev['comment'] ?? '') !== ''): ?>
|
||||
— <span class="text-muted"><?= htmlspecialchars(mb_strimwidth($_rev['comment'], 0, 40, '…')) ?></span>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user