Initial dev export (exclude uploads/runtime)
This commit is contained in:
58
modules/pages/views/admin/index.php
Normal file
58
modules/pages/views/admin/index.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
$pageTitle = 'Pages';
|
||||
$pages = $pages ?? [];
|
||||
ob_start();
|
||||
?>
|
||||
<section class="admin-card">
|
||||
<div class="badge">Pages</div>
|
||||
<div style="display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:16px;">
|
||||
<div>
|
||||
<h1 style="font-size:28px; margin:0;">Pages</h1>
|
||||
<p style="color: var(--muted); margin-top:6px;">Manage custom content pages.</p>
|
||||
</div>
|
||||
<a href="/admin/pages/new" class="btn small">New Page</a>
|
||||
</div>
|
||||
|
||||
<div style="margin-top:18px; display:grid; gap:10px;">
|
||||
<div style="display:grid; grid-template-columns: 2fr 1fr 120px 120px 120px 160px 120px; gap:12px; font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:0.2em;">
|
||||
<div>Title</div>
|
||||
<div>Slug</div>
|
||||
<div>Status</div>
|
||||
<div>Home</div>
|
||||
<div>Blog</div>
|
||||
<div>Updated</div>
|
||||
<div>Actions</div>
|
||||
</div>
|
||||
<?php if (!$pages): ?>
|
||||
<div style="color: var(--muted); font-size:13px;">No pages yet.</div>
|
||||
<?php else: ?>
|
||||
<?php foreach ($pages as $page): ?>
|
||||
<div style="display:grid; grid-template-columns: 2fr 1fr 120px 120px 120px 160px 120px; gap:12px; align-items:center; padding:10px 12px; border-radius:16px; border:1px solid var(--stroke); background: rgba(14,14,16,0.9);">
|
||||
<div style="font-weight:600;"><?= htmlspecialchars((string)($page['title'] ?? ''), ENT_QUOTES, 'UTF-8') ?></div>
|
||||
<div style="font-size:12px; color:var(--muted); font-family: 'IBM Plex Mono', monospace;">
|
||||
<?= htmlspecialchars((string)($page['slug'] ?? ''), ENT_QUOTES, 'UTF-8') ?>
|
||||
</div>
|
||||
<div style="font-size:12px; color:<?= ((int)($page['is_published'] ?? 0) === 1) ? 'var(--accent-2)' : 'var(--muted)' ?>;">
|
||||
<?= ((int)($page['is_published'] ?? 0) === 1) ? 'Published' : 'Draft' ?>
|
||||
</div>
|
||||
<div style="font-size:12px; color:<?= ((int)($page['is_home'] ?? 0) === 1) ? 'var(--accent-2)' : 'var(--muted)' ?>;">
|
||||
<?= ((int)($page['is_home'] ?? 0) === 1) ? 'Yes' : 'No' ?>
|
||||
</div>
|
||||
<div style="font-size:12px; color:<?= ((int)($page['is_blog_index'] ?? 0) === 1) ? 'var(--accent-2)' : 'var(--muted)' ?>;">
|
||||
<?= ((int)($page['is_blog_index'] ?? 0) === 1) ? 'Yes' : 'No' ?>
|
||||
</div>
|
||||
<div style="font-size:12px; color:var(--muted);">
|
||||
<?= htmlspecialchars((string)($page['updated_at'] ?? ''), ENT_QUOTES, 'UTF-8') ?>
|
||||
</div>
|
||||
<div style="display:flex; gap:8px;">
|
||||
<a href="/admin/pages/edit?id=<?= (int)$page['id'] ?>" class="btn outline small">Edit</a>
|
||||
<a href="/<?= htmlspecialchars((string)($page['slug'] ?? ''), ENT_QUOTES, 'UTF-8') ?>" class="btn outline small">View</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
require __DIR__ . '/../../../admin/views/layout.php';
|
||||
Reference in New Issue
Block a user