mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
Separate admin views from controllers — move HTML to templates/admin/
All admin pages refactored to thin controllers + pure view templates, mirroring the public-page pattern: Controllers (public/admin/*.php): auth, data loading, include template Views (templates/admin/*.php): pure HTML/PHP output Fragment partials (templates/admin/partials/): toast, system-log-panel, system-nginx-config-panel Pages migrated: login, tags, contenus, contenus-edit, account, acces-etudiante, thanks, add, edit, parametres, system, index Fragment endpoints refactored: system-fragment.php, toast-fragment.php Skipped (pure redirects): logout, logs, status, import
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Shared flash-message partial for the admin section.
|
||||
*
|
||||
* Consumes all flash variants via App::consumeFlash(), then renders toast markup.
|
||||
* Toast JS in the admin footer auto-removes them after 4 seconds.
|
||||
*
|
||||
* Usage: include once per request in the admin footer.
|
||||
*/
|
||||
$_flash = App::consumeFlash();
|
||||
?>
|
||||
<?php if ($_flash['error'] || $_flash['success']): ?>
|
||||
<div id="admin-toasts" style="display:none">
|
||||
<?php if ($_flash['error']): ?>
|
||||
<div class="toast" role="alert" data-type="error">⚠ <?= htmlspecialchars($_flash['error']) ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($_flash['success']): ?>
|
||||
<div class="toast" role="status" data-type="success">✓ <?= htmlspecialchars($_flash['success']) ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user