Expand admin system information and license notices

This commit is contained in:
2026-11-25 21:39:13 +08:00
parent 2e1e43a3ce
commit acf59c9dfc
18 changed files with 1014 additions and 21 deletions
+2 -2
View File
@@ -25,13 +25,13 @@ $systemLabel = SystemPage::TYPES[$page['page_type']] ?? null;
<?php foreach (['header' => '编辑页头', 'footer' => '编辑页脚'] as $kind => $label): ?>
<?php $defaultId = $layoutDefaults[$kind . '_id'] ?? ''; $id = $page[$kind . '_id'] ?? $defaultId; ?>
<a class="button button-outline" data-page-layout-editor="<?= $e($kind) ?>" data-default-id="<?= $e($defaultId) ?>"
href="<?= $id ? '/admin/pages/' . $e(LayoutPage::slug($kind, $id)) : '/admin/new-page?type=' . $e($kind) ?>" target="_blank" rel="noopener"<?= !($page['visibility'][$kind] ?? true) ? ' hidden' : '' ?>><?= View::fragment('studio-icon', ['icon' => $kind]) ?><?= $e($label) ?></a>
href="<?= $id ? '/admin/pages/' . $e(LayoutPage::slug($kind, $id)) : '/admin/new-page?type=' . $e($kind) ?>" target="_blank" rel="noopener noreferrer"<?= !($page['visibility'][$kind] ?? true) ? ' hidden' : '' ?>><?= View::fragment('studio-icon', ['icon' => $kind]) ?><?= $e($label) ?></a>
<?php endforeach ?>
<button type="button" class="button button-outline" data-open-page-templates hidden><?= View::fragment('studio-icon', ['icon' => 'templates']) ?>整页模板</button>
<?php if ($systemLabel): ?><a class="button button-outline" href="/admin/settings"><?= View::fragment('studio-icon', ['icon' => 'settings']) ?>站点设置</a>
<?php elseif ($page['status'] === 'published'): ?><?= View::fragment('admin-view-link', ['href' => $path, 'icon' => 'external']) ?><?php endif ?>
<?php endif ?>
<?= View::fragment('admin-view-link', ['href' => $previewUrl, 'icon' => 'preview', 'label' => '预览页面']) ?>
<?= View::fragment('admin-view-link', ['href' => $previewUrl, 'icon' => 'preview', 'label' => '打开预览', 'showLabel' => true]) ?>
</div>
</header>
<?= View::fragment('admin-feedback', compact('error', 'saved')) ?>