forked from laysense/laysense.cn
Reflow home shortcuts and support article deletion
This commit is contained in:
@@ -51,3 +51,14 @@ $e = View::escape(...);
|
||||
<button class="button button-primary" type="submit">保存文章</button>
|
||||
</div>
|
||||
</form>
|
||||
<?php if ($articleId !== null): ?>
|
||||
<details class="admin-panel admin-options">
|
||||
<summary>删除文章</summary>
|
||||
<form method="post" action="/admin/articles/<?= $e($articleId) ?>/delete">
|
||||
<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>
|
||||
</form>
|
||||
</details>
|
||||
<?php endif ?>
|
||||
|
||||
Reference in New Issue
Block a user