Add canvas element tools and categorized article editing
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
use App\Content\View;
|
||||
|
||||
$e = View::escape(...);
|
||||
?>
|
||||
<a class="back-link" href="/admin/articles">返回文章列表</a>
|
||||
<header class="admin-heading"><h1>文章分类</h1></header>
|
||||
<?= View::fragment('admin-feedback', compact('error', 'saved')) ?>
|
||||
<form class="admin-form admin-panel" method="post" action="/admin/article-categories">
|
||||
<input type="hidden" name="csrf" value="<?= $e($token) ?>">
|
||||
<div class="form-grid">
|
||||
<label>分类名称<input name="name" value="<?= $e($name) ?>" required maxlength="60"></label>
|
||||
<label>网址标识<input name="slug" value="<?= $e($slug) ?>" required maxlength="60" pattern="[a-z0-9]+(-[a-z0-9]+)*"></label>
|
||||
</div>
|
||||
<div class="form-submit"><button class="button button-primary" type="submit">创建分类</button></div>
|
||||
</form>
|
||||
<nav class="filter-nav" aria-label="查看分类">
|
||||
<?php foreach ($categories as $key => $label): ?>
|
||||
<a href="/admin/articles?category=<?= $e($key) ?>"><?= $e($label) ?></a>
|
||||
<?php endforeach ?>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user