feat : versionnage semver, migrations contenu, bandeau mise à jour admin
- CHANGELOG.md : structure semver (1.0.0 / 1.1.0 / 1.2.0) remplace le journal non versionné - public/version.txt : généré à chaque push depuis la première entrée CHANGELOG - scripts/push.sh : extrait la version CHANGELOG avant git add - src/UpdateChecker.php : compare version déployée vs version Gitea (raw file), cache 1 h - templates/layout.php : bandeau alerte admin (nouvelle version / migrations en attente) - templates/admin.php : dashboard moteur Folio (version déployée / disponible) - scripts/migrate_content.php + migration_001 : ajout # titre dans les articles existants - templates/maintenance.php : page HTTP 503 pendant une migration - src/helpers.php : extractMarkdownTitle(), normalisation \r\n dans lineDiff() - templates/wizard/step1.php : suppression champ titre, plan TOC dynamique - public/assets/js/wizard.js : scope titleEl, scrollToCursor, buildToc, handlers externalisés Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -106,6 +106,25 @@ $_layoutCurrentCat = trim($_GET['cat'] ?? '');
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<?php if (function_exists('isAdmin') && isAdmin() && isset($_updateChecker)):
|
||||
$_adminNotices = $_updateChecker->adminNotices();
|
||||
foreach ($_adminNotices as $_notice):
|
||||
$_isWarning = $_notice['type'] === 'warning'; ?>
|
||||
<div class="alert alert-<?= $_isWarning ? 'warning' : 'info' ?> alert-dismissible rounded-0 border-0 border-bottom py-2 mb-0 small" role="alert">
|
||||
<div class="container-fluid d-flex align-items-center gap-2 flex-wrap">
|
||||
<span><?= $_notice['message'] ?></span>
|
||||
<?php if ($_isWarning): ?>
|
||||
<form method="POST" action="/?action=run_content_migrations" class="d-inline">
|
||||
<button type="submit" class="btn btn-warning btn-sm py-0">Mettre à jour</button>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<a href="/admin?tab=dashboard" class="btn btn-outline-primary btn-sm py-0">Voir dans l'admin</a>
|
||||
<?php endif; ?>
|
||||
<button type="button" class="btn-close ms-auto" data-bs-dismiss="alert" aria-label="Fermer"></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; endif; ?>
|
||||
|
||||
<main class="<?= htmlspecialchars($mainClass ?? 'container') ?>" role="main">
|
||||
<?= $content ?>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user