mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
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
62 lines
1.9 KiB
PHP
62 lines
1.9 KiB
PHP
<main id="main-content">
|
|
<h1>Contenus</h1>
|
|
|
|
<h2>Pages statiques</h2>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Slug</th>
|
|
<th scope="col">Titre</th>
|
|
<th scope="col">Mis à jour</th>
|
|
<th scope="col">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($pages as $p): ?>
|
|
<tr>
|
|
<td><code><?= htmlspecialchars($p['slug']) ?></code></td>
|
|
<td><?= htmlspecialchars($p['title']) ?></td>
|
|
<td><?= htmlspecialchars($p['updated_at'] ?? '—') ?></td>
|
|
<td>
|
|
<a href="/admin/contenus-edit.php?slug=<?= urlencode($p['slug']) ?>"
|
|
class="admin-btn admin-btn--sm">Éditer</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h2 style="margin-top:2rem;">À propos</h2>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Clé</th>
|
|
<th scope="col">Type</th>
|
|
<th scope="col">Mis à jour</th>
|
|
<th scope="col">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($aproposKeys as $a): ?>
|
|
<?php
|
|
$typeLabel = match($a['key']) {
|
|
'contacts' => 'Contacts',
|
|
'credits' => 'Crédits',
|
|
};
|
|
?>
|
|
<tr>
|
|
<td><code><?= htmlspecialchars($a['key']) ?></code></td>
|
|
<td><?= htmlspecialchars($typeLabel) ?></td>
|
|
<td><?= htmlspecialchars($a['updated_at'] ?? '—') ?></td>
|
|
<td>
|
|
<a href="/admin/contenus-edit.php?apropos=<?= urlencode($a['key']) ?>"
|
|
class="admin-btn admin-btn--sm">Éditer</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</main>
|