forked from laysense/laysite
Refine admin action buttons and add a system about page
This commit is contained in:
@@ -8,7 +8,7 @@ $e = View::escape(...);
|
||||
<header class="admin-heading">
|
||||
<h1><?= $e($title) ?></h1>
|
||||
<?php if ($articleId && $article['status'] === 'published' && $article['slug'] !== ''): ?>
|
||||
<a class="button button-outline" href="/articles/<?= $e($article['slug']) ?>">查看公开页面</a>
|
||||
<?= View::fragment('admin-view-link', ['href' => '/articles/' . $article['slug'], 'icon' => 'external']) ?>
|
||||
<?php endif ?>
|
||||
</header>
|
||||
<?= View::fragment('admin-feedback', compact('error', 'saved')) ?>
|
||||
@@ -23,7 +23,7 @@ $e = View::escape(...);
|
||||
<div class="article-editor" data-article-editor>
|
||||
<div class="article-editor-heading">
|
||||
<label for="article-source" data-article-editor-label>正文</label>
|
||||
<button type="button" class="button button-outline" data-insert-article-image hidden>从媒体库插入图片</button>
|
||||
<button type="button" class="button button-outline" data-insert-article-image hidden><?= View::fragment('studio-icon', ['icon' => 'media']) ?>从媒体库插入图片</button>
|
||||
</div>
|
||||
<input type="hidden" name="body_format" value="<?= $e($article['body_format']) ?>">
|
||||
<textarea id="article-source" name="body" rows="16" aria-label="文章正文"><?= $e($article['body']) ?></textarea>
|
||||
@@ -48,7 +48,7 @@ $e = View::escape(...);
|
||||
<option value="draft" <?= $article['status'] === 'draft' ? 'selected' : '' ?>>草稿</option>
|
||||
<option value="published" <?= $article['status'] === 'published' ? 'selected' : '' ?>>已发布</option>
|
||||
</select></label>
|
||||
<button class="button button-primary" type="submit">保存文章</button>
|
||||
<button class="button button-primary" type="submit"><?= View::fragment('studio-icon', ['icon' => 'save']) ?>保存文章</button>
|
||||
</div>
|
||||
</form>
|
||||
<?php if ($articleId !== null): ?>
|
||||
@@ -58,7 +58,7 @@ $e = View::escape(...);
|
||||
<input type="hidden" name="csrf" value="<?= $e($token) ?>">
|
||||
<input type="hidden" name="version" value="<?= $e($article['version']) ?>">
|
||||
<p class="field-note">删除后,文章及其目录卡片会从网站移除,且无法恢复。</p>
|
||||
<button class="button button-danger" type="submit">永久删除</button>
|
||||
<button class="button button-danger" type="submit"><?= View::fragment('studio-icon', ['icon' => 'delete']) ?>永久删除</button>
|
||||
</form>
|
||||
</details>
|
||||
<?php endif ?>
|
||||
|
||||
Reference in New Issue
Block a user