forked from laysense/laysite
Add page publication history and reusable blocks
This commit is contained in:
@@ -19,12 +19,28 @@ $anchorForm = View::fragment('studio-anchor-form', ['groups' => $modules, 'slug'
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php foreach (['modules' => $modules, 'elements' => BlockTemplates::ELEMENT_GROUPS] as $kind => $groups): ?>
|
||||
<?= View::fragment('studio-library-panel', compact('kind', 'groups', 'anchorForm')) ?>
|
||||
<?= View::fragment('studio-library-panel', compact('kind', 'groups', 'anchorForm', 'reusableBlocks')) ?>
|
||||
<?php endforeach ?>
|
||||
<section role="tabpanel" id="studio-panel-layers" aria-labelledby="studio-tab-layers" data-library-panel="layers">
|
||||
<?= $layers ?>
|
||||
</section>
|
||||
|
||||
<dialog class="media-picker" data-reuse-dialog aria-labelledby="reuse-dialog-title">
|
||||
<header class="admin-heading compact"><h2 id="reuse-dialog-title">插入镜像区块</h2></header>
|
||||
<form data-reuse-picker>
|
||||
<?php if ($reusableBlocks): ?>
|
||||
<label>主区块 <select name="source" required>
|
||||
<?php foreach ($reusableBlocks as $block): ?>
|
||||
<option value="<?= $e($block['main_id']) ?>"><?= $e($block['name'] . ' · ' . ($block['title'] ?: $block['key'])) ?></option>
|
||||
<?php endforeach ?>
|
||||
</select></label>
|
||||
<?php else: ?><p class="field-note">先在任意页面的图层中将一个区块设为主区块。</p><?php endif ?>
|
||||
<div class="actions">
|
||||
<?php if ($reusableBlocks): ?><button class="button button-primary" type="submit">添加镜像</button><?php endif ?>
|
||||
<button class="button button-outline" type="button" data-reuse-close>关闭</button>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
<div class="studio-template-peek" data-template-peek aria-hidden="true" hidden>
|
||||
<img alt="">
|
||||
<p></p>
|
||||
|
||||
Reference in New Issue
Block a user