forked from laysense/laysite
Add visual header and footer layout editors
This commit is contained in:
@@ -16,6 +16,11 @@ $previewUrl = '/admin/pages/' . $slug . '/preview';
|
||||
<span class="dashboard-page-state" data-published="<?= $page['status'] === 'published' ? 'true' : 'false' ?>"><?= $page['status'] === 'draft' ? '草稿' : '已发布' ?></span></p></div>
|
||||
<div class="actions">
|
||||
<a class="button button-outline" href="#studio-page-settings">页面设置</a>
|
||||
<?php foreach (['header' => '编辑页头', 'footer' => '编辑页脚'] as $kind => $label): ?>
|
||||
<?php $default = $layoutDefaults[$kind . '_id'] ?? ''; $id = $page[$kind . '_id'] ?? $default; ?>
|
||||
<a class="button button-outline" data-page-layout-editor="<?= $kind ?>" data-default-id="<?= $e($default) ?>"
|
||||
href="/admin/design/<?= $kind ?>/<?= $id ? $e($id) : 'new?default=1' ?>" target="_blank" rel="noopener"><?= $label ?></a>
|
||||
<?php endforeach ?>
|
||||
<button type="button" class="button button-outline" data-open-page-templates hidden>整页模板</button>
|
||||
<?php if ($page['status'] === 'published'): ?><a class="button button-outline" href="<?= $e($path) ?>">公开页面</a><?php endif ?>
|
||||
<a class="button button-outline" href="<?= $e($previewUrl) ?>" target="_blank" rel="noopener">打开预览</a>
|
||||
|
||||
Reference in New Issue
Block a user